Running script in background
Posted: 25 Jan 2016, 11:09
I have a website that I collect large amounts of data from. This site is set up so that as long as the page is scrolled to the bottom of the page, the data continues to load. I have this script that scrolls down 40 clicks down every 3 seconds that keeps this page at the bottom. The loop breaks when an certain image is found on this page that indicates there is no more data or I press the right Alt key. It seems to all work fine as long as this web page is active and on top of my screen. Is there a way where I can start this process and while data is being downloaded I can make other screens active and do other work and occasionally go back to this screen and check process. In other similarly post I am seeing mention of using the Control command that I have been experimenting with but without any success.
KeyWait Alt
Soundbeep
While !GetKeyState("Alt","P")
{
CoordMode, Pixel, Window
ImageSearch, FoundX, FoundY, -1750,750,1775,960, *125 %A_Desktop%\Daily Transfer\.png AutoHotKey Images\End.PNG
if ErrorLevel = 0
{
Break
}
Loop 40 ;Scroll to bottom of page
Click WheelDown
Sleep 3000
}
Soundbeep, 900, 1000
KeyWait Alt
Soundbeep
While !GetKeyState("Alt","P")
{
CoordMode, Pixel, Window
ImageSearch, FoundX, FoundY, -1750,750,1775,960, *125 %A_Desktop%\Daily Transfer\.png AutoHotKey Images\End.PNG
if ErrorLevel = 0
{
Break
}
Loop 40 ;Scroll to bottom of page
Click WheelDown
Sleep 3000
}
Soundbeep, 900, 1000