vickerps Posted December 1, 2005 Share Posted December 1, 2005 Hi i am writing a program to install a printer This is what i have so far Run ("RunDll32.exe SHELL32.DLL,SHHelpShortcuts_RunDLL AddPrinter2) ControlClick ("Add Printer Wizard","Finish","12325","left",1) as you can see i haven't got very far. The ControlID is for the next button but it dosn't work nothing happens? can anyone help Link to comment Share on other sites More sharing options...
LxP Posted December 1, 2005 Share Posted December 1, 2005 Your code isn't waiting for the window to appear before trying to click the control. This should work better:Run('RunDll32.exe SHELL32.DLL,SHHelpShortcuts_RunDLL AddPrinter2') WinWait('Add Printer Wizard', 'Finish') ControlClick('Add Printer Wizard', 'Finish', 12325)I removed the extra parameters to ControlClick() in my example since they default to those values anyway. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now