Sign in to follow this  
Followers 0
darktemplar31

360 Degree Control in Game

5 posts in this topic

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!

Share this post


Link to post
Share on other sites



#2 ·  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

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

#4 ·  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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0