我有一个代码,其中我的鼠标选择两个句子并将它们一个接一个地粘贴到另一个选项卡中。问题在于,由于我使用的是绝对坐标,因此当书签栏显示时,它会将这些句子推到更低的位置,现在我需要新的坐标来让鼠标选择这些句子的新位置。
我尝试过 如果(pwb.ToolBar:= False)移动到屏幕上的某个位置,否则移动到另一个但没有运气。还尝试了工具栏,高度<= 73和其他我什至不记得但没有的事情。
F1::
;MouseClick , WhichButton, X, Y, ClickCount, Speed, DownOrUp, Relative
MouseClick, Left, 215, 232, 1, 0, D
;MouseMove, X, Y , Speed, Relative
MouseMove, 80, 0 , 1, Relative
Send ^c
Sleep 20
If StrLen( Clipboard )
Clipboard := RegexReplace( Clipboard, "\D" );This is so that it only keeps the numbers in the string
MouseClick,,,, U
Send ^{TAB}
SetKeyDelay , 30, 30 ; first is delay between keypresses, and second is press duration
Send {TAB}^{v}{TAB}701041{TAB}^+{TAB}
;MouseClick , WhichButton, X, Y, ClickCount, Speed, DownOrUp, Relative
MouseClick, Left, 215, 205, 1, 0, D
;MouseMove, X, Y , Speed, Relative
MouseMove, 80, 0 , 1, Relative
Send ^c
Sleep 20
If StrLen( Clipboard )
Clipboard := RegexReplace( Clipboard, "\D" )
MouseClick,,,, U
Send ^{TAB}^{v}{TAB}
SetKeyDelay , 30, 30
Send %A_MM%/%A_DD%/%A_YYYY%{TAB}{Space};{TAB}{Down}{TAB}{Down}{TAB}{Down}{TAB}{Down 4}
SetKeyDelay , 0, 0 ; first is delay between keypresses, and second is press duration
Send {TAB}{Down}{TAB}
SetKeyDelay , 30, 30 ; first is delay between keypresses, and second is press duration
Send {Down 2}
SetKeyDelay , 0, 0 ; first is delay between keypresses, and second is press duration
Send {TAB}No{TAB}
return
我没有包含If(pwb.ToolBar:= False),因为我不确定是否正确。 我希望根据坐标栏是否显示来触发鼠标坐标。