Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
bets way to set checkbox and get listbox items
#1
Photo 
I have my own windows form that I am working with. I have a check box list and also a list box. I need to check one of the check boxes in the list named LOG. I then want to determine how many lines are in the list box (actually just need to know if it is empty).

//check the LOG box
int w1=win("MyWindow" "TMainForm")
int w2=win("MyWindow" "TMainForm")
Acc a.Find(w2 "LISTITEM" "LOG" "class=TCheckListBox" 0x1005)
a.State = 1

I'm stuck here.

Thanks for any help.

Brian
 

[img]Desktop\qmquestion.png[/img]
#2
Macro Macro3237
Code:
Copy      Help
int w2=win("MyWindow" "TMainForm")
Acc a.Find(w2 "LISTITEM" "LOG" "class=TCheckListBox" 0x1005)
if(!(a.State & STATE_SYSTEM_CHECKED)) a.DoDefaultAction ;; in LibreAutomate would be just a.Check();

a.Navigate("pa") ;; or a.Find(w2 "LIST" ...)
int n = a.ChildCount
out n


Forum Jump:


Users browsing this thread: 1 Guest(s)