Hello,
Please, does it exist an event or a command which could let us know when an object is ready to be touched after having been filled ?
In the example attached, after having populated a Listbox, I have tried to select an entry. So, I have tried to make a Refresh and finished by a Wait with an arbitrary delay. Is this the correct way of doing things ? Many thanks
[spoiler]
ListBoxSize "Listbox2" [i]
Loop 1 [i] [li]
ListBoxDeleteItem "Listbox2" 1
endloop
ListBoxAddItem "Listbox2" "A" ""
ListBoxAddItem "Listbox2" "B" ""
ListBoxAddItem "Listbox2" "C" ""
.refresh
Wait 100
BeginJS
$("#Listbox2 option").filter(function() {
return $(this).text() == "B";
}).prop('selected', true);
EndJS
ListBoxGetSelectedIndex "Listbox2" [r2]
ConsoleLog "Initial item selected: [r2]"
EndWait
ListBoxGetSelectedIndex "Listbox2" [rl]
ConsoleLog "Initial item selected: [rl]"
[/spoiler]
Hello,
Please, does it exist an event or a command which could let us know when an object is ready to be touched after having been filled ?
In the example attached, after having populated a Listbox, I have tried to select an entry. So, I have tried to make a Refresh and finished by a Wait with an arbitrary delay. Is this the correct way of doing things ? Many thanks
Spoiler
ListBoxSize "Listbox2" [i]
Loop 1 [i] [li]
ListBoxDeleteItem "Listbox2" 1
endloop
ListBoxAddItem "Listbox2" "A" ""
ListBoxAddItem "Listbox2" "B" ""
ListBoxAddItem "Listbox2" "C" ""
.refresh
Wait 100
BeginJS
$("#Listbox2 option").filter(function() {
return $(this).text() == "B";
}).prop('selected', true);
EndJS
ListBoxGetSelectedIndex "Listbox2" [r2]
ConsoleLog "Initial item selected: [r2]"
EndWait
ListBoxGetSelectedIndex "Listbox2" [rl]
ConsoleLog "Initial item selected: [rl]"
Uploaded files:- You need to login to have access to uploads.