matlakala Posted October 12, 2007 Posted October 12, 2007 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
Moderators SmOke_N Posted October 12, 2007 Moderators Posted October 12, 2007 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.
matlakala Posted October 13, 2007 Author Posted October 13, 2007 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!
corz Posted October 13, 2007 Posted October 13, 2007 for the record.. $foo = GUICtrlCreateCheckbox("My Checkbox", 10, 10) ... GUICtrlSetState($foo, $GUI_DISABLE) ;o) (or nothing is foolproof to the sufficiently talented fool..
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