Sign in to follow this  
Followers 0
wreckage

Help with simple script not working in Win 7, but working fine in XP, please.

1 post in this topic

#1 ·  Posted (edited)

Hello there.

Surely there must be a couple of takers who will point out my glaring mistakes? ;-)

This simple script works fine in XP, but not in Windows 7. Apparently it opens the first print server window, but

NOT the advisory message box.

I don't have a Win 7 box I can play with yet, so before that happens (soon) I would like to ask you knowledgeable folk

if there are any glaring mistakes in the following. Would it be as simple as the window titles being different in Win 7

or something similar?

I have tried searching this forum and also the Help file in AutoIt, but being

a rank newbie at this, I'm getting nowhere. All advice gratefully received.

.......

$MBox01 = MsgBox(36, "Add Printer", "Are you a <Area01> staff member?")

If $MBox01 = 6 Then

ShellExecute("\\<PrintServer01>")

WinWaitActive("\\<PrintServer01>")

WinMove("\\<PrintServer01>","",10,20, 600,760)

$MBox02 = MsgBox(262144, "Add Printer", "Double-click required printer to install, then click 'ok'")

WinClose("\\<PrintServer01>")

Else

ShellExecute("\\<PrintServer02>")

WinWaitActive("\\<PrintServer02>")

WinMove("\\<PrintServer02>","",10,20, 600,760)

ShellExecute("\\<PrintServer03>")

WinWaitActive("\\<PrintServer03>")

WinMove("\\<PrintServer03>","",610,20, 600,760)

$MBox02 = MsgBox(262144, "Set Default Printer", "Double-click required printer to install, THEN click 'OK'")

WinClose("\\<PrintServer02>")

WinClose("\\<PrintServer03>")

EndIf

Run ("C:\Windows\System32\Control.exe printers")

WinWaitActive("Printers and Faxes")

WinMove("Printers and Faxes","",10,20, 800,760)

$MBox03 = MsgBox(262144, "Set Default Printer", "Right-click required printer and select 'Set as default printer', THEN click 'OK'")

WinClose ("Printers and Faxes")

<END>

...............

Edited by wreckage

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