Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

HotkeySet, hold shift down and send right arrow

$
0
0
When I hold down F8, I want it to send shiftdown and hold down the right arrow. And same thing for F7, except left arrow instead of right. Is Send suitable for this or should I rather use IsPressed, or do they get the same thing done?

[ autoit ]      
#include <Misc.au3> HotKeySet("{F7}", "F7") HotKeySet("{F8}", "F8") HotKeySet("{F11}", "Terminate") While 1 Sleep (100) WEnd Func F8() Send ("{SHIFTDOWN}{RIGHT}") EndFunc Func Terminate() Exit 0 EndFunc

That's all I got because I am terrible with this. And I imagine I would have to send SHIFTUP upon release which makes this even more confusing to me.


EDIT:
[ autoit ]      
#include <Misc.au3> While If _IsPressed ("76") Then Send ("{SHIFTDOWN}{RIGHT}") EndIf WEnd

Or how about that?

I'm a bit confused how to release shift still, too.


EDIT 2: Or dis?

[ autoit ]      
#include <Misc.au3> While 1        If _IsPressed ("76") Then       Send ("+{LEFT}")      EndIf WEnd While 1        If _IsPressed ("77") Then       Send ("+{RIGHT}")      EndIf WEnd

Both don't work at same time though. hmm..

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>