WinMove, WinTitle, 其中的"WinTitle"能否以变量替换?

遇到了问题?请先进行搜索(中文和英文),然后在此提问

Moderators: tmplinshi, arcticir

wei9133
Posts: 11
Joined: 08 Sep 2014, 13:01

WinMove, WinTitle, 其中的"WinTitle"能否以变量替换?

08 Feb 2016, 10:17

WinMove, WinTitle, WinText, X, Y [, Width, Height, ExcludeTitle, ExcludeText]
其中的"WinTitle"能否以变量替换?
下方代码中已有将SetTitleMatchMode更改为正则模式
直接使用下列语句亦可直接将火狐移动至鼠标下方
winmove, fox,,mouseX, mousey
但将WinTitle换为InputBox获取的windowsmove变量,就无法动作(有用tootip看内容是fox没错)

(下方脚本目标是在鼠标下方叫出一个InputBox,在InputBox输入变量,移动符合变量的窗口到鼠标下面)

Code: Select all

SetTitleMatchMode, RegEx
CoordMode, Mouse, Screen
#q::
MouseGetPos, mouseX, mouseY, OutputVarWin, OutputVarControl, 1
;tooltip, % mouseX . "x" . mouseY
InputBox, windowsmove , 视窗移动, , , 200, 100, mouseX, mousey, ,5 , 
tooltip, % windowsmove
WinActivate , % windowsmove
winmove, windowsmove,,mouseX, mousey
return

Return to “请求帮助”

Who is online

Users browsing this forum: Best and 7 guests