DeathnLife Posted August 9, 2006 Share Posted August 9, 2006 I am making an auto potting script for a game called Silkroad Online, and I got basic functionality working. But I wish to expand my project and add a GUI interface that changes the way that the script runs. So far I got how I want my GUI looking but due to unforseen circumstances I can't do testing any more. Ading radios in two groups to affect screen resolution and potion slot in the quickbar. So if your resolution is different it will look in a different place for the health bar. And what number to press when health has reached a certain point. I want to know how to use Radios properly (as in how does auto it check if radios are selected) I just assumed that this was how it was done: $res1 = GUICtrlCreateRadio ("800x600", 10, 60) $potionslotx = GUICtrlCreateRadio ("Middle Mouse" I have included every combination of options because I don't know a different way around it. Thanks for reading through this. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted August 9, 2006 Moderators Share Posted August 9, 2006 (edited) #include <GUIConstants.au3> GUICreate("My GUI radio") ; will create a dialog box that when displayed is centered $radio1 = GUICtrlCreateRadio ("Radio 1", 10, 10, 120, 20) $radio2 = GUICtrlCreateRadio ("Radio 2", 10, 40, 120, 20) GUICtrlSetState ($radio2, $GUI_CHECKED) GUISetState () ; will display an dialog box with 1 checkbox ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $radio1 And BitAND(GUICtrlRead($radio1), $GUI_CHECKED) = $GUI_CHECKED MsgBox(64, 'Info:', 'You clicked the Radio 1 and it is Checked.') Case $msg = $radio2 And BitAND(GUICtrlRead($radio2), $GUI_CHECKED) = $GUI_CHECKED MsgBox(64, 'Info:', 'You clicked on Radio 2 and it is Checked.') EndSelect Wend Edited August 9, 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...
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