Jump to content
Sign in to follow this  
Honto

Pause

Recommended Posts

Honto

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 by Honto

Share this post


Link to post
Share on other sites
MerkurAlex

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]

Share this post


Link to post
Share on other sites
Honto

Nevermind, I should have looked better, just found out which is which now.

thanks for helping Eagleclaw.

Edited by Honto

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.