Jump to content
Sign in to follow this  
DeathnLife

Radios

Recommended Posts

DeathnLife

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.

Share this post


Link to post
Share on other sites
SmOke_N

#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 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.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×