Lakes Posted April 2, 2006 Share Posted April 2, 2006 Still trying to automate some things withe DigitalPeers Camtrack Program....See my other post here http://www.autoitscript.com/forum/index.php?showtopic=24080How do I get access to the main control panel if it has no title?;Main Panel Check Boxes ;Title: <---------- Its Blank! ----------- ;Class: #32770 ;Size: W: 302 H: 321 ;Box1 ;Control ID: 1054 ;ClassNameNN: Button11 ;Box2 ;Control ID: 1055 ;ClassNameNN: Button12 ;Box3 Control ID: 1056 ClassNameNN: Button13 ;Box4 ;Control ID: 1057 ;ClassNameNN: Button14 ;Box5 ;Control ID: 1058 ;ClassNameNN: Button15 2015 - Still no flying cars, instead blankets with sleeves. Link to comment Share on other sites More sharing options...
Lazycat Posted April 2, 2006 Share Posted April 2, 2006 You have window class, so try to access window via classname with WinTitleMatchMode option set to 4 (advanced mode). Opt("WinTitleMatchMode", 4) Win****("classname=#32770", "", ... Koda homepage ([s]Outdated Koda homepage[/s]) (Bug Tracker)My Autoit script page ([s]Outdated mirror[/s]) Link to comment Share on other sites More sharing options...
Lakes Posted April 2, 2006 Author Share Posted April 2, 2006 You have window class, so try to access window via classname with WinTitleMatchMode option set to 4 (advanced mode). Opt("WinTitleMatchMode", 4) Win****("classname=#32770", "", ... Thanks, but that does`nt work either Test Code.. expandcollapse popup;For use with DigitalPeers Camtrack Program ;Main Panel Check Boxes ;Title: ;Class: #32770 ;Size: W: 302 H: 321 ;Box1 ;Control ID: 1054 ;ClassNameNN: Button11 ;Box2 ;Control ID: 1055 ;ClassNameNN: Button12 ;Box3 ;Control ID: 1056 ;ClassNameNN: Button13 ;Box4 ;Control ID: 1057 ;ClassNameNN: Button14 ;Box5 ;Control ID: 1058 ;ClassNameNN: Button15 Opt("WinTitleMatchMode", 4) #include <Date.au3> #include <GUIConstants.au3> $Main = WinGetHandle("classname=#32770", "") If WinExists($Main) = 0 then $Err= MsgBox(16+5,"ERROR!","Please enable the Camtrack Control Panel") EndIf $Box = 1054 While 1 ControlFocus($Main,"",$Box) ControlCommand ( $Main, "", $Box, "Check", "" ) MsgBox(64,"Box?","Box Number " &$Box) ControlFocus($Main,"",$Box) ControlCommand ( $Main, "", $Box, "UnCheck", "" ) MsgBox(64,"Box?","Control Panel =" &$Main &" Box Number " &$Box &" has been Unchecked") WEnd Exit 2015 - Still no flying cars, instead blankets with sleeves. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted April 2, 2006 Moderators Share Posted April 2, 2006 What's the EXE name? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Lazycat Posted April 2, 2006 Share Posted April 2, 2006 Strange... Try another way: because your window have some controls with unique ID you can exactly identify it. $hwList = WinList() For $i=1 To $hwList[0][0] If ControlGetHandle($hwList[$i][1], "", 1054) <> 0 Then MsgBox (0, "Found", "Found window with handle = " & $hwList[$i][1]) Endif Next This should get you handle of window that have certain control. For more safe identity you can check more then one control. Koda homepage ([s]Outdated Koda homepage[/s]) (Bug Tracker)My Autoit script page ([s]Outdated mirror[/s]) Link to comment Share on other sites More sharing options...
Lakes Posted April 2, 2006 Author Share Posted April 2, 2006 Strange... Try another way: because your window have some controls with unique ID you can exactly identify it. $hwList = WinList() For $i=1 To $hwList[0][0] If ControlGetHandle($hwList[$i][1], "", 1054) <> 0 Then MsgBox (0, "Found", "Found window with handle = " & $hwList[$i][1]) Endif Next This should get you handle of window that have certain control. For more safe identity you can check more then one control. Wooo Hooo! It works!! $hwList = WinList() For $i=1 To $hwList[0][0] If ControlGetHandle($hwList[$i][1], "", 1054) <> 0 Then MsgBox (0, "Found", "Found window " &$i &" with handle = " &$hwList[$i][1]) $Main = $hwList[$i][1] Endif Next While 1 ControlFocus($Main,"",$Box) ControlCommand ( $Main, "", $Box, "Check", "" ) MsgBox(64,"Box?","Box Number " &$Box) ControlFocus($Main,"",$Box) ControlCommand ( $Main, "", $Box, "UnCheck", "" ) MsgBox(64,"Box?","Control Panel =" &$Main &" Box Number " &$Box &" has been Unchecked") WEnd Exit Many thanks! 2015 - Still no flying cars, instead blankets with sleeves. Link to comment Share on other sites More sharing options...
Lakes Posted April 2, 2006 Author Share Posted April 2, 2006 What's the EXE name?camtrack.exe 2015 - Still no flying cars, instead blankets with sleeves. Link to comment Share on other sites More sharing options...
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