Sign in to follow this  
Followers 0
Mr.Sniper

How do i make it so that any window will

3 posts in this topic

What i want to do is have a script run whether the window is open or not... and i tryed putting in the codes that are in the hlep file and i can only get it to work when the window is active... cuz lets say i want the internet to keep pushing refresh while i play a CD ROM game.... so i have the code:

$s = 15000
$i = 0
Do
    WinWait("Google - Microsoft Internet Explorer")
    Send("{BROWSER_REFRESH}")
    Sleep($s)
    $s = $s + 76
    $i = $i + 1
Until $i = 50
If $i = 50 Then
    MsgBox(48, "Script Done")
EndIf

so how do i make it so that will work whether the window is active or not??


Share this post


Link to post
Share on other sites



What i want to do is have a script run whether the window is open or not... and i tryed putting in the codes that are in the hlep file and i can only get it to work when the window is active... cuz lets say i want the internet to keep pushing refresh while i play a CD ROM game.... so i have the code:

$s = 15000
$i = 0
Do
    WinWait("Google - Microsoft Internet Explorer")
    Send("{BROWSER_REFRESH}")
    Sleep($s)
    $s = $s + 76
    $i = $i + 1
Until $i = 50
If $i = 50 Then
    MsgBox(48, "Script Done")
EndIf

so how do i make it so that will work whether the window is active or not??

<{POST_SNAPBACK}>

Try using ControlSend instead of Send but I do not know if it will work with Internet Explorer, you will just have to try it and see.


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

so how do i make it so that will work whether the window is active or not??

<{POST_SNAPBACK}>

$s = 15000
$i = 0
WinWait("Google - Microsoft Internet Explorer")
Do
    Send("{BROWSER_REFRESH}")
    Sleep($s)
    $s = $s + 76
    $i = $i + 1
Until $i = 50
If $i = 50 Then
    MsgBox(48, "Script Done")
EndIf

Edit: use the ControlSend as described in the last post rather than 'Send' above....

Edited by quaizywabbit

[u]Do more with pre-existing apps![/u]ANYGUIv2.8

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