Sign in to follow this  
Followers 0
redneonrt

Windows Log in Question

3 posts in this topic

First off I am new to this program but so far it looks promising for what i am trying to do.

Is it possible to write a script that will unlock a computer if I know the username/password?

If not, then I could use a little help getting some programs to do what i want behind the login screen.

CODE
;Global Variables

#include <Array.au3>

$pos_x = _ArrayCreate("X", 0, 364, 1280,1645)

$pos_y = _ArrayCreate("Y", 0, 248, 0,297)

$pp_pos_x = _ArrayCreate("X", 0, 254, 1280,1533)

$pp_pos_y = _ArrayCreate("Y", 0, 205, 0,253)

$anoka_desktop = 1

$osseo_desktop = 2

$slp_desktop =3

$pl_desktop =4

$error_delay = 300

#cs*******************************************************************

Anoka Store

#ce*******************************************************************

;***Parts Pro Anoka***

$i = 1

Do

$error = 1

while $error = 1

sleep(3000)

mouseclick("left", 443, 241)

sleep(3000)

run("Z:\start.bat", "Z:\")

$error = WinWait("Exception Handler" ,"", 45)

WEnd

WinSetTitle("Invoice","","Anoka Parts Pro Pos. " & $i)

winmove("Anoka Parts Pro Pos. " & $i, "",$pp_pos_x[$i] ,$pp_pos_y[$i],1024,768)

WinActivate("Anoka Parts Pro Pos. " & $i)

send("#" & $anoka_desktop)

sleep(1000)

$i = $i + 1

Until $i = 3

;***Procomm Anoka***

$i = 1

Do

If $i = 1 Then

sleep(2000)

EndIf

run('C:\Program Files\Symantec\Procomm Plus\PROGRAMS\PW5.EXE TELNET PhoneRoom.dir CONNECT "Anoka TAMS" ')

sleep(2000)

WinSetTitle("Procomm Plus Telnet","","Anoka Telnet Pos. "& $i)

winmove("Anoka Telnet Pos. "& $i, "",$pos_x[$i],$pos_y[$i])

sleep(5000)

ControlClick("Anoka Telnet Pos. " & $i,"","PWTerminalWindow1")

send("{ENTER}")

send("#" & $anoka_desktop)

$i = $i + 1

Until $i = 5

This code works perfect as long as the user is logged on. The problem I run into when the user has the screen locked the windows dont get some commands send to them.

Particularly this one

CODE

send("#" & $anoka_desktop)

Which is really just a Keypress of Winkey + F1, I use this for a virtual desktop program to send that window to a particular desktop.

As of now if the screen is locked all the programs start up correctly but they never get sent to their corresponding virtual desktops ( this is what makes me think that the "send windowkey + f1" code is not working.

If I can log in, run the script, then log out that would be fine. Otherwise is there another way to send this command to the window to get it to accept it?

Hope this all makes sense and thanks in advance for all your help :P

Share this post


Link to post
Share on other sites



Hi,

did you try using ControlSend instead of send?

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

I have, Still no luck :P

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