多窗口喊话测试。测试时可用计事本。
因为是单脚本,又不是多线程。所以只能是一个一个窗口循环来喊。还是老方法,启动脚本后按一下F9保存一次当前窗口,换一个窗口放当前再按F9再保存,全部窗口保存完后按F8开始喊声。
多开喊话前台。
[hide]
dim cc(999)
//声明窗口句柄数组上标,
UserVar Var1=内容 喊话内容
UserVar ys=10 喊话时间(秒) 所有窗口喊一次的时间。
Delay 200
a=0
Rem 1
WaitKey key
//等待用户按键
If key=120
//如果按F9则保存窗口句柄
Plugin cc(a)=Window.GetKeyFocusWnd()
Plugin Msg.ShowScrTXT(0,0,1024,768,"窗口句柄"&cc(a)&"已保存","FF0000")
a=a+1
Delay 100
Goto 1
ElseIf key=119
//如果按F8则,跳到显示出保存过的每一个窗口句柄
Goto 2
Else
Goto 1
EndIf
EndScript
Rem 2
for -1
s=0
Delay 200
For a
Plugin Window.Show(cc(s))
Delay 200
Plugin Window.Active(cc(s))
SayString var1
KeyPress 13,1
Delay int(ys/a*1000)
s=s+1
EndFor
endfor
[/hide]
多开喊话后台。
[hide]
dim cc(999)
//声明窗口句柄数组上标,
UserVar Var1=内容 喊话内容
UserVar ys=10 喊话时间(秒)所有窗口喊一次的时间。
Delay 200
a=0
Rem 1
WaitKey key
//等待用户按键
If key=120
//如果按F9则保存窗口句柄
Plugin cc(a)=Window.GetKeyFocusWnd()
Plugin Msg.ShowScrTXT(0,0,1024,768,"窗口句柄"&cc(a)&"已保存","FF0000")
a=a+1
Delay 100
Goto 1
ElseIf key=119
//如果按F8则,跳到显示出保存过的每一个窗口句柄
Goto 2
Else
Goto 1
EndIf
EndScript
Rem 2
for -1
s=0
Delay 200
For a
Plugin Window.SendString(cc(s),var1)
Plugin Window.SendKeyPress(cc(s),13)
Delay int(ys/a*1000)
s=s+1
EndFor
endfor
[/hide]
因为是单脚本,又不是多线程。所以只能是一个一个窗口循环来喊。还是老方法,启动脚本后按一下F9保存一次当前窗口,换一个窗口放当前再按F9再保存,全部窗口保存完后按F8开始喊声。
多开喊话前台。
[hide]
dim cc(999)
//声明窗口句柄数组上标,
UserVar Var1=内容 喊话内容
UserVar ys=10 喊话时间(秒) 所有窗口喊一次的时间。
Delay 200
a=0
Rem 1
WaitKey key
//等待用户按键
If key=120
//如果按F9则保存窗口句柄
Plugin cc(a)=Window.GetKeyFocusWnd()
Plugin Msg.ShowScrTXT(0,0,1024,768,"窗口句柄"&cc(a)&"已保存","FF0000")
a=a+1
Delay 100
Goto 1
ElseIf key=119
//如果按F8则,跳到显示出保存过的每一个窗口句柄
Goto 2
Else
Goto 1
EndIf
EndScript
Rem 2
for -1
s=0
Delay 200
For a
Plugin Window.Show(cc(s))
Delay 200
Plugin Window.Active(cc(s))
SayString var1
KeyPress 13,1
Delay int(ys/a*1000)
s=s+1
EndFor
endfor
[/hide]
多开喊话后台。
[hide]
dim cc(999)
//声明窗口句柄数组上标,
UserVar Var1=内容 喊话内容
UserVar ys=10 喊话时间(秒)所有窗口喊一次的时间。
Delay 200
a=0
Rem 1
WaitKey key
//等待用户按键
If key=120
//如果按F9则保存窗口句柄
Plugin cc(a)=Window.GetKeyFocusWnd()
Plugin Msg.ShowScrTXT(0,0,1024,768,"窗口句柄"&cc(a)&"已保存","FF0000")
a=a+1
Delay 100
Goto 1
ElseIf key=119
//如果按F8则,跳到显示出保存过的每一个窗口句柄
Goto 2
Else
Goto 1
EndIf
EndScript
Rem 2
for -1
s=0
Delay 200
For a
Plugin Window.SendString(cc(s),var1)
Plugin Window.SendKeyPress(cc(s),13)
Delay int(ys/a*1000)
s=s+1
EndFor
endfor
[/hide]