Sign in to follow this  
Followers 0
autoitxp

HotKeySet

25 posts in this topic

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 :lmao:

Share this post


Link to post
Share on other sites



#2 ·  Posted (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 :lmao:

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 by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

#3 ·  Posted (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 by SmOke_N

[center]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.[/center]

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Thanks for helping me

here is loop

While 1
sleep(1000)
WEnd



HotKeySet("+-", "_Underscore")
Func captureEsc()
    HotKeySet("+-")
    Send("_")
    HotKeySet("+-", "_Underscore")
EndFunc

:lmao: Now when i hold shitkey and try to press multi underscore it not sending y is that and wat is proper solution ;)

Share this post


Link to post
Share on other sites

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)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Now when i hold shitkey and try to press multi underscore it not sending y is that and wat is proper solution

Autoit wont except any old shit..... :lmao:

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

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

shitkey :lmao: hahahaaha sorry its shift key o:) 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 by autoitxp

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

well buddy when i press F1 it start flooding underscore it never {SHITUP} i think loop is problem any better solution

Share this post


Link to post
Share on other sites

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)


NEWHeader1.png

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

lol i thought u wanted it to just constantly send it :lmao: 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

Share this post


Link to post
Share on other sites

why not just

send("_")

instead of

send("+-")

:lmao:


 

Spoiler

shoot_zpsfd329d66.png
dontbelieveeverythingyouthink_zps0e1e900

Madness is the first step to understanding...

Share this post


Link to post
Share on other sites

why not just

send("_")

instead of

send("+-")

:lmao:

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

Share this post


Link to post
Share on other sites

#16 ·  Posted (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 :lmao:

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 by autoitxp

Share this post


Link to post
Share on other sites

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 :lmao:

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

Share this post


Link to post
Share on other sites

#18 ·  Posted (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 by autoitxp

Share this post


Link to post
Share on other sites

#19 ·  Posted (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 by SmOke_N

[center]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.[/center]

Share this post


Link to post
Share on other sites

kool code but now problem is this code block underscore key and im unable to send underscore now wat to do

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  
Followers 0