Jump to content

script don't run with computer locked


Recommended Posts

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:

Link to comment
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.

Link to comment
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)

Link to comment
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 -

Link to comment
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

Link to comment
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 --

Link to comment
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 -

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...