Sign in to follow this  
Followers 0
snaileater

Question about "troyzilla" ...

3 posts in this topic

just a simple (?) question for those who made some experiments with the nice script of "trickytroy" :

i hope my question is not too dumb ... :

is there any way to initiate a data exchange between the autoit application and the embedded browser ?

for example i would like to close the whole autoit application by clicking a button located in the webpage ... is it possible ? (a button or a link containing code like a javascript "window.close" ...)

thanks in advance ...

Share this post


Link to post
Share on other sites



try using a javascript alert command like:

<a href="does_not_exist.html" onclick="javascript:void(alert("CLOSE_AUTOIT3_APP_NOW"));return false;">Click to close</a>

then make the script close when it detects this window:

if WinActive("", "CLOSE_AUTOIT3_APP_NOW")
   Send("{ENTER}")
  ;some code to end the script
endif

Share this post


Link to post
Share on other sites

try using a javascript alert command like:

<a href="does_not_exist.html" onclick="javascript:void(alert("CLOSE_AUTOIT3_APP_NOW"));return false;">Click to close</a>

then make the script close when it detects this window:

if WinActive("", "CLOSE_AUTOIT3_APP_NOW")
   Send("{ENTER}")
 ;some code to end the script
endif
simple but effective ... in fact the winactive command doesn't seem to be able to detect the 'window' opened with the javascript alert command (is it a normal behaviour ?) but a window opened with a window.open javascript command works great ...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0