snaileater Posted October 10, 2005 Posted October 10, 2005 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 ...
nfwu Posted October 14, 2005 Posted October 14, 2005 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 TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode()
snaileater Posted October 14, 2005 Author Posted October 14, 2005 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 endifsimple 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 ...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now