Sign in to follow this  
Followers 0
immerume2

Shelled window to Activate

6 posts in this topic

I am having problems getting "Add Printer Window" to activate. Is this becuase I used ShellExecute to call it? I cannot get any of the debuggin message boxes to pull up. All of the threads and help I have read say that this simple function should work. Am I missing something? Please help.

ShellExecuteWait("RUNDLL32","PRINTUI.DLL,PrintUIEntry /il")

WinWait("Add Printer Wizard","")
MsgBox(0,"","1")
WinActivate("Add Printer Wizard","")
MsgBox(0,"","2")
WinWaitActive("Add Printer Wizard","")
MsgBox(0,"","3")

ControlClick("Add Printer Wizard", "&Next>", "12324", "left",1,32,13)

Share this post


Link to post
Share on other sites



I am having problems getting "Add Printer Window" to activate. Is this becuase I used ShellExecute to call it? I cannot get any of the debuggin message boxes to pull up. All of the threads and help I have read say that this simple function should work. Am I missing something? Please help.

ShellExecuteWait("RUNDLL32","PRINTUI.DLL,PrintUIEntry /il")

WinWait("Add Printer Wizard","")
MsgBox(0,"","1")
WinActivate("Add Printer Wizard","")
MsgBox(0,"","2")
WinWaitActive("Add Printer Wizard","")
MsgBox(0,"","3")

ControlClick("Add Printer Wizard", "&Next>", "12324", "left",1,32,13)

ShellExecuteWait("RUNDLL32","PRINTUI.DLL PrintUIEntry /il")

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

ShellExecuteWait("RUNDLL32","PRINTUI.DLL PrintUIEntry /il")
No, it doesn't work at all. I'd rather remove all wait parts and it works like this:

ShellExecute("RUNDLL32","PRINTUI.DLL PrintUIEntry /il")

WinActivate("Add Printer Wizard")
MsgBox(0,"","Pass")


ControlClick("Add Printer Wizard", "&Next>", "12324", "left",1,32,13)

I can do signature me.

Share this post


Link to post
Share on other sites

No, it doesn't work at all. I'd rather remove all wait parts and it works like this:

ShellExecute("RUNDLL32","PRINTUI.DLL PrintUIEntry /il")

WinActivate("Add Printer Wizard")
MsgBox(0,"","Pass")


ControlClick("Add Printer Wizard", "&Next>", "12324", "left",1,32,13)
I don't know what you mean by "doesn't work at all" since the line I posted and you quoted does work, and then you have used it in your post!

I think you and immerume2 will have more success with a correct ControlClick statement though.

ControlClick("Add Printer Wizard","", "[CLASS:Button;Instance:2]")

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

I don't know what you mean by "doesn't work at all" since the line I posted and you quoted does work, and then you have used it in your post!

I think you and immerume2 will have more success with a correct ControlClick statement though.

ControlClick("Add Printer Wizard","", "[CLASS:Button;Instance:2]")
I have used ShellExecute. You have used ShellExecuteWait. I replaced the line and it doesn't pass any of message boxes :P

I can do signature me.

Share this post


Link to post
Share on other sites

I have used ShellExecute. You have used ShellExecuteWait. I replaced the line and it doesn't pass any of message boxes :(

Oh, sorry I didn't see that. :P I agree that it should be ShelExecute not ShellExecuteWait.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

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