Jump to content
Sign in to follow this  
Contilink96

suspending a script to type normal.

Recommended Posts

Contilink96

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

Share this post


Link to post
Share on other sites
vfear

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.

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  

×