#75978 - 2003-07-18 05:12 PM
Writing domain name into domain name
|
Darren_W
Hey THIS is FUN
   
Registered: 2001-10-10
Posts: 208
Loc: Bristol, England
|
Had some problems with kids changing the domain name,
Have written this script to write the correct name into a domain login dialog box (Windows 98).
Cant seem to get it to work though... can anyone help?
code:
Break OFF SetConsole("Hide") sleep 1 $regkey='HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control' $uname= READVALUE ("$regkey", "Current User") if $uname == "" ;if user is not logged in $=setfocus ("enter network password") $=sendkeys ("~ D") $=sendkeys ("DOMAIN") $=sendkeys ("{TAB}") $=sendkeys ("{TAB}") $=sendkeys ("{TAB}")
MessageBox("Set Domain Name", "Domain name", 64, 4) sleep 5 endif exit 0
[ 18. July 2003, 17:13: Message edited by: Darren ]
_________________________
I want to share something with you - the three sentences that will get you through life. Number 1, 'cover for me.' Number 2, 'oh, good idea, boss.' Number 3, 'it was like that when I got here'.
|
|
Top
|
|
|
|
#75986 - 2003-07-21 11:23 AM
Re: Writing domain name into domain name
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
Darren,
It looks like there is an extra space in this -
$=sendkeys ("~ D")
It should be -
$=sendkeys("~D")
Borrowing from the manual (Pg. 91 version 4.21 Manual) - quote:
To specify that any combination of SHIFT, CTRL, and ALT should be held down while several other keys are pressed, enclose the code for those keys in parentheses. For example, to specify to hold down SHIFT while E and C are pressed, use "+(EC)". To specify to hold down SHIFT while E is pressed, followed by C without SHIFT, use "+EC".
HTH,
Kent [ 21. July 2003, 11:25: Message edited by: kdyer ]
|
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 384 anonymous users online.
|
|
|