johnirvin Posted May 7, 2008 Posted May 7, 2008 Hello, I would like to know if it's possible with autoit to select an option from a list without using the mouseclick() function. I provided the picture of the application (see attachment) that I am using. How can i choose Physical Network from the list at the right side without using the mouseclick function? Would ControlListView() work?Doc1.doc
covaks Posted May 7, 2008 Posted May 7, 2008 Sure, if it's a listview, try something like this: $hWnd = WinGetHandle("Exploring DeltaV") $hItem = ControlListView($hWnd,"","SysListView321","FindItem","Physical Network") ControlListView($hWnd,"","SysListView321","Select", $hItem) ControlSend($hWnd,"","SysListView321","{ENTER}")
johnirvin Posted May 7, 2008 Author Posted May 7, 2008 Sure, if it's a listview, try something like this: $hWnd = WinGetHandle("Exploring DeltaV") $hItem = ControlListView($hWnd,"","SysListView321","FindItem","Physical Network") ControlListView($hWnd,"","SysListView321","Select", $hItem) ControlSend($hWnd,"","SysListView321","{ENTER}") Hi, it always selects the first item. Do you know why?
covaks Posted May 8, 2008 Posted May 8, 2008 No, I don't know why. Are you sure the ClassNN is correct? Did you check with AutoIT Window Info Tool? Did you check to see that the FindItem is returning a non -1 value? What did you do to troubleshoot? Show us your code. Use the AutoIT Window Info Tool and the Helpfiles to figure out where the problem is, and try to debug a bit.
johnirvin Posted May 9, 2008 Author Posted May 9, 2008 Ei, I guess there's a bug with DeltaV (the software I am automating) coz I tried to automate other window tasks and it worked. Thanks anyways.
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