Sign in to follow this  
Followers 0
Overide

trying to create small macro to replace n52 speedpad

3 posts in this topic

i recently lost track of my nostromo n52 speedpad when i moved to a new place and remembered hearing about autoit a while ago so i figured i would give it a look. well, there is so much info that i am lost.

what i am trying to do, if possible, is create a toggle key combination (would be called the hotkey, i guess?)to cycle through the use of a couple of keypresses with delays inbetween which would then repeat itself until i press the key combination again.

so something like:

i press ctrl-alt-/ (i think this would be represented as "^!/"?)

send numpad 1 (represented as {NUMPAD1}?)

wait 4 seconds

send numpad 2 ({NUMPAD2})

wait 10 seconds

send numpad 3 ({NUMPAD3})

wait 4 seconds

repeat cycle until i press ctrl-alt-/ again

now, i am aware of the loop commands but i am having trouble figuring out which one i should use and how to get it to work off a toggle. or would it be a simple loop with a hotkey working as the toggle? i could have sworn i came across the delay thing but i have since closed the help file and can't find it again. also, is it possible to put a delay in the keysend? as in press and hold numpad 1 for 3 seconds?

any help is greatly appreciated.

Share this post


Link to post
Share on other sites



HotKeySet('^!/', 'SpeedPad')
HotKeySet('{ESC}', '_EXIT')
Dim $fLoop = False

While 1
    Sleep(20)
WEnd

Func SpeedPad()
    $fLoop = Not $fLoop
    ToolTip('Processing...', @DesktopWidth-70, 0)
    
    While $fLoop
        ;Do something
        Sleep(20)
    WEnd
    
    ToolTip('')
EndFunc

Func _EXIT()
    Exit
EndFunc
thank you Authenticity! i think i have gotten it working for what i need it to do. understanding all that you did there will take me a little longer.

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