Sign in to follow this  
Followers 0
nago

Change selected item in List

3 posts in this topic

As is usually the case, i assume I have missed something incredibly simple or misread something.

I have a List item in an AU3 created window and I'd like to select a new item in this list based on another event, but am not sure how.

E.x;

[setup]
...
$List1 = GUICtrlCreateList("", 8, 8, 233, 448)
...
GuiCtrlSetData($List1,'|Etc01|Etc02|Etc03|Etc04|Etc05|Etc06|Etc07|Etc08')
...
If ($Condition) Then  ;Change item in list to item number 06 --What's the function I need?

Share this post


Link to post
Share on other sites



As is usually the case, i assume I have missed something incredibly simple or misread something.

I have a List item in an AU3 created window and I'd like to select a new item in this list based on another event, but am not sure how.

E.x;

[setup]
...
$List1 = GUICtrlCreateList("", 8, 8, 233, 448)
...
GuiCtrlSetData($List1,'|Etc01|Etc02|Etc03|Etc04|Etc05|Etc06|Etc07|Etc08')
...
If ($Condition) Then ;Change item in list to item number 06 --What's the function I need?
To clear all the selected items use

For $n = 0 To _GUICtrlListBox_GetCount($List1) - 1
                    _GUICtrlListBox_SetSel($List1, $n,False)
                Next

to select an item

_GUICtrlListBox_SetSel($List1, 3);select item 4

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

Couldn't get that one working, However;

_GUICTRLListBox_SelectString()

Worked like a champ. Thanks for setting me on the right path. I always skip over the _Functions.

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