Site hosted by Angelfire.com: Build your free website today!
Blog Tools
Edit your Blog
Build a Blog
RSS Feed
View Profile
« March 2006 »
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
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
  • View Latest Entries