Jump to content
Sign in to follow this  
flick

if_ispressed help

Recommended Posts

flick

how can i make a key hold down another key(not tapping it) only when i'm holding down the key?

i.e. when i hold down f1 f2 is held down, and released when i let go of f1

Share this post


Link to post
Share on other sites
Psibernetic

Something like this may be what you need.

#include <Misc.au3>

HotKeySet ( "{F1}", _HoldF2() )

Func _HoldF2()
    While _isPressed(70)
        Send("{F1 down}")
    WEnd
    
    Send("{F1 up}")
    Return 1
EndFunc

I didn't test this. Far too much work to write a reader to detect which keys are being pressed for a help post, but this should get you off on the right track regardless.


[sup]Psibernetic[/sup]My Creations:X-HideSecuracy

Share this post


Link to post
Share on other sites
flick

thanks

when i try to change F2 to another key(p for example) i get some error, is there a way to change the hotkey?

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  

×