Canasian Posted April 24, 2009 Share Posted April 24, 2009 My GUI buttons aren't showing up.. why not? Here is my code. expandcollapse popup#include <GuiConstants.au3> Dim $getmess Dim $guic, $guib Dim $Cl = True Dim $Ex = False HotKeySet("{F10}","Cl") $guic = GUICreate("My First GUI", 650,400) $guib = GuiCtrlCreateButton("Start Bot",485,510,30,20) $exitb = GuiCtrlCreateButton("Exit",785,510,30,20) $gamebox = ObjCreate("ShockwaveFlash.ShockwaveFlash.1") $creategb = GUICtrlCreateObj($gamebox, 0,0,650,330) With $gamebox .bgcolor = 0x000000 .Movie = "http://www.flashninjaclan.com/tutorialpages/shootinggame/shootinggame.swf" .Loop = True .wmode = "Opaque" EndWith Func Cl() Exit EndFunc GUISetState() Do $getmess = GUIGetMsg() If ($getmess = $guib) Then MsgBox(0,"Dun dun dun","Woot, it worked!") EndIf Until $Ex Or ($getmess = -3) Link to comment Share on other sites More sharing options...
Valuater Posted April 24, 2009 Share Posted April 24, 2009 (edited) $guic = GUICreate("My First GUI", 650,400)$guib = GuiCtrlCreateButton("Start Bot",485,510,30,20)$exitb = GuiCtrlCreateButton("Exit",785,510,30,20)The buttons are off the gui8) Edited April 24, 2009 by Valuater Link to comment Share on other sites More sharing options...
Canasian Posted April 24, 2009 Author Share Posted April 24, 2009 (edited) $guic = GUICreate("My First GUI", 650,400)$guib = GuiCtrlCreateButton("Start Bot",485,510,30,20)$exitb = GuiCtrlCreateButton("Exit",785,510,30,20)The buttons are off the gui8)Hahaha.. good point.. thanks.. hm.. my bad wasn't thinking.. ok so how do i find out where i want to put my buttons? I used the autoit window info to find the mouse position.. but i guess mouse position on the GUI says 510 has nothing to do with the GUI button positions huh..Does the mouse position have to do with the coordinates of your whole desktop or whatever? but what if you want to just find the mouse position in a game or a GUI? do you have to use WinMove at 0,0 or something just to test? Edited April 24, 2009 by Canasian Link to comment Share on other sites More sharing options...
Canasian Posted April 24, 2009 Author Share Posted April 24, 2009 (edited) I got them there by Winmoving it to 0,0 then i used trial and error to get it how i want it to look lol so i got this. $guic = GUICreate("Simple Click Bot", 650,400) $guib = GuiCtrlCreateButton("Start Bot",125,335,120,60) $exitb = GuiCtrlCreateButton("Exit",425,335,120,60) I don't want to use Koda.. but how do u find where you want your buttons to show up? Edited April 24, 2009 by Canasian Link to comment Share on other sites More sharing options...
Valuater Posted April 24, 2009 Share Posted April 24, 2009 educated guess combined with trial and error 8) Link to comment Share on other sites More sharing options...
Canasian Posted April 25, 2009 Author Share Posted April 25, 2009 Bleh another problem.. why doesn't this work? $exitb = GuiCtrlCreateButton("Exit",425,335,120,60) $getmess = GUIGetMsg() If ($Getmess = $exitb) Then Exit EndIf Link to comment Share on other sites More sharing options...
Canasian Posted April 25, 2009 Author Share Posted April 25, 2009 (edited) OMG!!! After an hour or so of messing around trying everything i could think of.. i fixed it by myself!! zomg.. i'm so proud and happy woo fixed exit button... and learned to use case and select and or commands =D yay i'm learning. lol expandcollapse popup#include <GuiConstants.au3> Dim $getmess Dim $guic, $guib Dim $Cl = True Dim $Ex = False HotKeySet("{F10}","Cl") $guic = GUICreate("Simple Click Bot", 650,400) $guib = GuiCtrlCreateButton("Start Bot",125,335,120,60) $exitb = GuiCtrlCreateButton("Exit",425,335,120,60) $gamebox = ObjCreate("ShockwaveFlash.ShockwaveFlash.1") $creategb = GUICtrlCreateObj($gamebox, 0,0,650,330) With $gamebox .bgcolor = 0x000000 .Movie = "http://www.flashninjaclan.com/tutorialpages/shootinggame/shootinggame.swf" .Loop = True .wmode = "Opaque" EndWith Func Cl() Exit EndFunc GUISetState() While 1 $getmess = GUIGetMsg() Select Case ($getmess = $guib) MsgBox(0,"Dun dun dun","Woot, it worked!") Case ($getmess = $exitb) Or $getmess = -3 ExitLoop Exit EndSelect Wend Edited April 25, 2009 by Canasian Link to comment Share on other sites More sharing options...
Valuater Posted April 25, 2009 Share Posted April 25, 2009 @ 7:30 you posted a problem and 18 minutes later you fixed it... that's pretty good!! 8) Link to comment Share on other sites More sharing options...
FinalVersion Posted April 25, 2009 Share Posted April 25, 2009 Use "Koda" to make your gui's. [center][+] Steam GUI [+][+] Clipboard Tool [+][+] System :: Uptime [+][+] StarCraft II Mouse Trap [+][/center] Link to comment Share on other sites More sharing options...
Valuater Posted April 25, 2009 Share Posted April 25, 2009 Use "Koda" to make your gui's....I don't want to use Koda.. but how do u find where you want your buttons to show up?8) Link to comment Share on other sites More sharing options...
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