#Persistent
#SingleInstance,FORCE
宿主:="ahk_class SciTEWindow"
跟屁虫:="ahk_class Notepad"
Loop
{
WinGetClass,_ActiveTitle,A
If instr(宿主,_ActiveTitle)
{
WinGetPos , X, Y, Width, Height,%宿主%
X1:= x+Width
Y1:=y+Height
WinMove,%跟屁虫%,,%X1%,%Y%,200,400
WinSet, Topmost,on, %跟屁虫%
WinRestore,%跟屁虫%
Sleep,600
}
else
{
WinSet, AlwaysOnTop,off, %跟屁虫%
if not instr(跟屁虫,_ActiveTitle)
{
WinSet, Bottom,, %跟屁虫%
}
WinWaitNotActive,%宿主%
}
}
return
这个程序干什么用的
一个窗口跟随的示例