Site hosted by Angelfire.com: Build your free website today!
Blog Tools
Edit your Blog
Build a Blog
RSS Feed
View Profile
« January 2009 »
S M T W T F S
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
Entries by Topic
All topics  «
Macromedia
You are not logged in. Log in
Scripts
Monday, 20 March 2006
StumbleAutoScroll v1.01
F9:: ;Expl. Hotkey F9 starts stumbling
SetTitleMatchMode, slow
IfWinExist, StumbleUpon
{
WinActivate ; use the window found above
MsgBox,,,Push Stumble button!,0.8
}
else
{
run http://www.stumbleupon.com/
sleep 2500
MsgBox,,,Push Stumble button!,1.2
}



loop
{
KeyWait, LButton, D
MouseGetPos, xpos, ypos
if(ypos<120 && errorlevel=0)
{
xpos_= %xpos%
ypos_= %ypos%
errorlevel=1
sleep 5000
break
}
}
Loop ;loop new stumble..until press Esc
{

sleep_counter_passive = 1.2
MouseClick, left, xpos_, ypos_,,0 ; x/y coordinates for stumble button
Mousemove, 950, 400, 0

sleep 5000
Loop 2 ;two-timing loop
{
loop 50 ;loop passive scrolling
{

if(sleep_counter_passive < 0.002) ;Sets scroll speed decrement
{
scroll_down(0.06, 50)
scroll_down(0.01, 200)
sleep_counter_passive =0.9
Send {Home}
scroll_down(0.06, 6)
sleep 4000
}

else if(sleep_counter_passive < 0.2)
sleep_counter_passive :=sleep_counter_passive-0.0025

else if(sleep_counter_passive < 0.4)
sleep_counter_passive :=sleep_counter_passive-0.01

else if(sleep_counter_passive < 0.7)
sleep_counter_passive :=sleep_counter_passive-0.08

else ;if(sleep_counter_passive < 1.2)
sleep_counter_passive :=sleep_counter_passive-0.26 ;end Sets scroll speed decrement

MouseGetPos, xpos, ypos
if(ypos=400 && xpos=950)
scroll_down(sleep_counter_passive, 1)
else
{
sleep 100
break
}
;if(counter>51)
;MsgBox, ,,%sleep_counter_passive% och %counter%,6

} ;end loop passive scrolling

loop ;pause from stumbling loop
{
if(xpos < 1023)
{

check_for_pause()
loop ;loop top/bottom screen
{
MouseGetPos, xpos, ypos

if(ypos<10) ;top screen border
{
if(xpos<400)
scroll_down(0.040, 1)
else if(xpos<600)
scroll_down(1.4, 1)
else
scroll_up(0.040)
}

else if(ypos>760) ;bottom screen border
{
if(xpos<400)
scroll_up(0.040)
else if(xpos<600)
scroll_down(1.4, 1)
else
scroll_down(0.040, 1)
}

else
break

} ;end ;loop top/bottom screen

loop ;loop reading scroll speed(left side)
{

MouseGetPos, xpos, ypos
if(xpos < 10)
{

if(ypos>650) ;mouseclick down left side, pgdn
{
KeyWait, LButton, D, T1
if(ErrorLevel = 0)
{
scroll_a_page()
errorevel=1
break
}
} ;end mouseclick down left side, pgdn

else if(ypos<650 && xpos<10) ;adjust read scroll speed
{
downpage=0
if(ypos<180)
scroll_down(3, 1)
else if(ypos<350)
scroll_down(1.5, 1)
else if(ypos<500, 1)
scroll_down(1, 1)
else if(ypos<650)
scroll_down(0.5, 1)
} ;end adjust read scroll speed
}

else
break

} ;end loop reading scroll spead(left side)

}

if(xpos > 1022 or (ypos=400 && xpos=950)) ;stumble rightmost screen space
{
sleep 150
MouseGetPos, xpos
if(xpos > 1020 or (ypos=400 && xpos=950))
break
}
} ;end pause from stumbling loop
} ;end two-timing loop
} ;end loop new stumble..until press Esc

;*****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_, loop_)
{
loop %loop_%
{
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
}
}

Posted by planet/macro_examples at 12:09 AM CET
Post Comment | Permalink | Share This Post
Sunday, 19 March 2006
StumbleAutoScroll v1.0
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.
  • Autostumble after 30 sec if cursor not moved from start position.
  • Left, top, bottom screen borders are the activators of the various autoscroll speeds.
  • Right screen border, if hit; stumble.

    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
    }
    }

    Posted by planet/macro_examples at 3:16 PM CET
    Post Comment | Permalink | Share This Post
  • Saturday, 18 March 2006
    Auto scrolling and auto stumbling
    Install AutoHotKey.
    Copy/paste the script code below into a text file. Change the ending of the file from .txt to .ahk. Change the position of the stumble button to where your button is. You can place the .ahk file where ever you want, as long as it's on your computer. When you wish to run the script just doubleclick the file, and than push hotkey F9.
    Script looks like this.

    F9:: ;Expl. Hotkey F9 starts stumbling
    Loop 30
    {
    MouseClick, left, 470, 35 ;Expl. my x/y coordinates for stumbe button
    Mousemove, 1010, 650
    loop 5
    {
    Send {Down}
    sleep 300
    }

    sleep 2000
    Loop 5
    {

    loop 15
    {
    MouseGetPos, xpos
    Send {Down}
    Send {Down}
    Send {down}
    Send {down}

    if(xpos>1020 )
    {
    break
    }

    if(xpos<920 )
    {
    break
    }

    sleep 200
    }

    loop ;Expl. Waits here if cursor in 90% leftmost screen spcace
    {
    if(xpos < 920)
    {
    sleep 2000
    MouseGetPos, xpos
    }
    else ;Expl. Continues if you move to 10% rightmost screen space
    break
    }

    if(xpos>1020 ) ;Expl. Stumbles if you press space or hit right screen border
    {
    break
    }
    KeyWait, Space, D, T2 ;explanation, press space-->stumble(an alternative stumble)
    if(ErrorLevel = 0)
    {
    break
    }

    }

    }

    Posted by planet/macro_examples at 5:12 AM CET
    Post Comment | Permalink | Share This Post

    Newer | Latest | Older