XeroFx Posted November 12, 2009 Posted November 12, 2009 Hello, im making a script that will enable me to create a hotkey that will enter some text with a single key. in the future i want to have a place to put your name, and a way to select a hotkey... but as of now i cant get it to work properly. when i use it it works, but i get this as teh result "1/11/09 Name - " it is not showing that it is november..... also after i use it, the shift key and alt key are locked... like they are still being pressed... do i have to use a keyup command? it has been a few years since i have messed with autoit, and im kinda rusty... please help me! im looking for the output to be: (along with the hotkeys not sticking) "11/11/09 Name - " ;this is a test script Global $sDate Global $sName Global $sYear HotKeySet("+!d", "cdatadate") ;Shift-Alt-d $sName = InputBox("Date Inserter", "Type your name.") $sYear = StringRight(@YEAR, 2) $sDate = String(@MON & "/" & @MDAY & "/" & $sYear) Opt("SendKeyDelay", 7) ;5 milliseconds Opt("SendKeyDownDelay", 2) ;1 millisecond While 1 Sleep(100) WEnd Func cdatadate() Send("" & $sDate & " " & $sName & " - ") HotKeySet("+!d") Send("+!d") HotKeySet("+!d", "cdatadate") EndFunc *** im on win7 x64, is this a possible problem with @MON?
XeroFx Posted November 17, 2009 Author Posted November 17, 2009 is there a solution? ive read into the problem somewhat, and the date call still looks correct to me, any help is much appreciated. thanks!
LarryDalooza Posted November 17, 2009 Posted November 17, 2009 Func cdatadate() Sleep(200) Send($sDate & " " & $sName & " - ",1) HotKeySet("+!d") Send("+!d") HotKeySet("+!d", "cdatadate") EndFunc try a sleep AutoIt has helped make me wealthy
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