PcExpert Posted April 5, 2006 Share Posted April 5, 2006 Hello, Does anyone knows how to check the state of a checkbox? Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted April 5, 2006 Moderators Share Posted April 5, 2006 Hello, Does anyone knows how to check the state of a checkbox?Look at ControlCommand() in the help file. Link to comment Share on other sites More sharing options...
GaryFrost Posted April 5, 2006 Share Posted April 5, 2006 Hello, Does anyone knows how to check the state of a checkbox?checkbox in what? an autoit script? an external application? SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
PcExpert Posted April 5, 2006 Author Share Posted April 5, 2006 External Link to comment Share on other sites More sharing options...
GaryFrost Posted April 5, 2006 Share Posted April 5, 2006 Externalthen look at what big_daddy posted SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
PcExpert Posted April 5, 2006 Author Share Posted April 5, 2006 OK, but I've tried it, but it doesn't work. This is the code: Run("C:\Program Files\Hitman Pro\hitmanpro2.exe")WinWaitActive("Hitman Pro")MouseClick("left", 370, 570, 1)ControlCommand("Hitman Pro", "", "92", "", "UnCheck")MouseClick("left", 279, 325, 1)ControlCommand("Hitman Pro", "", "15", "", "Check") ControlCommand("Hitman Pro", "", "16", "", "Check") MouseClick("left", 294, 343, 1)ControlCommand("Hitman Pro", "", "89", "", "Check") ControlCommand("Hitman Pro", "", "1001", "", "Check")MouseClick("left", 306, 359, 1)ControlCommand("Hitman Pro", "", "89", "", "Check") ControlCommand("Hitman Pro", "", "1001", "", "Check")ControlCommand("Hitman Pro", "", "11", "", "Check") ControlCommand("Hitman Pro", "", "15", "", "Check") Link to comment Share on other sites More sharing options...
PcExpert Posted April 5, 2006 Author Share Posted April 5, 2006 Changed code: Run("C:\Program Files\Hitman Pro\hitmanpro2.exe")WinWaitActive("Hitman Pro")MouseClick("left", 370, 570, 1)ControlCommand("Hitman Pro", "", "92", "UnCheck")MouseClick("left", 279, 325, 1)ControlCommand("Hitman Pro", "", "15", "Check") ControlCommand("Hitman Pro", "", "16", "Check") MouseClick("left", 294, 343, 1)ControlCommand("Hitman Pro", "", "89", "Check") ControlCommand("Hitman Pro", "", "1001", "Check")MouseClick("left", 306, 359, 1)ControlCommand("Hitman Pro", "", "89", "Check") ControlCommand("Hitman Pro", "", "1001", "Check")ControlCommand("Hitman Pro", "", "11", "Check") ControlCommand("Hitman Pro", "", "15", "Check") Link to comment Share on other sites More sharing options...
Ebenezer Posted April 5, 2006 Share Posted April 5, 2006 Even though it doesn't sound this way - i think Hitman Pro is an Anti-Spyware App, not a game. Link to comment Share on other sites More sharing options...
Ebenezer Posted April 5, 2006 Share Posted April 5, 2006 Works fine on my computer. Link to comment Share on other sites More sharing options...
JOHNe Posted April 5, 2006 Share Posted April 5, 2006 Changed code: Check the state$Check_State = BitAnd(GUICtrlRead($radio1),$GUI_CHECKED)Check the state (was Unchecked)GUICtrlSetState ($radio1,$GUI_CHECKED)Hmm .... "Our deepest fear is not that we are inadequate.Our deepest fear is that we are powerful beyond measure.It is our light, not our darkness that most frightens us." Link to comment Share on other sites More sharing options...
GaryFrost Posted April 5, 2006 Share Posted April 5, 2006 Check the state$Check_State = BitAnd(GUICtrlRead($radio1),$GUI_CHECKED)Check the state (was Unchecked)GUICtrlSetState ($radio1,$GUI_CHECKED)Hmm .... need to keep up with what kind of control is being used here, it's external so that won't work. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Ebenezer Posted April 5, 2006 Share Posted April 5, 2006 :"> Forget what I said. Another script was messing with the controls. If I terminate that, no boxes are checked. Sorry Link to comment Share on other sites More sharing options...
PcExpert Posted April 5, 2006 Author Share Posted April 5, 2006 But how can I automatic set options then, without modifying the ini file? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted April 5, 2006 Moderators Share Posted April 5, 2006 (edited) If your still having the issue with:ControlCommand("Hitman Pro", "", "89", "Check") Try it with , "" after the Check - UnCheckControlCommand("Hitman Pro", "", 89, "Check", "") Edited April 5, 2006 by SmOke_N 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...
PcExpert Posted April 5, 2006 Author Share Posted April 5, 2006 I'm gonna try it now Link to comment Share on other sites More sharing options...
PcExpert Posted April 5, 2006 Author Share Posted April 5, 2006 (edited) Still doesn't work: Code:Run("C:\Program Files\Hitman Pro\hitmanpro2.exe")WinWaitActive("Hitman Pro")MouseClick("left", 370, 570, 1)ControlCommand("Hitman Pro", "", "92", "UnCheck", "")MouseClick("left", 279, 325, 1)ControlCommand("Hitman Pro", "", "15", "Check", "") ControlCommand("Hitman Pro", "", "16", "Check", "") MouseClick("left", 294, 343, 1)ControlCommand("Hitman Pro", "", "89", "Check", "") ControlCommand("Hitman Pro", "", "1001", "Check", "")MouseClick("left", 306, 359, 1)ControlCommand("Hitman Pro", "", "89", "Check", "") ControlCommand("Hitman Pro", "", "1001", "Check", "")ControlCommand("Hitman Pro", "", "11", "Check", "") ControlCommand("Hitman Pro", "", "15", "Check", "")What's wrong? Edited April 5, 2006 by PcExpert Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted April 5, 2006 Moderators Share Posted April 5, 2006 Still doesn't work: Code:What's wrong?I don't know what HitMan Pro is although it sounds familiar... try using the ClassNameNN there instead of the control ID's. Also, make sure that's the right Window Title. Also, the Control ID's have text on the Controls more than likely, try using that too. 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...
PcExpert Posted April 5, 2006 Author Share Posted April 5, 2006 Hitman Pro is a all in one antispyware solution and I'm gonna try it again Link to comment Share on other sites More sharing options...
PcExpert Posted April 5, 2006 Author Share Posted April 5, 2006 I tried it, but it still doesn't work. CODE: Run("C:\Program Files\Hitman Pro\hitmanpro2.exe")WinWaitActive("Hitman Pro")MouseClick("left", 370, 570, 1)ControlCommand("Hitman Pro", "", "Button43", "UnCheck", "")MouseClick("left", 279, 325, 1)ControlCommand("Hitman Pro", "", "Static6", "Check", "") ControlCommand("Hitman Pro", "", "Static7", "Check", "") MouseClick("left", 294, 343, 1)ControlCommand("Hitman Pro", "", "Button41", "Check", "") ControlCommand("Hitman Pro", "", "Edit4", "Check", "")MouseClick("left", 306, 359, 1)ControlCommand("Hitman Pro", "", "Button41", "Check", "") ControlCommand("Hitman Pro", "", "Edit4", "Check", "")ControlCommand("Hitman Pro", "", "Static4", "Check", "") ControlCommand("Hitman Pro", "", "SysHeader321", "Check", "") Link to comment Share on other sites More sharing options...
Developers Jos Posted April 5, 2006 Developers Share Posted April 5, 2006 (edited) looks like there are all kind of stacked hidden controls. This seems to work fine for the last page: ControlCommand("Hitman Pro", "", "Heuristic analysis", "Check", "") ControlCommand("Hitman Pro", "", "Scan all local drives", "Check", "") ControlCommand("Hitman Pro", "", "Search for low-risk threats", "Check", "") ControlCommand("Hitman Pro", "", "Improved spyware removal", "Check", "") Edited April 5, 2006 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. 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