Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 02-01-2018, 12:02 PM
mschaafs mschaafs is offline
Registered User
 
Join Date: Oct 2017
Posts: 27
Unhappy Windows 10 Internet Explorer ActiveX Failing

Good day! I have someone trying to run my SecureCRT/Javascript application on their Windows 10 machine with IE 11 and it is not running properly. The ActiveXObject that is working perfectly on my Windows 7 IE 11 platform.

Code:
//Get a reference to IE's Application object
var g_objIE = new ActiveXObject("InternetExplorer.Application");
g_objIE.Offline = true;
g_objIE.navigate("Title of the Application");

//This loop is required to allow the IE object to finish loading... 
while(g_objIE.Busy){
   crt.Sleep(100);  
} 
        
var htmlFile = "_Dialog_Template.html";
var newDomDoc = ReplaceData(ReadFileG(htmlFile));  // Get html content
g_objIE.document.write(newDomDoc);
When the navigate command is being called, it is causing Windows to pop up a dialog for downloading an app (go to the app store). When I take that line out, it is failing on the document.write line with a non-descriptive "Error".

I have made sure ActiveX was enabled in the security settings in IE as well as checking the box to allow local active content to run on my computer. I have tried throwing in some hard coded simple html in the write command... none of which worked. Please help as there doesn't seem to be jack online about this issue either.

Thank you!

Last edited by mschaafs; 02-01-2018 at 12:04 PM.
Reply With Quote
  #2  
Old 02-01-2018, 12:40 PM
mschaafs mschaafs is offline
Registered User
 
Join Date: Oct 2017
Posts: 27
Question DialogBox Timeout

Actually, if possible... is there a way to have a MessageBox timeout? Close after a specified period if not confirmed? Then I can do away with IE and ActiveX in my app.
Reply With Quote
  #3  
Old 02-01-2018, 01:08 PM
bstedh bstedh is offline
Registered User
 
Join Date: Jan 2018
Posts: 41
objShell.Popup(strText,[nSecondsToWait],[strTitle],[nType])
__________________
Version 6.7.3 (build 292)
Reply With Quote
  #4  
Old 02-01-2018, 02:51 PM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,482
Hi mschaafs,

I did not get the same results as your colleague was getting. I wonder if it has to do with Windows 10 preferring Edge, but that's sort of outside the scope of SecureCRT support, so I will leave that part of it to the community.

Since I don't have the complete script, I could not see where you would make use of MessageBox() with a timeout. Please elaborate. Maybe there's a currently available alternative.
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #5  
Old 02-02-2018, 09:46 AM
mschaafs mschaafs is offline
Registered User
 
Join Date: Oct 2017
Posts: 27
Thumbs up Windows Shell (wsh) Popup!

Good day! Thank you bstedh and Brenda for your responses!

Indeed bstedh's response was exactly what I needed... Utilizing Windows Shell instead of IE is perfect for this app. I am super grateful.

I found good info on it here: http://4umi.com/web/javascript/shell.php

And ended up ditching that block of code for:

Code:
    function TimedDialog(tdTimer, tdMessage, tdTitle){
        var wsh = new ActiveXObject('WScript.Shell');
        popup = wsh.Popup( tdMessage, tdTimer, tdTitle, 64 );        
    }
Reply With Quote
  #6  
Old 02-02-2018, 12:21 PM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,482
Hi mschaafs,

Excellent, I am glad to hear you were able to incorporate bstedh's idea into your script!

Thanks for the suggestion bstedh!
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
Reply

Tags
activex , internet explorer , popup , windows 10 , wscript


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 04:52 AM.