Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/variables/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/sql-server-2005/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Variables 自动热键变量不作为坐标发送_Variables_Coordinates_Autohotkey - Fatal编程技术网

Variables 自动热键变量不作为坐标发送

Variables 自动热键变量不作为坐标发送,variables,coordinates,autohotkey,Variables,Coordinates,Autohotkey,我很难让synatx正常工作,让GUI在正确的位置显示窗口。它应该显示在x0,y(SciteWindow的坐标)、w(显示器宽度)、h(显示器高度/17)处。我认为我的Winmove命令中有错误。请参阅所附代码 #SingleInstance,Force WinGetPos , X_SciTEWindow, Y_SciTEWindow, Width_SciTEWindow, Height_SciTEWindow, ahk_class SciTEWindow ;I don't even need

我很难让synatx正常工作,让GUI在正确的位置显示窗口。它应该显示在x0,y(SciteWindow的坐标)、w(显示器宽度)、h(显示器高度/17)处。我认为我的Winmove命令中有错误。请参阅所附代码

#SingleInstance,Force
WinGetPos , X_SciTEWindow, Y_SciTEWindow, Width_SciTEWindow, Height_SciTEWindow, ahk_class SciTEWindow ;I don't even need the X_SciTEWindow, because the bars will all be aligned at x0, but it's there... 
SysGet, aScreenHeight, 1 
bar_height := Round(aScreenHeight / 17)
Gui, Color, aqua,FFB1B1
Gui, Show, w%A_ScreenWidth% h%bar_height%, SomeStupidBar
WinSet, Style,  -20xC40000
Winmove, %SomeStupidBar%,  x0, y%Y_SciTEWindow%, w%A_ScreenWidth%, h%bar_height%
MsgBox, Time to move the window to x0, y%Y_SciTEWindow%, w%A_ScreenWidth%, h%bar_height%
Winmove, %SomeStupidBar%,  x0, y%Y_SciTEWindow%, w%A_ScreenWidth%, h%bar_height%
return
Esc::ExitApp


SetTimer, ShowGui, 500
ShowGui:    
IfWinNotExist, ahk_class AutohotkeyGUI
{
Gui, +Owner%WinID% +Border +ToolWindow 
Gui, Show, NoActivate x%X% y%Y% w51 h431, %GuiTitle%
}
else
{
WinWaitActive, ahk_class SciTEWindow
WinGetPos, X_SciTEWindow, Y_SciTEWindow,,, ahk_class Notepad
WinGet, WinID, ID, ahk_class SciTEWindow,,,
IfWinNotExist, ahk_class AutohotkeyGUI
WinGetPos, %SomeStupidBar%, , , ,  ahk_class AutohotkeyGUI
If %SomeStupidBar%<>X - 56
WinMove, ahk_class AutohotkeyGUI,  X - 56
}
return
#单实例,强制
翼窗、X_SciTEWindow、Y_SciTEWindow、宽度_SciTEWindow、高度_SciTEWindow、ahk_类SciTEWindow;我甚至不需要X_SciTEWindow,因为所有的条都将在x0处对齐,但它在那里。。。
SysGet,aScreenHeight,1
条形高度:=圆形(屏幕高度/17)
图形用户界面,颜色,浅绿色,FFB1B1
图形用户界面,显示,w%A_屏幕宽度%h%bar_高度%,SomeStupidBar
WinSet,样式,-20xC4000
Winmove,%SomeStupidBar%,x0,y%y\u SciTEWindow%,w%A\u屏幕宽度%,h%bar\u高度%
MsgBox,将窗口移动到x0的时间,y%y_SciTEWindow%,w%A_屏幕宽度%,h%bar_高度%
Winmove,%SomeStupidBar%,x0,y%y\u SciTEWindow%,w%A\u屏幕宽度%,h%bar\u高度%
返回
Esc::ExitApp
SetTimer,ShowGui,500
ShowGui:
IfWinNotExist,ahk_类AutohotkeyGUI
{
Gui,+所有者%WinID%+边框+工具窗口
Gui,显示,未激活x%x%y%y%w51 h431,%GuiTitle%
}
其他的
{
WinWaitActive,ahk_类SciTEWindow
Wingtpos,X_SciTEWindow,Y_SciTEWindow,,,ahk_类记事本
WinGet,WinID,ID,ahk_类SciTEWindow,,,
IfWinNotExist,ahk_类AutohotkeyGUI
WinGetPos,%SomeStupidBar%,,ahk_类自动热键GUI
如果%X-56
WinMove,ahk_类AutohotkeyGUI,X-56
}
返回

文档中指出,您需要具备以下条件之一:

WinMove, WinTitle, WinText, X, Y [, Width, Height, ExcludeTitle, ExcludeText]
WinMove, X, Y
你有:

Winmove, %SomeStupidBar%,  x0, y%Y_SciTEWindow%, w%A_ScreenWidth%, h%bar_height%
请注意缺少的WinText

请尝试将其留空:

Winmove, %SomeStupidBar%,, x0, y%Y_SciTEWindow%, w%A_ScreenWidth%, h%bar_height%