我只想让这个循环在LButton关闭时运行,在LButton启动时停止运行。代码在LButton关闭时运行,但当我将手指从左键上移开时,它继续运行。 mem:=0
~*LButton::
Sleep, 100
KeyWait, LButton, T0.10
If ErrorLevel = 1
{
While GetKeyState("LButton","P")
Loop {
GetKeyState, state, LButton, P
If state = U
Break
MouseGetPos, xpos, yp
我正在挣扎于一个脚本,该脚本通过鼠标在FireFox、Acrobat和另外一个程序中监视选择,然后将此选择复制到剪贴板并根据regex对其进行更改。每个程序都需要另一个正则表达式。每个脚本作为一个单独的程序工作,但当我合并它们时,复制的文本不会根据我的regex进行更改。
Acrobat脚本:
#ifWinActive ahk_class AcrobatSDIWindow
~LButton::
now := A_TickCount
while GetKeyState("LButton", "P")
continue
if (A_TickCount-now
在Windows资源管理器中,我希望执行以下操作:
当我按下并按住鼠标-右键:自动热键等待鼠标-左键单击运行动作
当我按下但释放鼠标右键(正常右击):运行普通Windows菜单
问题就在鼠标按键的按键上。我搞不懂。也许有人已经有类似的剧本了。
#IfWinActive ahk_class CabinetWClass
RButton::
Loop
{
GetKeyState, state, RButton
if state = D
KeyWait, LButton, D
send {Del}
if state = U
return
}
Cli
我就快到了,但是我的扳机不能启动。我希望能够将当前正在拖动(活动)的窗口捕捉到屏幕的四分之一,方法是在拖动时单击鼠标右键。它应该会捕捉到鼠标当前所在屏幕的四分之一。触发器就是我觉得我缺少的东西:当我释放鼠标右键时,将活动窗口移动到相对于鼠标所在位置的尺寸。建议?
~Lbutton & ~Rbutton::
CoordMode,Mouse,Screen ;mouse position relative to the screen
MouseGetPos,Xpos,Ypos ;get mouse position coordinates
;WinGet, a
我有一个名为subroutines.ahk的txt文件,它是下面的热字符串。
::btw::Thank you for the help
我知道,如果我想从另一个脚本运行我的热字符串,我所要做的就是使用以下方法将它包含在该脚本中:
#include subroutines.ahk
但我不想这样做,而是从另一个脚本,我想循环读取subroutines.ahk的内容,并以这种方式加载热字符串变量。
Loop, read,subroutines.ahk
{
Loop, parse, A_LoopReadLine, %A_Tab%
{
MsgBox, Field number %A_Ind
由于从Windows 7切换到Windows 10,下面的操作不再有效:
#IfWinActive ahk_class TaskSwitcherWnd
;; (Hotkeys that should only be active when the task switcher window is active)
#If
显然,任务开关不再是一个窗口,它也没有在DetectHiddenWindows, On中检测到。
是否有方法检测windows 10中的任务切换程序?