Contilink96 Posted October 30, 2011 Posted October 30, 2011 I have a script which pulls different keys all onto the 'e' key but sometimes i need the 'e' key to be just an 'e'; how do i add a toggle on/off or pause? It hijacks my 'e' key across all applications because i run it as admin. I am a scripting novice, but I am learning quickly and help will be appreciated. Here is the script: Global $wTitle = "programname"; WinWaitActive($wTitle) global $rayCycle = "e" HotKeySet($rayCycle, "rayCycle") global $cycle = 0 global $ray1 = "{u}" global $ray2 = "{i}" global $ray3 = "{o}" global $ray4 = "{;}" global $ray5 = "{'}" global $ray6 = "{\}" global $ray7 = "{l}" Sleep(3000) While 1 sleep(100) WEnd Func rayCycle(); if $cycle > 6 Then $cycle = 0 endif if $cycle == 0 Then send($ray1) endif if $cycle == 1 Then send($ray2) endif if $cycle == 2 Then send($ray3) endif if $cycle == 3 Then send($ray4) endif if $cycle == 4 Then send($ray5) endif if $cycle == 5 Then send($ray6) endif if $cycle == 6 Then send($ray7) endif $cycle = $cycle + 1 EndFunc
JohnOne Posted October 31, 2011 Posted October 31, 2011 The answer lies in the "Remarks " section of the hotkeyset function in the help file. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
vfear Posted October 31, 2011 Posted October 31, 2011 Make a IF statement in the script to check and see if the process is running so it doesn't go through to all of your other applications.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now