Hi!
I couldn't find any help while searching so I figure I have to make my own post.
While writing a script I need to have the shift-key being pressed down and while shift is pressed button D must be pressed. So, basicly I need Shift+d to be pressed but Shift must be pressed before the D button. Don't ask me why but the system doesn't work iif the are pressed at the same time.
Does anyone know how to make this work?
Please help me!
Having the Shift key pressed while pressing other button.
Re: Having the Shift key pressed while pressing other button.
send, {Shift Down}
Send, d
Send, {Shift Up}
perhaps
Send, d
Send, {Shift Up}
perhaps
Re: Having the Shift key pressed while pressing other button.
Tried it but it won't work. Any other idea?
Re: Having the Shift key pressed while pressing other button.
works for me, does it need to be on a active window or so? perhaps first activate that window before you send this
if i use the keyboard hook i can see it works see attachment
if i use the keyboard hook i can see it works see attachment
- Attachments
-
- 2.jpg (109.51 KiB) Viewed 1236 times
Re: Having the Shift key pressed while pressing other button.
Ahh... I see that it works but there must be some kind of problem with the program that I'm running it in. Hmm.... Thanks for the help though.
Re: Having the Shift key pressed while pressing other button.
try to put something like this before the shift d stuffStraut wrote:Ahh... I see that it works but there must be some kind of problem with the program that I'm running it in. Hmm.... Thanks for the help though.
Code: Select all
IfWinExist, ahk_class yourwindowname
WinActivate
Re: Having the Shift key pressed while pressing other button.
Yes, I've included those lines and the whole script runs perfectly until those lines. Just noticed that I had to add a loop for it to work. Dunno why though. But it works.
Re: Having the Shift key pressed while pressing other button.
nice glad i could help
Who is online
Users browsing this forum: FanaticGuru, yabab33299 and 141 guests