Cloudsx Posted February 23, 2006 Share Posted February 23, 2006 how can i make this work func GUI2Create() If WinExists("gebouwen") then Return $2 = GUICreate("gebouwen",350,400) GUICtrlCreateButton("Cash Fabriek",25,75,75,25) GUICtrlCreateLabel("benodigheden:",25,25,75,25) GUICtrlCreateLabel("Cash:1000 Iron:100",25,50,75,25) GUISetState (@SW_SHOW) EndFunc but i want if the button is press then that the cash and iron go off and it must going to be build so how can i show that Link to comment Share on other sites More sharing options...
Cloudsx Posted February 23, 2006 Author Share Posted February 23, 2006 can i be able to do that Link to comment Share on other sites More sharing options...
ChrisL Posted February 23, 2006 Share Posted February 23, 2006 I can't speak for anyone else but I personally don't understand exactly what it is your trying to doI know that english may be a barrier but if you could try to tell us a bit better then someone could probably help you.. I hope this doesn't come accross as offensive [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
Cloudsx Posted February 23, 2006 Author Share Posted February 23, 2006 no your right my english is not very well so i will try to explane better look i make a game like a mafia game and i have cash and iron so if i made some thing like some buildings like a cash factory and iron factory but if i want to buy that it will cost cash and iron the cash factory cost 1000 cash and 125 iron if i pressed the button of the cash factory then it must going to built and the cash and the iron must going of the cash and iron what you have in your pocket you have 2500 cash and 500 iron so it must be then 1500 cash and 375 iron so that i want and i want that it be possible that i have buyed the building is this a beter explantion Link to comment Share on other sites More sharing options...
BigDod Posted February 23, 2006 Share Posted February 23, 2006 I can't speak for anyone else but I personally don't understand exactly what it is your trying to doI know that english may be a barrier but if you could try to tell us a bit better then someone could probably help you.. I hope this doesn't come accross as offensive If you read his previous Topic you will get a better understanding of what he wants. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
ChrisL Posted February 23, 2006 Share Posted February 23, 2006 (edited) Sorry I'm still confused. Is this anything like what you want? expandcollapse popup#include <GuiConstants.au3> ;you could read in these values from your ini file rather than coding them like I have Global $Cash = 2500, $Iron = 500 Gui2create() func GUI2Create() If WinExists("gebouwen") then Return 0 $2 = GUICreate("gebouwen",350,400) $Button = GUICtrlCreateButton("Cash Fabriek",25,75,75,25) GUICtrlCreateLabel("benodigheden:",25,25,75,25) GUICtrlCreateLabel("Cash:1000 Iron:100",25,50,75,25) GUISetState (@SW_SHOW) While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $Msg = $Button If $Cash - 1000 < 0 then MsgBox (0,"Sorry", "You do not have enough Cash, you only have " & $Cash & " left") Else $Cash = $Cash - 1000 ; you can write the Cash values back to your ini file here EndIf If $Iron - 100 < 0 then MsgBox (0,"Sorry", "You do not have enough Iron, you only have " & $Iron & " left") Else $Iron = $iron - 100 ; you can write the Iron values back to your ini file here Endif MsgBox (0,"You have", "Cash = " & $Cash & @crlf & "Iron = " & $Iron) Case Else ;;; EndSelect WEnd Exit EndFunc Edited February 23, 2006 by ChrisL [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
Cloudsx Posted February 23, 2006 Author Share Posted February 23, 2006 (edited) the script isgood but i want it go off this script #include <GUIConstants.au3> IniWrite("rechours.ini", "Resources", "Cash", 2500) IniWrite("rechours.ini", "Resources", "Iron", 500) IniWrite("rechours.ini", "Resources", "ederuim", 0) IniWrite("rechours.ini", "Resources", "electricity", 0) GUICreate("game",350,400); will create a dialog box that when displayed is centered GUISetState (@SW_SHOW); will display an empty dialog $Cash = iniread("rechours.ini", "Resources", "Cash",0) $iron = iniread("rechours.ini", "Resources", "iron",0) $ederuim = iniread("rechours.ini", "Resources", "ederuim",0) $electricity = iniread("rechours.ini", "Resources", "electricity",0) GUICtrlCreatePic("Cash.jpg",25,10,20,20) $Label = GuiCtrlCreateLabel($Cash,50,15) GUICtrlCreatePic("iron.jpg",115,10,20,20) $label = GUICtrlCreateLabel($iron,140,15) GUICtrlCreatePic("ederuim.jpg",200,10,20,20) $label = GUICtrlCreateLabel($ederuim,225,15) GUICtrlCreatePic("electricity.jpg",275,10,20,20) $label = GUICtrlCreateLabel($electricity, 300,15) look to this script place it in a own script and look what i meen the main guicreate there has the cash and iron must going off Edited February 23, 2006 by Cloudsx Link to comment Share on other sites More sharing options...
Cloudsx Posted February 23, 2006 Author Share Posted February 23, 2006 can some one help me with that 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