Jump to content

Recommended Posts

Posted

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 ...

Posted

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
Posted

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 ...

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...