Jump to content

Recommended Posts

Posted

I was wondering if it was possible to add a right click (hold) and move it from the left side of the screen to the right side of the screen(and repeat) to this script.

HotKeySet("{F11}", "Start"); F11 starts and stops the key sending
HotKeySet("{ESC}", "Quit"); ESC exits the script

Global $Bool = False

MsgBox(0, "Script Started", "Script has started although not sending Keypresses yet!")

While 1
    If $Bool Then
        Send("{TAB}")
        Sleep(3000)
        Send("{F1}")
        Sleep(3500)
        Send("{F2}")
        Send("{F2}")
        Send("{F2}")
        Send("{F2}")
        Send("{F2}")
        Send("{F2}")
    EndIf
    Sleep(5)
WEnd

Func Start()
    $Bool = Not $Bool
    MsgBox(0, "Kepresses will start", "Keypresses will start sending after you click OK.")
EndFunc  ;==>Start

Func Quit()
    MsgBox(0, "Exiting", "Esc was pushed exiting the script. ")
    Exit
EndFunc  ;==>Quit

I am entirely new at coding so be nice to me :-]

Thanks!

Posted (edited)

MouseMove (0, 50, 1)
MouseDown ("right")
MouseMove (@DesktopWidth, 0)
MouseUp ("right")

That moves the screen

Edit: you might want to slow the movement speed depending on the game you are playing.

Edited by sccrstvn93
Posted

Oh man! Thanks for your help! Btw I was wondering...

Could it be possible to run the above and then have a timer of about every 5 minutes to press F3 and continue to run the above.

Is that a bit confusing?

Posted (edited)

Yeh

sleep (# of miliseconds)
Send ("{f3}")

You should take a look in the help file. And by the above do you mean my code or your code?

Edited by sccrstvn93
Posted

Oh I have taken a look and I am familiar somewhat with the commands.

BTW the code you provided looks like it just does the above while loop only once and then presses F3. I wanted the while loop to continuously loop and every 5 minutes press F3.

P.S. I ment my code.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...