Sign in to follow this  
Followers 0
Cloudsx

disable

17 posts in this topic

#1 ·  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

Share this post


Link to post
Share on other sites



disable what?

you need to be a little more clear of what you ask for... we dont know what you are thinking

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

#3 ·  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

Share this post


Link to post
Share on other sites

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

GUICtrlSetState( -1, $GUI_DISABLE)

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

look up GUICtrlSetState

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

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.


[center]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.[/center]

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

#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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

@Valuater

i can see you guy's that have been around a while are part mind reader! i applaud your effort even with the language barrier.

Share this post


Link to post
Share on other sites
:o:geek: what you meen

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

what you say is right and i dont feeling me attack by you it only true

and no i am not futher where i whas before i started this topic :o;):geek:

Share this post


Link to post
Share on other sites

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"

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

i gave him the answers and a demo... i do not know what more i could do

Sorry

8)


NEWHeader1.png

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  
Followers 0