surfdork Posted December 9, 2009 Posted December 9, 2009 Hi, Thank you in advance for your patience since I'm new to using AutoIT I want to use controlcommand to select items from a droplist for language selection The following does not appear to work, French is not selected ControlCommand ( "Choose Setup Language", "","ComboBox1", "SelectString",'French(France)') So, I'd like to use ControlCommand "SetCurrentSelection", occurrence because of localization issues, French will not looks the same when installing on a Chinese system I have no idea whar occurence refers to. Is it a numerical count of the entries from top down? What value am I to enter in occurence and with what syntay (do I enter a "occurance" for example)? Am I even using the right function to accomplish this task? Heres the script so far Run("C:\4878\setup.exe") WinWaitActive("Choose Setup Language") sleep (500) ControlCommand ( "Choose Setup Language", "","ComboBox1", "ShowDropDown","") ;Should I enter a hide dropdown after this command. The show is to give visual indication the droplist is active. sleep (500) ControlCommand ( "Choose Setup Language", "","ComboBox1", "SelectString",'French(France)') ;I have no idea so far if French is selected. sleep (500) ControlClick ( "Choose Setup Language","" ,"[iD:1006]") ;Send("{ENTER}") this always works Thank you for your patience
PsaltyDS Posted December 10, 2009 Posted December 10, 2009 (edited) "Occurrence" is a 0-based index (not at all clear from the help file description). So, if you know French is the third option in the list, it would be: ControlCommand("Choose Setup Language", "", "ComboBox1", "SetCurrentSelection", 2) Edit: Typo. Edited December 10, 2009 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
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