Jump to content
Sign in to follow this  
Hijikata

Modifier Keys staying on....

Recommended Posts

Hijikata

im trying to write this script that types out a line depending upon what hot key i set.... but the problem is i am using ctrl+shift+(a letter) and the ctrl and shift keys are acting like they are pressed down AFTER they line is written.

here is my code:

#Include <Date.au3>

Global $Date = _NowCalcDate( )
Global $hvac
Global $kit
Global $cab
Global $win

HotKeySet("^+u","hvac")
HotKeySet("^+i","cab")
HotKeySet("^+o","kit")
HotKeySet("^+p","win")

While 1
    sleep(100)
WEnd


Func hvac()
    Send($Date)
    Send(" hvac nono 12m sears apprvd p+9.4% ca Alex",1)
    Send("{Enter}")
EndFunc

Func kit()
    Send($Date)
    Send(" kit nono 12m sears apprvd p+9.4% ca Alex",1)
    Send("{Enter}")
EndFunc

Func cab()
    Send($Date)
    Send(" cab nono 12m sears apprvd p+9.4% ca Alex",1)
    Send("{Enter}")
EndFunc

Func win()
    Send($Date)
    Send(" win nono 12m sears apprvd p+9.4% ca Alex",1)
    Send("{Enter}")
EndFunc

thanks for any help

Share this post


Link to post
Share on other sites
tannerli

i have once experienced the same thing, I didn't find the Problem, but you could send Shift-Up and Ctrl-Up at the end of the functions as a (temporary) workaround

Maybe some of the geeks here know the problem better than me

Share this post


Link to post
Share on other sites
tannerli

Strange, when I had the problem, it worked well...

but maybe it's better when we solve it at the cause of the problem. Sorry I couldn't help

Share this post


Link to post
Share on other sites
picaxe

Try this, there's probably a better way but its works for me with notepad/wordpad/word

#Include <Date.au3>

Global $Date = _NowCalcDate( )
Global $hvac
Global $kit
Global $cab
Global $win

HotKeySet("^+u","hvac")
HotKeySet("^+i","cab")
HotKeySet("^+o","kit")
HotKeySet("^+p","win")

While 1
    sleep(100)
WEnd

Func hvac()
    Send($Date)
    Send(" hvac nono 12m sears apprvd p+9.4% ca Alex",1)
    Send("{Enter}{CTRLDOWN}{SHIFTDOWN}")
    Send("{CTRLUP}{SHIFTUP}")
EndFunc

Func kit()
    Send($Date)
    Send(" kit nono 12m sears apprvd p+9.4% ca Alex",1)
    Send("{Enter}{CTRLDOWN}{SHIFTDOWN}")
    Send("{CTRLUP}{SHIFTUP}")

EndFunc

Func cab()
    Send($Date)
    Send(" cab nono 12m sears apprvd p+9.4% ca Alex",1)
     Send("{Enter}{CTRLDOWN}{SHIFTDOWN}")
    Send("{CTRLUP}{SHIFTUP}")
EndFunc

Func win()
    Send($Date)
    Send(" win nono 12m sears apprvd p+9.4% ca Alex",1)
    Send("{Enter}{CTRLDOWN}{SHIFTDOWN}")
    Send("{CTRLUP}{SHIFTUP}")
EndFunc

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.