Sign in to follow this  
Followers 0
mikhael

Help with ControlSend and ControlClick

2 posts in this topic

I'm looking for someone who can help me out with why ControlSend, or ControlClick, is not working in a script I'm trying to build. I'm a newb when it comes to scripts, and AutoIT, but I'm just not getting the examples I've found. Actually I think I'm doing it right, but I can't figure out why it's not working. I'm willing to PayPal anyone willing to help me $20 for your time.

I'm trying to automate an installer for a Xerox printer. The installer is Win7 32bit and approximately 64mb. You can find the install on Xerox's site at: (Phaser 3200MFP)

http://www.support.xerox.com/support/phaser-3200mfp/file-download/enus.html?operatingSystem=win7&fileLanguage=en&contentId=105998&from=downloads&viewArchived=false

So I'm attempting to use ControlSend and/or ControlClick because I read that's what you need to use when the window you want to send commands to may not have focus. Once I have this script running I'd like to add-in a semi-transparent splash screen that says "Software Installation in progress. Your mouse and keyboard are currently disabled." Then of course when the script is done it would exit and the splash screen would go away.

I'm calling it unattend.au3 and I intend on having it live in the folder where "setup.exe" resides. Here's what I have so far:

;this is working fine and launching the installer as expected

Run("Setup.exe")

;this is working. I'm not sure if it's working because I did it right, but it gets me to the next screen.

WinWaitActive("Open File - Security Warning","")

ControlSend("Open File - Security Warning", "", "[CLASS:Button; TEXT:&Run; INSTANCE:1]")

;here is where I'm getting hung up. I've tried using ControlSend and ControlClick, but so far everything I've tried won't click the NEXT button.

WinWaitActive("Xerox Phaser 3200MFP","")

ControlSend("Xerox Phaser 3200MFP","", "[CLASS:Button; TEXT:&Next>; INSTANCE:8]")

;on the next screen I read the first option in a list is considered 0. it's already selected. in addition to that i need options 1 & 4 selected. another NEXT button.

ControlListView ("Xerox Phaser 3200MFP", "", "SysListView32", "Select", 1, 4)

;"You have chosen to install". Another NEXT button.

?

;The install kicks off. Wait for "Setup has finished installing Xerox...". Click FINISH.

?

;Close "Online Registration" pop-up.

?

;Run printer firmware utility. C:\Program Files\Xerox\Xerox Phaser 3200MFP\PSU\FaxRCP.exe.

?

;Select Firmware Update tab.

?

;Select Browse button.

?

;Change to directory S:\XeroxPhaser and choose file called SCX4725FNXRX_V1.11_smd.hd. Double left clicking the file name, or selecting the file name and OPEN both work.

?

;Click UPDATE button.

?

;Wait for "Update Complete" pop-up. Click OK.

?

;WAIT 4 minutes before closing out firmware utility GUI. During this time the printer is doing it's final configurations and rebooting. If you exit the firmware utility during this process it corrupts.

?

;exit script and splash screen.

?

Share this post


Link to post
Share on other sites



I just wanted to add that on the part where I'm getting hung up, when I was trying ControlClick I did read about the additional parameters like specifying "left" and how many times to click. Still didnt have any luck though.

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