Jump to content

Recommended Posts

Posted (edited)

what is the disable function or what is the code of that please can some one give that to me

i already search the help file of autoit but i cannot find it

Edited by Cloudsx
Posted (edited)

uhm disable function of Guicreate or button

i want to disable this one

$militair = GUICtrlCreateButton("militair",290,125,60)

that we can't enter the militair page

and if then i build a building like militair base that is enable so we can enter

Edited by Cloudsx
Posted

oke and what if,

this must be disable

$militair = GUICtrlCreateButton("militair",290,125,60)

and it must be disable or locked till i build a build then it must be onlock or able to go in

  • Moderators
Posted

Look at the include file GUIConstants.au3, it will give you information you need to enable/disable etc...

You can also look at GUI Control Styles in the help file for other items for GUI controls.

One button, with a really bad explination is not going to get you a 'good' answer, post your script and comment what you want in the script and maybe you could get a 'great/good' answer.

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.

Posted

but how can i enable it again with hout change the script

it must be enable with the building if it being built if it is build then it must being unlockt

Posted

#include <GUIConstants.au3>

GUICreate("My GUI state") ; will create a dialog box that when displayed is centered

$label = GUICtrlCreateLabel ("my disable label", 10,20)
GUICtrlSetState(-1,$GUI_DISABLE); the label is in disable state
                
$button = GUICtrlCreateButton ("my button", 50,50)
GUICtrlSetState(-1,$GUI_FOCUS)          ; the focus is on this button

GUISetState ()

; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()
    
    If $msg = $button Then
        GUICtrlSetState( $label,$GUI_ENABLE)
    EndIf
    
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend

8)

NEWHeader1.png

Posted

do you know this is dificult for me and for you because my english is bad and i dont under stand your hard words so it is difucult for both of us

Posted

for us folks that grew up using english it sometimes very difficult understanding someone who is using english as a second language. no offense intended! have you gotten the help you asked for?

Posted

Valuater supplied the code to disable a button, is that right so far?

if correct then what does this mean

and it must be disable or locked till i "build" a build then it must be onlock or able to go in

what do you mean "build"

Posted

He's making a game and wants it so you click on a button to build something, and the button is disabled while it is in progress and re-enables when it is finished. I think.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...