Jump to content

Complete noob, need help with simple script


twioh
 Share

Recommended Posts

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
Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

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