Sign in to follow this  
Followers 0
carlomagno

script don't run with computer locked

13 posts in this topic

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



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 :idiot:

Share this post


Link to post
Share on other sites

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 :idiot:

<{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

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)

Share this post


Link to post
Share on other sites

Hehe ! Either I`m way off, or the other guys are... :idiot:

Anyway..

Carlomagno, I´ve never tried it, but it should work in at least with

some 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

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

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

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

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 understand

Then I MUST ALWAYS WinWait and ControlSend

Thanks all

Sam --

Share this post


Link to post
Share on other sites

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 with

ControlSend 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-related

functions (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 better

answer, 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

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

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

I thanks all

I think that I disable screensaver

Bye

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0