脚本如下
FormatTime,ss,,yyyyMMdd
Run,D:\share\AutoTestReport\%SS%\overview-summary.html
WinWait, SoapUI Test Results: Summary - Windows Internet Explorer,
IfWinNotActive, SoapUI Test Results: Summary - Windows Internet Explorer, , WinActivate, SoapUI Test Results: Summary - Windows Internet Explorer,
WinWaitActive, SoapUI Test Results: Summary - Windows Internet Explorer,
Send, {CTRLDOWN}a{CTRLUP}{CTRLDOWN}c{CTRLUP}
WinWait, ,
IfWinNotActive, , , WinActivate, ,
---------------------------------------------------------------------
在非锁屏情况下执行非常正常,锁屏情况下执行到Send, {CTRLDOWN}a{CTRLUP}{CTRLDOWN}c{CTRLUP}这句这前,脚本就停顿不继续执行,屏幕一但解锁,脚本又继续正常执行
有同学知道如何解决吗,脚本是要在凌晨定时执行的,电脑IT是强制自动锁屏的
脚本在win7锁屏下无法执行
Moderators: tmplinshi, arcticir
Re: 脚本在win7锁屏下无法执行
猜测是系统的安全性限制,手上没有 Win7 测试。
Re: 脚本在win7锁屏下无法执行
Hi! I had ever asked the similar questions about running the scripts in window off mode. But there is no solution when you use "Send" command.
The "Send" command sends the key press to the current activated window. When you are in window screen protect mode, this activated window is not the window you want that is why your script just run till "Winwait" then keep waiting the window you specified.
I got the answer is to use DLL or COM to develop the programs. For some cases ,it can work. I refer your script you are checking the IE related window. you can refer this page to get some example:
http://ahkscript.org/boards/viewtopic.php?f=6&t=77
But for my case, I want to control SAP but I can not find COM/DCOM so I can not use this way.
Currently I write a small script to prevent this computer into screen off mode then it can run the scripts during the midnight.
The "Send" command sends the key press to the current activated window. When you are in window screen protect mode, this activated window is not the window you want that is why your script just run till "Winwait" then keep waiting the window you specified.
I got the answer is to use DLL or COM to develop the programs. For some cases ,it can work. I refer your script you are checking the IE related window. you can refer this page to get some example:
http://ahkscript.org/boards/viewtopic.php?f=6&t=77
But for my case, I want to control SAP but I can not find COM/DCOM so I can not use this way.
Currently I write a small script to prevent this computer into screen off mode then it can run the scripts during the midnight.
Re: 脚本在win7锁屏下无法执行
Yes, CHMike.
DLL/COM works in background, and send simulate user operates in foreground which can't work in window off (lock) mode..
But interface of DLL/COM need to be supported by provider of application.
Also thanks for the sharing of COM Object Reference.
DLL/COM works in background, and send simulate user operates in foreground which can't work in window off (lock) mode..
But interface of DLL/COM need to be supported by provider of application.
Also thanks for the sharing of COM Object Reference.
我为人人,人人为己?
Re: 脚本在win7锁屏下无法执行
Yes, that is why I can use DLL/COM to control SAP in screen off , becasue I cannot get their releated information for DLL/ com.
Who is online
Users browsing this forum: No registered users and 13 guests