Script for continous scrolling, using screen borders as activator. Autostumbling, autoscrolling if cursor is passive.
I post the script here since I don't know how to append an .exe file. Screen size is fixed and not read by the script.
The position of the stumble button is read at the first instance after pushing the Hotkey. You are advised to push the stumble button(reads the coordinates for this script session), to start the script. Pause the script by pushing Esc, resume by pushing Esc again. I will post an imagine showing the activator areas of the screen.
And I will make an exe file for the script, so it becomes a stand alone application.
Here is code for StumbleAutoScroll v1.0
F9:: ;Expl. Hotkey F9 starts stumbling
MsgBox,,,Push Stumble button!,0.7
KeyWait, LButton, D
MouseGetPos, xpos, ypos
xpos_= %xpos%
ypos_= %ypos%
sleep 2500
Loop
{
downpage = 0
MouseClick, left, xpos_, ypos_,,0 ; x/y coordinates for stumble button
Mousemove, 1000, 400, 0
sleep 5000
Loop 2 ;two-timing loop
{
loop 40
{
MouseGetPos, xpos, ypos
if(ypos=400 && xpos=1000)
scroll_down(0.25)
else
{
sleep 100
break
}
}
loop ;pause from stumbling loop
{
if(xpos < 1023)
{
check_for_pause()
loop ;fast scroll loop
{
MouseGetPos, xpos, ypos
if(ypos<10)
{
if(xpos<400)
scroll_down(0.040)
else if(xpos<600)
scroll_down(1.4)
else
scroll_up(0.150)
}
else if(ypos>760)
{
if(xpos<400)
scroll_up(0.040)
else if(xpos<600)
scroll_down(1.4)
else
scroll_down(0.150)
}
else
{
}
break
} ;end fast scroll loop
loop ;loop reading scroll speed
{
MouseGetPos, xpos, ypos
if(xpos < 10)
{
if(ypos>650 && %downpage% = 0)
{
scroll_a_page()
downpage = 1
}
else if(ypos<650 && xpos<10)
{
downpage=0
if(ypos<180)
scroll_down(3)
else if(ypos<350)
scroll_down(1.5)
else if(ypos<500)
scroll_down(1)
else if(ypos<650)
scroll_down(0.5)
}
}
else
{
downpage = 0
break
}
} ;end loop reading scroll spead
}
if(xpos > 1022 or (ypos=400 && xpos=1000)) ;stumble rightmost screen space
{
sleep 150
MouseGetPos, xpos
if(xpos > 1020 or (ypos=400 && xpos=1000))
break
}
} ;end pause from stumbling loop
} ;end two-timing loop
}
;*****Functions*****
scroll_up(sleep_)
{
Send {up}
KeyWait, Esc, D, T%sleep_%
if(ErrorLevel = 0)
pause_script()
return
}
scroll_a_page()
{
Send {pgdn}
KeyWait, Esc, D, T0.1
if(ErrorLevel = 0)
pause_script()
return
}
scroll_down(sleep_)
{
Send {down}
KeyWait, Esc, D, T%sleep_%
if(ErrorLevel = 0)
pause_script()
return
}
check_for_pause()
{
KeyWait, Esc, D, T0.1
if(ErrorLevel = 0)
pause_script()
return
}
pause_script()
{
MsgBox,,,Paused scroll script!,1
errorlevel = 1
KeyWait, Esc, D
if(ErrorLevel = 0)
{
errorlevel = 1
MsgBox,,,Resumed scroll script!,1
return
}
}