Jump to content
Sign in to follow this  

Windows Log in Question

Recommended Posts

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.

;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


Anoka Store


;***Parts Pro Anoka***

$i = 1


$error = 1

while $error = 1


mouseclick("left", 443, 241)


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

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


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)


$i = $i + 1

Until $i = 3

;***Procomm Anoka***

$i = 1


If $i = 1 Then



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


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

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


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


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


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


did you try using ControlSend instead of send?

So long,


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

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  

  • Create New...