Ghost21 Posted June 16, 2009 Posted June 16, 2009 So what I meant was: $Button1 = GUICtrlCreateButton("Check Up", 8, 44, 145, 23, 0) then I have $Button1 = GUICtrlCreateMenuItem("Check Up", $Mainmenu) The problem is that it would use the last item. As the one that works correctley. So when I'm calling If $nMsg = $Button1 Then < BUTTON DATA HERE > else endif It of course looks for the last $Button1 entry even though it draws the first one but if I click on the first one it doesn't respond ... Is there something I'm missing ? I want if I click on either one it runs whats inside " < BUTTON DATA HERE > ". Thanks
Skruge Posted June 16, 2009 Posted June 16, 2009 Is there something I'm missing ?Yes, you're missing the button's control ID because you overwrote its value. Use two different variables or use event mode. [font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font]
billthecreator Posted June 16, 2009 Posted June 16, 2009 $button1 = GuiCtrlCreatButton("Check Up", 2, 2, 100, 21) $menu1 = GUICtrlCreateMenuItem("Check Up", $Mainmenu) While 1 $msg = GuiGetMsg() Switch $msg Case $button1, $menu1 ;put code here EndSwitch WendoÝ÷ Úâ*.j·®²)àûazv®¶sbb33c¶'WGFöãÒwV7G&Ä7&VD'WGFöâgV÷C´6V6²WgV÷C²Â"Â"ÂÂ#¢b33c¶ÖVçSÒuT7G&Ä7&VFTÖVçTFVÒgV÷C´6V6²WgV÷C²Âb33c´ÖæÖVçR ¥vÆR¢b33c¶×6rÒwVvWD×6r¤bb33c¶×6rÒb33c¶'WGFöã÷"b33c¶×6rÒb33c¶ÖVçSFVࣷWB6öFRW&P¤VæF`¥vVæ@ [font=Microsoft Sans Serif]My Scripts: From Most recent to least.[/font]Countdown GUI | QLOCK TWO | FlipClock | Slot Machine My UDF:_GenerateRandomNoRepeat | _GuiSnap
Ghost21 Posted June 16, 2009 Author Posted June 16, 2009 ahhh thanks alot.. I thought it would be something simple and stupid of me for misssing...
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