carlomagno Posted December 13, 2004 Posted December 13, 2004 Is it normal that the scripts do not turn if the computer is blocked? (screen saver protection)
Holger Posted December 13, 2004 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 colors Other old stuff:IconFileScanner, TriState/ThreeState GUI TreeView, GUI ContextMenu created out of a TreeView
carlomagno Posted December 13, 2004 Author 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.
JSThePatriot Posted December 13, 2004 Posted December 13, 2004 Are you wanting AutoIt to do that for you? JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)
Helge Posted December 13, 2004 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 -
ezzetabi Posted December 13, 2004 Posted December 13, 2004 Helge is right. For working in blocked machines Autoit have to use only windows unrelated or control commands.
carlomagno Posted December 14, 2004 Author 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
MHz Posted December 14, 2004 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.
carlomagno Posted December 14, 2004 Author 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 --
Helge Posted December 14, 2004 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 -
ezzetabi Posted December 14, 2004 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...
SlimShady Posted December 14, 2004 Posted December 14, 2004 You could use WinGetState. I tried using the desktop as an example but I failed.
carlomagno Posted December 16, 2004 Author Posted December 16, 2004 I thanks all I think that I disable screensaver Bye
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now