Jump to content
Sign in to follow this  
matlakala

ControlDisable not working?

Recommended Posts

matlakala

Hey!

I'm new to AutoIt and currently I'm still trying to figure out how everything works.

During my explorations I tried to disable a button of a message box but ControlDisable doesn't seem to work.

Could anyone be so kind and have a look at my code?

Before someone asks... I copied my Info from the Window Info program.

Don't get disturbed by FileOpen... I left it in there to avoid editing.

-------------------------------------------------

$file = FileOpen("test.txt", 1)

MsgBox(6,"123","This is a test")

;$succ=ControlHide("123", "", "[ClassnameNN:Button3]")

;$succ=ControlDisable("123", "", "[CLASS:Button; INSTANCE:3]")

;$succ=ControlDisable("123", "&Weiter", "[CLASS:Button; INSTANCE:3]")

;$succ=ControlDisable("123", "&Weiter", "")

;$succ=ControlDisable("123", "&Weiter", 11)

$succ=ControlDisable("123", "", 11)

If $file <> -1 Then

FileWrite($file, $succ & @CRLF)

EndIf

FileClose ($file)

-------------------------------------------------

As you can see, I tried a couple of things but nothing really worked.

Do I misunderstand the concept or is it a bug?

Thanks a lot

Jens

Share this post


Link to post
Share on other sites
SmOke_N

Sorry... what are you trying to disable... the Message Box?

If so... understand that no code is ran when you get to a message box, until after the message box has been closed.


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
matlakala

If so... understand that no code is ran when you get to a message box, until after the message box has been closed.

Alright, now I see where my problem lies.

I should work a bit more on my understanding than just using some functions.

Thanks a lot!

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  

×