any idea why?
Code: Select all
!Up:: ;draw UP arrow to mark OPEN position and date
Click Middle
SendInput {down 7}{Enter}
Sleep 100
Send {Control Down}
Click
Mousemove 30,100,,R
Click
Send {Control Up}
return
Code: Select all
!Up:: ;draw UP arrow to mark OPEN position and date
Click Middle
SendInput {down 7}{Enter}
Sleep 100
Send {Control Down}
Click
Mousemove 30,100,,R
Click
Send {Control Up}
return
Code: Select all
!Up:: ;draw UP arrow to mark OPEN position and date
Send {Blind}{Alt Up} ;release alt so it doesn't interfere with control ;use blind in case it's held down physically (that would cause it to be in the "Down" state again).
Click Middle
SendInput {down 7}{Enter}
Sleep 100
Send {Blind}{Control Down} ;honestly not sure exactly why {Blind} makes it work, but it does!
Click
Mousemove 30,100,,R ;i just learned that MouseMove is essentially a Send command in disguise. that means it will release modifier keys if they are held down, just like Send. But that doesn't explain why Blind makes it work.
Click
Send {Blind}{Control Up}
return
Code: Select all
!Up:: ;draw UP arrow to mark OPEN position and date
Send {Blind}{Alt Up} ;release alt so it doesn't interfere with control ;use blind in case it's held down physically (that would cause it to be in the "Down" state again).
Click Middle
SendInput {down 7}{Enter}
Sleep 100
Send {Control Down} ;Click doesn't release modifiers, so Blind isn't needed
Click
Click 30 100 Relative
Send {Control Up}
return
Code: Select all
#If WinActive("ahk_exe IDMan.exe")
^k::
Send {Blind}{Ctrl Up}
Send !do
Sleep 300
Send {Blind}{Ctrl Down}
SendInput {tab}
Sleep 100
SendInput {tab}
Send {Blind}{Ctrl Up}
SendInput {tab 4}
return
Code: Select all
#If WinActive("ahk_exe IDMan.exe")
^k::
Send !do ;the Send command releases any currently-held-down modifiers automatically and un-releases them when done, so no need to release Control unless you use {Blind}. Sorry I made things confusing with the first script's comments.
Sleep 300
SendInput ^{tab}
Sleep 100
SendInput ^{tab}{tab 4}
return
The above was my original script but it couldn't work without Blind command (i.e. control doesn't get held down..)Ianizer wrote: ↑27 Jul 2021, 10:28You could merge some Send commands together like so:Something I should clarify: {Blind} usually isn't needed with Send, but for unknown (to me) reasons, if you want Control to be held down before and after using a MouseMove command, you need to use {Blind}.Code: Select all
#If WinActive("ahk_exe IDMan.exe") ^k:: Send !do ;the Send command releases any currently-held-down modifiers automatically and un-releases them when done, so no need to release Control unless you use {Blind}. Sorry I made things confusing with the first script's comments. Sleep 300 SendInput ^{tab} Sleep 100 SendInput ^{tab}{tab 4} return
The above was my original script but it couldn't work without Blind command (i.e. control doesn't get held down..)Ianizer wrote: ↑27 Jul 2021, 10:28You could merge some Send commands together like so:Something I should clarify: {Blind} usually isn't needed with Send, but for unknown (to me) reasons, if you want Control to be held down before and after using a MouseMove command, you need to use {Blind}.Code: Select all
#If WinActive("ahk_exe IDMan.exe") ^k:: Send !do ;the Send command releases any currently-held-down modifiers automatically and un-releases them when done, so no need to release Control unless you use {Blind}. Sorry I made things confusing with the first script's comments. Sleep 300 SendInput ^{tab} Sleep 100 SendInput ^{tab}{tab 4} return
Users browsing this forum: mmflume, yabab33299 and 129 guests