Jump to content

Recommended Posts

Posted

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.

Posted

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 -

Posted

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

Posted

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.

Posted

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

Posted

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 -

Posted

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

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
  • Recently Browsing   0 members

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