Jump to content
Sign in to follow this  
twioh

Complete noob, need help with simple script

Recommended Posts

twioh

HotkeySet('{esc}','_Terminate')


THIS PART BELOW
While 1
    Sleep(1)
    MouseWheel ( "up" , 1 )
    MouseWheel ( "down" , 1 )
Wend
THIS PART ABOVE



Func _Terminate()
     Exit
Endfunc

What I want to have it do is when I press and hold down the space bar, it repeats the part marked by the this part below/this part above. I tried searching for the IsPressed command in the help file of the latest beta but couldn't find it.

Help would be greatly appreciated.

Edited by twioh

Share this post


Link to post
Share on other sites
lolp1

Search "pressed" and it is the second function down.

Share this post


Link to post
Share on other sites
cppman

this what your looking for?

#include <misc.au3>
HotkeySet('{esc}','_Terminate')

While 1
    Sleep(100)
    _SpacePress()
WEnd


Func _SpacePress()
    While _IsPressed('20')
        Sleep(1)
        MouseWheel ( "up" , 1 )
        MouseWheel ( "down" , 1 )
    Wend
EndFunc

Func _Terminate()
     Exit
Endfunc

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  

×