autoitxp Posted January 14, 2006 Share Posted January 14, 2006 hi HotKeySet("{Esc}", "captureEsc") Func captureEsc() ; ... can do stuff here HotKeySet("{Esc}") Send("{Esc}") HotKeySet("{Esc}", "captureEsc") EndFunc when i try to send {SHIFT} it simply not works why and how to send shift key only Link to comment Share on other sites More sharing options...
Valuater Posted January 14, 2006 Share Posted January 14, 2006 (edited) hi HotKeySet("{Esc}", "captureEsc") Func captureEsc() ; ... can do stuff here HotKeySet("{Esc}") Send("{Esc}") HotKeySet("{Esc}", "captureEsc") EndFunc when i try to send {SHIFT} it simply not works why and how to send shift key only from help '+' This tells AutoIt to send a SHIFT keystroke, therefore Send("Hell+o") would send the text "HellO". Send("!+a") would send "ALT+SHIFT+a". {SHIFTDOWN} Holds the SHIFT key down until {SHIFTUP} is sent 8) Edited January 14, 2006 by Valuater Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 14, 2006 Moderators Share Posted January 14, 2006 (edited) Errr... your script doesn't even had {SHIFT} in it... Send('+') will send shift, but you'll have to manually click ctrl+shift to get it out of that... a better suggestion if you only want to send shift is to do this: Send('{SHIFTDOWN}') Sleep(5000) Send('{SHIFTUP}') Edit: Or RTM like Val said ... lol... Edited January 14, 2006 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted January 14, 2006 Share Posted January 14, 2006 and theres to of the same hotkeys .... for the same exact thing if u put the hotkey at the end to like recall the function u just use a loop Link to comment Share on other sites More sharing options...
autoitxp Posted January 14, 2006 Author Share Posted January 14, 2006 Thanks for helping me here is loop While 1 sleep(1000) WEnd HotKeySet("+-", "_Underscore") Func captureEsc() HotKeySet("+-") Send("_") HotKeySet("+-", "_Underscore") EndFunc Now when i hold shitkey and try to press multi underscore it not sending y is that and wat is proper solution Link to comment Share on other sites More sharing options...
Valuater Posted January 14, 2006 Share Posted January 14, 2006 first you need to set the hot key... before the while/wend loop HotKeySet("+-", "_Underscore") While 1 sleep(1000) WEnd Func captureEsc() HotKeySet("+-") Send("_") HotKeySet("+-", "_Underscore") EndFunc 8) Link to comment Share on other sites More sharing options...
HardCopy Posted January 14, 2006 Share Posted January 14, 2006 Now when i hold shitkey and try to press multi underscore it not sending y is that and wat is proper solutionAutoit wont except any old shit..... Sorry...I just couldnt resist that!! Contributions: UDF _DateYearFirstChildren are like Farts, you can just about stand your own.Why am I not a Vegetarian?...Well...my ancestors didn't fight & evolve to the Top of the food chain for me to survive on Salad Link to comment Share on other sites More sharing options...
autoitxp Posted January 14, 2006 Author Share Posted January 14, 2006 (edited) shitkey hahahaaha sorry its shift key by mistake im unable to hold shift key ya HotKeySet("+-", "_Underscore") While 1 sleep(1000) WEnd Func captureEsc() HotKeySet("+-") Send("_") HotKeySet("+-", "_Underscore") EndFunc kindly tell me how to hold shift and send multi underscore in this case Edited January 14, 2006 by autoitxp Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted January 14, 2006 Share Posted January 14, 2006 HotKeySet("{f1}", "captureEsc") HotKeySet("{ESC}", "Terminate") While 1 sleep(1000) WEnd Func captureEsc() while 1 send('{shiftdown}') Send("{-}") send('{shiftup}') wend EndFunc Func Terminate() Exit 0 EndFunc Link to comment Share on other sites More sharing options...
autoitxp Posted January 15, 2006 Author Share Posted January 15, 2006 well buddy when i press F1 it start flooding underscore it never {SHITUP} i think loop is problem any better solution Link to comment Share on other sites More sharing options...
Valuater Posted January 15, 2006 Share Posted January 15, 2006 well buddy when i press F1 it start flooding underscore it never {SHITUP} i think loop is problem any better solution exactly right!!! HotKeySet("{F1}", "captureEsc") HotKeySet("{ESC}", "Terminate") While 1 sleep(20) WEnd Func captureEsc() send('{shiftdown}') Send("{-}") send('{shiftup}') EndFunc Func Terminate() Exit 0 EndFunc 8) Link to comment Share on other sites More sharing options...
autoitxp Posted January 15, 2006 Author Share Posted January 15, 2006 Hello this code work fine but when i use {SHIFT UP} after send("-") it not not works and unable to send multiple underscore when i hold shitdown now what to do HotKeySet ( "+-" , "_under") While 1 sleep(1000) WEnd Func _under() HotKeySet ( "+-") send('{shiftdown}') send("-") HotKeySet ( "+-" , "_under" ) EndFunc Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted January 15, 2006 Share Posted January 15, 2006 lol i thought u wanted it to just constantly send it woops i just threw in shift up for fun dude uh why do u keep putting hotkeysets into your function when they are the same exact thing as it was to call the function? HotKeySet("+-", "_under") HotKeySet("{ESC}", "Terminate") While 1 sleep(20) WEnd Func _under() send('{shiftdown}') Send("{-}") send('{shiftup}') EndFunc Func Terminate() Exit 0 EndFunc Link to comment Share on other sites More sharing options...
Somerset Posted January 15, 2006 Share Posted January 15, 2006 why not just send("_") instead of send("+-") Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted January 15, 2006 Share Posted January 15, 2006 why not just send("_") instead of send("+-") cuz +- is the way he wants it idk we give him a script that works then he goes and changes it to something then says something that doesnt even have the thing hes talking about in his code such as when he said the shiftup wasnt working :-/ there was no shift up even in his code Link to comment Share on other sites More sharing options...
autoitxp Posted January 16, 2006 Author Share Posted January 16, 2006 (edited) dude uh why do u keep putting hotkeysets into your function when they are the same exact thing as it was to call the function? bec if user press shit+minus then im able to play sound file to user thats why im using shit+minus for call function now wat u think if i hold shiftdown this code never send continuous Underscore HotKeySet("+-", "_under") HotKeySet("{ESC}", "Terminate") While 1 sleep(1000) WEnd Func _under() send('{shiftdown}') Send("{-}") send('{shiftup}') EndFunc Func Terminate() Exit 0 EndFunc but this code send continuous underscore but after that shiftdown always press never up until i press shit key again now do u have any other solution dude HotKeySet ( "+-" , "_under") While 1 sleep(1000) WEnd Func _under() HotKeySet ( "+-") send('{shiftdown}') send("-") HotKeySet ( "+-" , "_under" ) EndFunc Edited January 16, 2006 by autoitxp Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted January 16, 2006 Share Posted January 16, 2006 bec if user press shit+minus then im able to play sound file to user thats why im using shit+minus for call function now wat u think if i hold shiftdown this code never send continuous Underscore HotKeySet("+-", "_under") HotKeySet("{ESC}", "Terminate") While 1 sleep(1000) WEnd Func _under() send('{shiftdown}') Send("{-}") send('{shiftup}') EndFunc Func Terminate() Exit 0 EndFunc but this code send continuous underscore but after that shiftdown always press never up until i press shit key again now do u have any other solution dude HotKeySet ( "+-" , "_under") While 1 sleep(1000) WEnd Func _under() HotKeySet ( "+-") send('{shiftdown}') send("-") HotKeySet ( "+-" , "_under" ) EndFunc I DONT SEE WHAT THE PROBLEM IS HOW IS THIS NOT WORKING HotKeySet("+-", "_under") HotKeySet("{ESC}", "Terminate") While 1 sleep(1000) WEnd Func _under() send('{shiftdown}') Send("{-}") send('{shiftup}') EndFunc Func Terminate() Exit 0 EndFunc please explain how this code isnt working .... cuz in ur code theres no shift up Link to comment Share on other sites More sharing options...
autoitxp Posted January 16, 2006 Author Share Posted January 16, 2006 (edited) okay sure i will show you check this code when i press 1 again and again it countinously play wav file. u check your self HotKeySet ( "1" , "_1") While 1 sleep(1000) WEnd Func _1() HotKeySet ( "1") send('1') SoundPlay(@WindowsDir & "\media\tada.wav") HotKeySet ( "1" , "_1" ) EndFunc okay Now when i use hotkey shit+minus and hold shift button and press - it simply not play continuous like above check your self this is my problem HotKeySet ( "+-" , "_under") While 1 sleep(1000) WEnd Func _under() HotKeySet ( "+-") send('{shiftdown}') send('-') SoundPlay(@WindowsDir & "\media\tada.wav") send('{shiftup}') HotKeySet ( "+-" , "_under" ) EndFunc any solution play wav file with shift+minus continuous Regards Edited January 16, 2006 by autoitxp Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 16, 2006 Moderators Share Posted January 16, 2006 (edited) Global $Change HotKeySet ( "+-" , "_under") While 1 Sleep(1000) WEnd Func _under() HotKeySet("+-", 'Change') $Change = 0 Local $Fsize = FileGetSize(@WindowsDir & "\media\tada.wav") / 100 Do SoundPlay(@WindowsDir & "\media\tada.wav") Sleep($Fsize) Until $Change = 1 HotKeySet ( "+-" , "_under") EndFunc Func Change() $Change = 1 EndFunc Edit: Used the File size in the Sleep(), so it should continue as soon as the sound has finished. Edited January 16, 2006 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
autoitxp Posted January 16, 2006 Author Share Posted January 16, 2006 kool code but now problem is this code block underscore key and im unable to send underscore now wat to do Link to comment Share on other sites More sharing options...
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