carlomagno 0 Posted December 13, 2004 Is it normal that the scripts do not turn if the computer is blocked? (screen saver protection) Share this post Link to post Share on other sites
Holger 14 Posted December 13, 2004 Maybe you mean an XP-computer? Yep, try to shut it down with pressing short the shutdown-button on the computer while it is locked - I mean not pressing the button 10 seconds so that computer is completely 'hard' shuted down Old project:GUI/Tray menu with icons and colorsOther old stuff:IconFileScanner, TriState/ThreeState GUI TreeView, GUI ContextMenu created out of a TreeView Share this post Link to post Share on other sites
carlomagno 0 Posted December 13, 2004 Maybe you mean an XP-computer?Yep, try to shut it down with pressing short the shutdown-button on the computer while it is locked - I mean not pressing the button 10 seconds so that computer is completely 'hard' shuted down <{POST_SNAPBACK}>Sorry, I don't uderstand.The computer is locked because is active the protection [On resume, password protect] of screen saver.I must use the CTRL-ALT_DEL and insert the right password. Share this post Link to post Share on other sites
JSThePatriot 18 Posted December 13, 2004 Are you wanting AutoIt to do that for you? JS AutoIt LinksFile-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.ComputerGetInfo UDF's Updated! 11-23-2006External LinksVortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Share this post Link to post Share on other sites
Helge 3 Posted December 13, 2004 Hehe ! Either I`m way off, or the other guys are... Anyway..Carlomagno, I´ve never tried it, but it should work in at least withsome functions, I BELIEVE.. For example a simple :If @SEC = 1 Then SoundPlay("ding.wav")However, I doubt that for example any of the Window-functions would work..If WinActive("home for Christmas soon") Then SoundPlay("woooohoo.wav")But this is just guessing.. If you explain (or post) your code maybe we can help you..Sorry that I couldn`t help.- Helge - Share this post Link to post Share on other sites
ezzetabi 3 Posted December 13, 2004 Helge is right. For working in blocked machines Autoit have to use only windows unrelated or control commands. Share this post Link to post Share on other sites
carlomagno 0 Posted December 14, 2004 ok I have written one script that lancia a program. After launch there is a form that asks userID and password. The program stop here here's code Logon() 1 Func Logon() 2 $startSAP="C:\Programmi\SAP\FrontEnd\SAPGUI\sapgui" 3 Run( $startSAP ) 4 Sleep( 2000) 5 $WndName = "SAP R/3" 6 WinWaitActive( $WndName) 7 Send( $userid ) 8 Send("{TAB}") 9 Send( $pwd ) 10 Send("{ENTER}") 11 Return "" 12 EndFunc When the computer is blocked script stop line 7 bye Share this post Link to post Share on other sites
MHz 80 Posted December 14, 2004 6 WinWait( $WndName) 7 ControlSend( $userid ) ... ... That is what helge and ezzetabi are saying? The screensaver is the active window. You need to use the functions for inactive window use. Share this post Link to post Share on other sites
carlomagno 0 Posted December 14, 2004 6 WinWait( $WndName) 7 ControlSend( $userid ) ... ... That is what helge and ezzetabi are saying? The screensaver is the active window. You need to use the functions for inactive window use.<{POST_SNAPBACK}>Now I understandThen I MUST ALWAYS WinWait and ControlSend Thanks allSam -- Share this post Link to post Share on other sites
Helge 3 Posted December 14, 2004 In most cases it`s better and safer to use ControlSend instead of Send,because Send requires that the window/control is active/selected, but withControlSend that`s not required. The window/control can even be hidden !About the WinWait. As I said before, I doubt that any of the windows-relatedfunctions (and control-functions) do work with the screensaver.I`m in a situation where it`s IMPOSSIBLE to try this, so I could give you a betteranswer, so just have try it out yourself.You could try something like this (UNTESTED):Sleep(30000); Gives you the chance to start the screensaver.. If WinExists("Program Manager") Then SoundPlay("norsk_sau.wav")Good luck !- Helge - Share this post Link to post Share on other sites
ezzetabi 3 Posted December 14, 2004 WinExists will work. But to control that window you have to use control commands.Also WinWait should work, but of course won't work WinWaitActive... Share this post Link to post Share on other sites
SlimShady 1 Posted December 14, 2004 You could use WinGetState. I tried using the desktop as an example but I failed. Share this post Link to post Share on other sites
carlomagno 0 Posted December 16, 2004 I thanks all I think that I disable screensaver Bye Share this post Link to post Share on other sites