Honto Posted November 28, 2007 Share Posted November 28, 2007 (edited) Hi, I've started using autoIT a few days ago and have always find the answers to my question on this forum or in the AutoIT help but now I'm stuck at something. I've made a script that automatic browsers over 4 things but I want to insert something which can pause the whole thing, so I can watch the page closely or maybe fill something in. my script goes like CODE#include <IE.au3> _IECreate ("page") _IECreate ("page") _IECreate ("page") While 1 if not WinActivate ("page") then WinActivate ("page") sleep(14000) if not WinActivate ("page") then WinActivate ("page") sleep(4000) if not WinActivate ("page") then WinActivate ("page") sleep(4000) if not WinActivate ("page") then WinActivate ("page") sleep(4000) WEnd I have removed the URL/Names because as intern of the company for who I'm making this script might not like that. anyways my question was how do I pause to whole thing, I've tried putting Global $Paused HotKeySet("{PAUSE}", "TogglePause") above my script but it gives an error: ERROR: TogglePause(): undefined function. HotKeySet("{PAUSE}", "TogglePause") any help with the script itself or pointing me in the right direction will be appriciated. Edited November 28, 2007 by Honto Link to comment Share on other sites More sharing options...
MerkurAlex Posted November 28, 2007 Share Posted November 28, 2007 CODE#include <IE.au3> hotkeyset("{PAUSE}", "TogglePause") _IECreate ("page") _IECreate ("page") _IECreate ("page") global $Paused=0 While 1 if $Paused=0 then if not WinActivate ("page") then WinActivate ("page") sleep(14000) if not WinActivate ("page") then WinActivate ("page") sleep(4000) if not WinActivate ("page") then WinActivate ("page") sleep(4000) if not WinActivate ("page") then WinActivate ("page") sleep(4000) endif WEnd func TogglePause() if $Paused=0 then $Paused=1 elseif $Paused=1 then $Paused=0 endif endfunc Is that what you were looking for? [quote name='PsaltyDS' post='635433' date='Jan 27 2009, 07:04 AM']Larry is a mass murderer?! It's always the quiet, clean cut, bald guys... [/quote] Link to comment Share on other sites More sharing options...
Honto Posted November 28, 2007 Author Share Posted November 28, 2007 (edited) Nevermind, I should have looked better, just found out which is which now. thanks for helping Eagleclaw. Edited November 28, 2007 by Honto Link to comment Share on other sites More sharing options...
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