Jump to content

HotKeySet


 Share

Recommended Posts

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:

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • Moderators

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

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

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 ;)

Link to comment
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

Link to comment
Share on other sites

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
Link to comment
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

Link to comment
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
Link to comment
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
Link to comment
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
Link to comment
Share on other sites

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
Link to comment
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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

  • Moderators

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

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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...