Jump to content

Recommended Posts

Posted

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:

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

  • Moderators
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

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.

Posted

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

Posted

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

Posted

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

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
Posted

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

Posted

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

Posted

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
Posted

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
Posted

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
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
Posted

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

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
  • Moderators
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

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.

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
×
×
  • Create New...