go0b3r Posted February 22, 2006 Share Posted February 22, 2006 ok well this is my plan. I want to make a GUI with input box's, Im trying to get healthy and junk so what i want to do is have it know what my daily cal intake is, and give me like, 10 box's to put in what ive eaten and add the total cals of each. Ok this is gunna get complicated so stay with me. Id like to have dropdown menu's (the 10 box's mentioned above) and have prerecorded items of food, ie/ apple, salad what have you, and ill have it programed to say how many cals they have before hand, so when it reads the drop down as me having clicked apple, it'll know that apple = 100cals or whatever it might be. THEN id like it to add all of them together (have a button or something that when clicked will d the adding mentioned) and let me know if ive exceeded the daily limit or not (if its possible, have it also say how many cals off i am) and have all that info then sent to a .txt file so i can save it. I know this sounds confusing (and almost impossible to me) but im sure out there is a autoit guru that can help me. Thanks for any tips in advance. Link to comment Share on other sites More sharing options...
go0b3r Posted February 22, 2006 Author Share Posted February 22, 2006 (edited) this is all i got sofar expandcollapse popup; ---------------------------------------------------------------------------- ; ; AutoIt Version: 3.1.0 ; Author: A.N.Other <myemail@nowhere.com> ; ; Script Function: ; Template AutoIt script. ; ; ---------------------------------------------------------------------------- ; Script Start - Add your code below here #region --- GuiBuilder code Start --- ; Script generated by AutoBuilder 0.6 Prototype #include <GuiConstants.au3> GuiCreate("Cal-culator", 364, 476,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) GUISetBkColor (000000) $Button_1 = GuiCtrlCreateButton("Calculate", 80, 410, 100, 30) $Combo_2 = GuiCtrlCreateCombo("Combo2", 20, 230, 100, 21) $Combo_3 = GuiCtrlCreateCombo("Combo3", 130, 230, 100, 21) $Combo_4 = GuiCtrlCreateCombo("Combo4", 20, 130, 100, 21) $Combo_5 = GuiCtrlCreateCombo("Combo5", 130, 130, 100, 21) $Combo_6 = GuiCtrlCreateCombo("Combo6", 240, 180, 100, 21) $Combo_7 = GuiCtrlCreateCombo("Combo7", 240, 130, 100, 21) $Combo_8 = GuiCtrlCreateCombo("Combo8", 20, 180, 100, 21) $Combo_9 = GuiCtrlCreateCombo("Combo9", 130, 180, 100, 21) $Combo_10 = GuiCtrlCreateCombo("Combo10", 240, 230, 100, 21) $Combo_11 = GuiCtrlCreateCombo("Combo11", 20, 280, 100, 21) $Label_12 = GuiCtrlCreateLabel("Breakfast", 120, 110, 120, 20) $Input_13 = GuiCtrlCreateInput("Input13", 20, 360, 100, 20) $Label_14 = GuiCtrlCreateLabel("Cals burnt", 20, 340, 100, 30) $Label_15 = GuiCtrlCreateLabel("Lunch", 120, 160, 110, 20) $Label_16 = GuiCtrlCreateLabel("Dinner", 120, 210, 100, 20) $Label_17 = GuiCtrlCreateLabel("Snacks throught the day", 120, 260, 120, 20) $Combo_18 = GuiCtrlCreateCombo("Combo18", 130, 280, 100, 21) $Combo_19 = GuiCtrlCreateCombo("Combo19", 240, 280, 100, 21) $Group_20 = GuiCtrlCreateGroup("Food Intake", 10, 100, 340, 220) $Input_21 = GuiCtrlCreateInput("Input21", 150, 360, 100, 20) $Label_22 = GuiCtrlCreateLabel("Time spent at gym", 150, 340, 120, 30) $Pic_23 = GuiCtrlCreatePic( "C:\Documents and Settings\Owner\Desktop\halter-03.gif", 120, 10, 120, 80) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ;;; EndSelect WEnd Exit #endregion --- GuiBuilder generated code End --- also, how do i change Text color??? Edited February 22, 2006 by go0b3r Link to comment Share on other sites More sharing options...
go0b3r Posted February 22, 2006 Author Share Posted February 22, 2006 Hmm sorry i dont know much bout gui's yet, I changed it a bit, im trying to make 3 dropdowns side by side, all giving the same items of which you pick one, but now that i changed it its not working, someone help lol, heres the changed script expandcollapse popup; ---------------------------------------------------------------------------- ; ; AutoIt Version: 3.1.0 ; Author: A.N.Other <myemail@nowhere.com> ; ; Script Function: ; Template AutoIt script. ; ; ---------------------------------------------------------------------------- ; Script Start - Add your code below here #region --- GuiBuilder code Start --- ; Script generated by AutoBuilder 0.6 Prototype #include <GuiConstants.au3> GuiCreate("Cal-culator", 364, 476,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) GUISetBkColor (000000) $Button_1 = GuiCtrlCreateButton("Calculate", 80, 410, 100, 30) $Combo_4 = GuiCtrlCreateCombo("Apple", 20, 230, 100, 21) $Combo_4 = GUICtrlSetData(-1,"Egg white omelet|Toast","nothing") $Combo_3 = GuiCtrlCreateCombo("Combo3", 130, 230, 100, 21) $Combo_2 = GuiCtrlCreateCombo("Combo4", 20, 130, 100, 21) $Combo_5 = GuiCtrlCreateCombo("Combo5", 130, 130, 100, 21) $Combo_5 = GUICtrlSetData(-1,"Egg white omelet|Toast","nothing") $Combo_6 = GuiCtrlCreateCombo("Borscht", 20, 180, 100, 21) $Combo_6 = GUICtrlSetData(-1,"Salad|Chili","Nothing") $Combo_7 = GuiCtrlCreateCombo("Combo7", 240, 130, 100, 21) $Combo_7 = GUICtrlSetData(-1,"Egg white omelet|Toast","nothing") $Combo_8 = GuiCtrlCreateCombo("Borscht", 20, 180, 100, 21) $Combo_4 = GUICtrlSetData(-1,"Salad|Chili","Nothing") $Combo_9 = GuiCtrlCreateCombo("Borscht", 20, 180, 100, 21) $Combo_9 = GUICtrlSetData(-1,"Salad|Chili","Nothing") $Combo_10 = GuiCtrlCreateCombo("Combo10", 240, 230, 100, 21) $Combo_11 = GuiCtrlCreateCombo("Combo11", 20, 280, 100, 21) $Label_12 = GuiCtrlCreateLabel("Breakfast", 120, 110, 120, 20) $Input_13 = GuiCtrlCreateInput("Input13", 20, 360, 100, 20) $Label_14 = GuiCtrlCreateLabel("Cals burnt", 20, 340, 100, 30) $Label_15 = GuiCtrlCreateLabel("Lunch", 120, 160, 110, 20) $Label_16 = GuiCtrlCreateLabel("Dinner", 120, 210, 100, 20) $Label_17 = GuiCtrlCreateLabel("Snacks throught the day", 120, 260, 120, 20) $Combo_18 = GuiCtrlCreateCombo("Combo18", 130, 280, 100, 21) $Combo_19 = GuiCtrlCreateCombo("Combo19", 240, 280, 100, 21) $Group_20 = GuiCtrlCreateGroup("Food Intake", 10, 100, 340, 220) $Input_21 = GuiCtrlCreateInput("Input21", 150, 360, 100, 20) $Label_22 = GuiCtrlCreateLabel("Time spent at gym", 150, 340, 120, 30) $Pic_23 = GuiCtrlCreatePic( "C:\Documents and Settings\Owner\Desktop\halter-03.gif", 120, 10, 120, 80) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ;;; EndSelect WEnd Exit #endregion --- GuiBuilder generated code End --- Link to comment Share on other sites More sharing options...
cppman Posted February 22, 2006 Share Posted February 22, 2006 oh, i c... i think: does this help? expandcollapse popup; ---------------------------------------------------------------------------- ; ; AutoIt Version: 3.1.0 ; Author: A.N.Other <myemail@nowhere.com> ; ; Script Function: ; Template AutoIt script. ; ; ---------------------------------------------------------------------------- ; Script Start - Add your code below here #region --- GuiBuilder code Start --- ; Script generated by AutoBuilder 0.6 Prototype #include <GuiConstants.au3> GuiCreate("Cal-culator", 364, 476,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) GUISetBkColor(0x000000) $Button_1 = GuiCtrlCreateButton("Calculate", 80, 410, 100, 30) $Combo_4 = GuiCtrlCreateCombo("Apple", 20, 230, 100, 21) $Combo_4 = GUICtrlSetData(-1,"Egg white omelet|Toast","nothing") $Combo_3 = GuiCtrlCreateCombo("Combo3", 130, 230, 100, 21) $Combo_2 = GuiCtrlCreateCombo("Combo4", 20, 130, 100, 21) $Combo_5 = GuiCtrlCreateCombo("Combo5", 130, 130, 100, 21) $Combo_5 = GUICtrlSetData(-1,"Egg white omelet|Toast","nothing") $Combo_6 = GuiCtrlCreateCombo("Borscht", 20, 180, 100, 21) $Combo_6 = GUICtrlSetData(-1,"Salad|Chili","Nothing") $Combo_7 = GuiCtrlCreateCombo("Combo7", 240, 130, 100, 21) $Combo_7 = GUICtrlSetData(-1,"Egg white omelet|Toast","nothing") $Combo_8 = GuiCtrlCreateCombo("Borscht", 20, 180, 100, 21) $Combo_4 = GUICtrlSetData(-1,"Salad|Chili","Nothing") $Combo_9 = GuiCtrlCreateCombo("Borscht", 20, 180, 100, 21) $Combo_9 = GUICtrlSetData(-1,"Salad|Chili","Nothing") $Combo_10 = GuiCtrlCreateCombo("Combo10", 240, 230, 100, 21) $Combo_11 = GuiCtrlCreateCombo("Combo11", 20, 280, 100, 21) $Label_12 = GuiCtrlCreateLabel("Breakfast", 120, 110, 120, 20) GUICtrlSetColor($Label_12, 0xffffff) $Input_13 = GuiCtrlCreateInput("Input13", 20, 370, 100, 20) $Label_14 = GuiCtrlCreateLabel("Cals burnt", 20, 340, 100, 30) GUICtrlSetColor($Label_14, 0xffffff) $Label_15 = GuiCtrlCreateLabel("Lunch", 120, 160, 110, 20) GUICtrlSetColor($Label_15, 0xffffff) $Label_16 = GuiCtrlCreateLabel("Dinner", 120, 210, 100, 20) GUICtrlSetColor($Label_16, 0xffffff) $Label_17 = GuiCtrlCreateLabel("Snacks throught the day", 120, 260, 120, 20) GUICtrlSetColor($Label_17, 0xffffff) $Combo_18 = GuiCtrlCreateCombo("Combo18", 130, 280, 100, 21) $Combo_19 = GuiCtrlCreateCombo("Combo19", 240, 280, 100, 21) $Group_20 = GuiCtrlCreateGroup("Food Intake", 10, 100, 340, 220) $Input_21 = GuiCtrlCreateInput("Input21", 150, 370, 100, 20) $Label_22 = GuiCtrlCreateLabel("Time spent at gym", 150, 340, 120, 30) GUICtrlSetColor($Label_22, 0xffffff) $Pic_23 = GuiCtrlCreatePic( @ScriptDir & "halter-03.gif", 120, 10, 120, 80) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ;;; EndSelect WEnd Exit #endregion --- GuiBuilder generated code End --- Miva OS Project 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