matlakala 0 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 Share this post Link to post Share on other sites
SmOke_N 211 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. Share this post Link to post Share on other sites
matlakala 0 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! Share this post Link to post Share on other sites
corz 10 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.. Share this post Link to post Share on other sites