Jump to content



Photo

Beginner - Combobox display an item, how to


  • Please log in to reply
2 replies to this topic

#1 sqa

sqa

    Seeker

  • Active Members
  • 21 posts

Posted 02 April 2012 - 11:48 PM

Hi, just started with AutoIT and stupedly cannot understand a very simple (pretty sure) thing.
How to display in a comboBox an existing string.
For example AutoIT Info says:
Name: ComboBox1
ID: 197566
isplayed string: 111
need to change it to the following one: 222

Thanks





#2 Realm

Realm

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 608 posts

Posted 03 April 2012 - 02:15 AM

Hello sqa,

First, Welcome to the AutoIt Forums!

I'm not sure I have comprehended your question very well, however it sounds as if your looking for a way to change the data inside your combo box. If so:
GUICtrlSetData($controlID, $DataString, $newSelection)

*Note that if the first Char in $DataString is a pipe '|', then $DataString will replace the old values inside your combo, otherwise it will add the new values to the end.

However, If you mean to automate another application, and wish to change the selection in a combo box control inside the target application then you will want to use function:

ControlCommand( 'Title', 'Text', 'ControlID', "SelectString", 'string')


Realm
...and then we shall see if your insanity can be cured!______________________________________________________________________My Contributions: RegEdit Jumper: A Small & Simple interface based on Yashied's Reg Jumper Function, for searching Hives in your registry.

#3 sqa

sqa

    Seeker

  • Active Members
  • 21 posts

Posted 03 April 2012 - 12:10 PM

Thanks a lot 'ControlCommand' works perfectly.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users