ShaneHale Posted June 6, 2007 Posted June 6, 2007 Hello All, I am not sure that I am posting in the correct category since I am mostly describing what I want to do and my situation. But I do in fact need ( and would Greatly appreciate) a little help. What I am trying to do is create a cash register type of applictaion using autoit because it is the only thing besides php and a little vbscript that I have any experience with. If this has been done please direct me to the topic (did not find anything by searching for POS or Cash register) and I will fade away. If it has not then these are the programs requirements: 1. Needs to add up items. Nedd to subtract them as long as "tender" has not been sent. 2. Needs to format to print to a reciept printer. 3. Needs to keep a tally of all transactions for the day and have a password cobntrolled batch out function at the end of the shift 4. Needs to show change from recieved cash( if sale was $18.53 and patron gave a $20 then show the difference of $1.47) 5. For our purposes no need to figure taxes because prices include taxes - but it could be a feature for others who may use it. 6. Would like to have editable symbols or pictures to use for buttons to go along with standard 10 key. For example if patron wanted 3 soda's at 2 dollars the cashier would hit the SODA symbol kea and the 3 key and the display would show $6.00. 7. Icing on the cake would be to intergrate with IC Verify Credit Card software. I have looked out there around the net and there are several free solutions for this already but most of them are too much and too confusing for easy use and quick deployment. We just need a way to take money and keep track of how much we took in in the shift, that is it no need for inventory and time clock, etc. I can visualize how to do most of this in my head, I think with a little thought all of it is doable with Autoit. So anyways my questions at this are: 1. Is there a math or arithmetic function out ther that would help to streamline the code for this project? 2. Could someone help me with my first issue, updateing the text in label control that will eventually be my display. Here is the code I have and my approach does not work. Please dont laugh at me. Well ok it is alright to laugh but please dont say a bunch of discouraging stuff. I know I am not a super intellegent programmer guy like a lot of you, but I am at least trying and I think I can do this with a little help. Thanks in advance, Shane Hale expandcollapse popup#include <GUIConstants.au3> GUICreate('Simple POS', 450, 450) $stuff ='' Opt("GUICoordMode",2) $display = GuiCtrlCreateLabel($stuff, 0, 0, 450, 50) GuiCtrlSetBkColor(-1, 0x00FF00) $Button_7 = GUICtrlCreateButton ( "7", -150, 0, 50) $Button_8 = GUICtrlCreateButton ( "8", 0, -1) $Button_9= GUICtrlCreateButton ( "9", 0, -1) $Button_4 = GUICtrlCreateButton ( "4", -150, 0) $Button_5 = GUICtrlCreateButton ( "5", 0, -1) $Button_6 = GUICtrlCreateButton ( "6", 0, -1) $Button_1 = GUICtrlCreateButton ( "1", -150, 0) $Button_2 = GUICtrlCreateButton ( "2", 0, -1) $Button_3 = GUICtrlCreateButton ( "3", 0, -1) $Button_0 = GUICtrlCreateButton ( "0", -150, 0, 150) GUISetState () While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button_1 $stuff='1' Case $msg = $Button_2 $stuff='3' Case $msg = $Button_3 $stuff='3' Case $msg = $Button_4 $stuff='4' Case $msg = $Button_5 $stuff='5' Case $msg = $Button_6 $stuff='6' Case $msg = $Button_7 $stuff='7' Case $msg = $Button_8 $stuff='8' Case $msg = $Button_9 $stuff='9' Case $msg = $Button_0 $stuff='0' EndSelect Wend
ResNullius Posted June 6, 2007 Posted June 6, 2007 Well, I have a lot of experience with various full-fledged POS programs and I can tell you that what starts out as simple will probably soon become complex. You are probably going to want to end up using some kind of database backend to keep a permanent record of transcations, etc, and that will also make it easier to do your day's end tallies, etc. Might want to check out the SQLite thread: http://www.autoitscript.com/forum/index.php?showtopic=17099Good Luck!
Zedna Posted June 6, 2007 Posted June 6, 2007 For GUI development I recommend KodaHere is code for display $stuff:expandcollapse popup#include <GUIConstants.au3> GUICreate('Simple POS', 450, 450) $stuff ='' Opt("GUICoordMode",2) $display = GuiCtrlCreateLabel($stuff, 0, 0, 450, 50) GuiCtrlSetBkColor(-1, 0x00FF00) $Button_7 = GUICtrlCreateButton ( "7", -150, 0, 50) $Button_8 = GUICtrlCreateButton ( "8", 0, -1) $Button_9= GUICtrlCreateButton ( "9", 0, -1) $Button_4 = GUICtrlCreateButton ( "4", -150, 0) $Button_5 = GUICtrlCreateButton ( "5", 0, -1) $Button_6 = GUICtrlCreateButton ( "6", 0, -1) $Button_1 = GUICtrlCreateButton ( "1", -150, 0) $Button_2 = GUICtrlCreateButton ( "2", 0, -1) $Button_3 = GUICtrlCreateButton ( "3", 0, -1) $Button_0 = GUICtrlCreateButton ( "0", -150, 0, 150) GUISetState () While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button_1 $stuff&='1' GUICtrlSetData($display, $stuff) Case $msg = $Button_2 $stuff&='2' GUICtrlSetData($display, $stuff) Case $msg = $Button_3 $stuff&='3' GUICtrlSetData($display, $stuff) Case $msg = $Button_4 $stuff&='4' GUICtrlSetData($display, $stuff) Case $msg = $Button_5 $stuff&='5' GUICtrlSetData($display, $stuff) Case $msg = $Button_6 $stuff&='6' GUICtrlSetData($display, $stuff) Case $msg = $Button_7 $stuff&='7' GUICtrlSetData($display, $stuff) Case $msg = $Button_8 $stuff&='8' GUICtrlSetData($display, $stuff) Case $msg = $Button_9 $stuff&='9' GUICtrlSetData($display, $stuff) Case $msg = $Button_0 $stuff&='0' GUICtrlSetData($display, $stuff) EndSelect WendGood luck with your project ... Resources UDF Â ResourcesEx UDF Â AutoIt Forum Search
BananaFredSoft Posted June 6, 2007 Posted June 6, 2007 Use GUICtrlSetData to set the text of labels.2. Could someone help me with my first issue, updateing the text in label control that will eventually be my display. -ColinSite:www.bananafredsoft.comStuff:Simple Text Editor - MediaPlayer - Animator - BananaDB - BananaNotes - Chatta - Filesearch - Excuse GeneratorMy YouTube channel:http://www.youtube.com/user/colipat
ShaneHale Posted June 6, 2007 Author Posted June 6, 2007 WOW... @ Everyone, Thank you all for your responses, I was waiting to get flamed for knowing there were other opensource alternatives to doing this.... It is funny because I was just going through the Koda threads, and I just realized that what I wanted had something to do with GUICtrlSetData I just was not seeing it. And @ResNullius Thank you for the tip and I totally agree that this is going to become more and more complex and that there is a place for SQL in the projects future.... Regards, Shane Hale
ShaneHale Posted June 7, 2007 Author Posted June 7, 2007 Ok here is what I have after taking Zedna's suggestion to use Koda: expandcollapse popup#include <GUIConstants.au3> #Region ### START Koda GUI section ### Form=c:\security\koda_1.6.0.2\forms\aform1.kxf $Form1 = GUICreate("Simple POS", 674, 586, 414, 172) $Tab1 = GUICtrlCreateTab(8, 8, 657, 569) $TabSheet1 = GUICtrlCreateTabItem("REGISTER") $Group1 = GUICtrlCreateGroup("", 20, 40, 633, 521) GUICtrlSetColor(-1, 0x989898) $Label1 = GUICtrlCreateLabel("", 38, 55, 597, 208, BitOR($SS_RIGHT,$SS_CENTERIMAGE,$SS_SUNKEN,$WS_BORDER)) GUICtrlSetFont(-1, 12, 400, 0, "Lucida Console") GUICtrlSetColor(-1, 0xFFFF00) GUICtrlSetBkColor(-1, 0x008000) $Button1 = GUICtrlCreateButton("1", 412, 360, 59, 49, 0) GUICtrlSetFont(-1, 18, 400, 0, "Lucida Console") $Button2 = GUICtrlCreateButton("2", 468, 360, 59, 49, 0) GUICtrlSetFont(-1, 18, 400, 0, "Lucida Console") $Button3 = GUICtrlCreateButton("3", 524, 360, 59, 49, 0) GUICtrlSetFont(-1, 18, 400, 0, "Lucida Console") $Button4 = GUICtrlCreateButton("4", 412, 312, 59, 49, 0) GUICtrlSetFont(-1, 18, 400, 0, "Lucida Console") $Button5 = GUICtrlCreateButton("5", 468, 312, 59, 49, 0) GUICtrlSetFont(-1, 18, 400, 0, "Lucida Console") $Button6 = GUICtrlCreateButton("6", 524, 312, 59, 49, 0) GUICtrlSetFont(-1, 18, 400, 0, "Lucida Console") $Button7 = GUICtrlCreateButton("7", 412, 264, 59, 49, 0) GUICtrlSetFont(-1, 18, 400, 0, "Lucida Console") $Button8 = GUICtrlCreateButton("8", 468, 264, 59, 49, 0) GUICtrlSetFont(-1, 18, 400, 0, "Lucida Console") $Button9 = GUICtrlCreateButton("9", 524, 264, 59, 49, 0) GUICtrlSetFont(-1, 18, 400, 0, "Lucida Console") $Button10 = GUICtrlCreateButton("0", 412, 408, 171, 49, 0) GUICtrlSetFont(-1, 18, 400, 0, "Lucida Console") $Button11 = GUICtrlCreateButton("+", 580, 264, 55, 121, 0) GUICtrlSetFont(-1, 28, 400, 0, "Lucida Console") $Button12 = GUICtrlCreateButton("-", 580, 384, 55, 73, 0) GUICtrlSetFont(-1, 28, 400, 0, "Lucida Console") $Button13 = GUICtrlCreateButton("LG SODA", 36, 264, 75, 49, 0) $Button14 = GUICtrlCreateButton("BURGER", 36, 312, 75, 49, 0) $Button15 = GUICtrlCreateButton("COCOA", 36, 360, 75, 49, 0) $Button16 = GUICtrlCreateButton("LG CANDY", 36, 408, 75, 49, 0) $Button17 = GUICtrlCreateButton("RG SODA", 108, 264, 75, 49, 0) $Button18 = GUICtrlCreateButton("HOTDOG", 108, 312, 75, 49, 0) $Button19 = GUICtrlCreateButton("CAPPICINO", 108, 360, 75, 49, 0) $Button20 = GUICtrlCreateButton("SM CANDY", 108, 408, 75, 49, 0) $Button21 = GUICtrlCreateButton("WATER", 180, 264, 75, 49, 0) $Button22 = GUICtrlCreateButton("POPCORN", 180, 312, 75, 49, 0) $Button23 = GUICtrlCreateButton("ICE", 180, 360, 75, 49, 0) $Button24 = GUICtrlCreateButton("CHIPS", 180, 408, 75, 49, 0) $Button25 = GUICtrlCreateButton("CHILL", 252, 264, 75, 49, 0) $Button26 = GUICtrlCreateButton("NACHOS", 252, 312, 75, 49, 0) $Button27 = GUICtrlCreateButton("CHIPS", 252, 360, 75, 49, 0) $Button28 = GUICtrlCreateButton("MUFFINS", 252, 408, 75, 49, 0) $Button29 = GUICtrlCreateButton("CANCEL", 164, 504, 91, 41, 0) GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif") $Button30 = GUICtrlCreateButton("CREDIT CARD", 252, 504, 163, 41, 0) GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif") $Button31 = GUICtrlCreateButton("TENDER CASH", 412, 504, 223, 41, 0) GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif") $Button32 = GUICtrlCreateButton("VOID", 36, 504, 131, 41, 0) GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif") $Button33 = GUICtrlCreateButton("SUBTOTAL", 36, 456, 291, 49, 0) GUICtrlSetFont(-1, 18, 800, 0, "MS Sans Serif") $Button34 = GUICtrlCreateButton("TOTAL", 324, 456, 311, 49, 0) GUICtrlSetFont(-1, 18, 800, 0, "MS Sans Serif") $Button35 = GUICtrlCreateButton("X", 328, 264, 83, 193, 0) GUICtrlSetFont(-1, 36, 400, 0, "Lucida Console") GUICtrlCreateGroup("", -99, -99, 1, 1) $TabSheet2 = GUICtrlCreateTabItem("TRANSACTIONS") $Group2 = GUICtrlCreateGroup("", 20, 40, 633, 521) $Date1 = GUICtrlCreateDate("2007/06/06 17:04:58", 228, 64, 186, 21) $ListView1 = GUICtrlCreateListView("", 36, 104, 602, 438) GUICtrlCreateGroup("", -99, -99, 1, 1) $TabSheet3 = GUICtrlCreateTabItem("BATCH") $Group3 = GUICtrlCreateGroup("", 20, 40, 633, 529) $Date2 = GUICtrlCreateDate("2007/06/06 17:15:22", 228, 64, 186, 21) GUICtrlCreateGroup("", -99, -99, 1, 1) GUICtrlCreateTabItem("") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Label1 Case $Button8 EndSwitch WEnd That is the look and that is our entire inventory for the consessions stand here at Tuacahn Center for the Arts (http://www.tuacahn.org) now I just need to get it to do something. the idea is either manual entry is available using the ten key, or the cashier can use the preconfigured buttons to click an order in. So if patron wanted 2 popcorns and 1 large coke the cashier would click popcorn x 2 + lg soda then subtotal. As the arder is ringing up the display would show the items and their amounts and the subtotal then if the patron wants no other items then the cashier would hit total then hit the appropiate method of payment. My next question is could someone just show me on one button how to get this code to both display the appropiate output and how to do the math. Online and I will be on my way. For now because of time constraints, I am not going to use the sql backend idea, but intend to later when I have more time. I will just keep the days transactions saved in a log file and print it when the batch button is clicked. Thanks for any assistance... Shane Hale
tAKTelapis Posted June 7, 2007 Posted June 7, 2007 Well, i run a LAN, and a POS has been something i have wanted, so i might help out a little. For starters, this will display Water. BUT, i think you want a "List" not a Label, a list will work better. So, where you have created Label 1, do this instead: $Label1 = GUICtrlCreateList("", 38, 55, 597, 208, BitOR($SS_RIGHT,$SS_CENTERIMAGE,$SS_SUNKEN,$WS_BORDER)) Then, replace your loop with this: While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button21 GuiCtrlSetData($Label1, "Water|") Case $Button22 GuiCtrlSetData($Label1, "Popcorn|") Case $Button8 EndSwitch WEnd now click on Water and Popcorn in different variations to your hearts content, hope this gets you a step further.
ShaneHale Posted June 7, 2007 Author Posted June 7, 2007 @tAKTelapis, I like the idea and have updated the code accordingly and did a slight change to it - see below - but I am realizing there does not seem to be a way to update specific line items. using this method. I think that would make [POPCORN] [X] [3] not able to update only a single item to make it say in the display ($list1) that POPCORN x 3 or the order has 3 popcorns, rather than POPCORN POPCORN POPCORN. I am therefore looking into the listview gui function as perhaps a better alternative. (used these "[" and "]" to indicate a button press in this forum) for now here is what I have.... Note I added a label below the list to indicat the subtotal .... I am working on the list view and the math as a single issue. Any help or suggestions are still immensely appreciated... Shane Hale expandcollapse popup#include <GUIConstants.au3> #Region ### START Koda GUI section ### Form=c:\security\koda_1.6.0.2\forms\aform1.kxf $Form1_1 = GUICreate("Simple POS", 674, 586, 340, 359) $Tab1 = GUICtrlCreateTab(8, 8, 657, 569) $TabSheet1 = GUICtrlCreateTabItem("REGISTER") $Group1 = GUICtrlCreateGroup("", 20, 40, 633, 521) GUICtrlSetColor(-1, 0x989898) $List1 = GUICtrlCreateList("", 38, 55, 597, 165, BitOR($SS_RIGHT,$SS_CENTERIMAGE,$SS_SUNKEN,$WS_BORDER)) GUICtrlSetFont(-1, 12, 400, 0, "Lucida Console") GUICtrlSetColor(-1, 0xFFFF00) GUICtrlSetBkColor(-1, 0x008000) $Label1 = GUICtrlCreateLabel("", 185, 212, 293, 40, BitOR($SS_CENTER,$SS_CENTERIMAGE,$SS_SUNKEN,$WS_BORDER)) GUICtrlSetFont(-1, 22, 800, 0, "Lucida Console") GUICtrlSetColor(-1, 0xFFFF00) GUICtrlSetBkColor(-1, 0x008000) $Button1 = GUICtrlCreateButton("1", 412, 360, 59, 49, 0) GUICtrlSetFont(-1, 18, 400, 0, "Lucida Console") $Button2 = GUICtrlCreateButton("2", 468, 360, 59, 49, 0) GUICtrlSetFont(-1, 18, 400, 0, "Lucida Console") $Button3 = GUICtrlCreateButton("3", 524, 360, 59, 49, 0) GUICtrlSetFont(-1, 18, 400, 0, "Lucida Console") $Button4 = GUICtrlCreateButton("4", 412, 312, 59, 49, 0) GUICtrlSetFont(-1, 18, 400, 0, "Lucida Console") $Button5 = GUICtrlCreateButton("5", 468, 312, 59, 49, 0) GUICtrlSetFont(-1, 18, 400, 0, "Lucida Console") $Button6 = GUICtrlCreateButton("6", 524, 312, 59, 49, 0) GUICtrlSetFont(-1, 18, 400, 0, "Lucida Console") $Button7 = GUICtrlCreateButton("7", 412, 264, 59, 49, 0) GUICtrlSetFont(-1, 18, 400, 0, "Lucida Console") $Button8 = GUICtrlCreateButton("8", 468, 264, 59, 49, 0) GUICtrlSetFont(-1, 18, 400, 0, "Lucida Console") $Button9 = GUICtrlCreateButton("9", 524, 264, 59, 49, 0) GUICtrlSetFont(-1, 18, 400, 0, "Lucida Console") $Button10 = GUICtrlCreateButton("0", 412, 408, 171, 49, 0) GUICtrlSetFont(-1, 18, 400, 0, "Lucida Console") $Button11 = GUICtrlCreateButton("+", 580, 264, 55, 121, 0) GUICtrlSetFont(-1, 28, 400, 0, "Lucida Console") $Button12 = GUICtrlCreateButton("-", 580, 384, 55, 73, 0) GUICtrlSetFont(-1, 28, 400, 0, "Lucida Console") $Button13 = GUICtrlCreateButton("LG SODA", 36, 264, 75, 49, 0) $Button14 = GUICtrlCreateButton("BURGER", 36, 312, 75, 49, 0) $Button15 = GUICtrlCreateButton("COCOA", 36, 360, 75, 49, 0) $Button16 = GUICtrlCreateButton("LG CANDY", 36, 408, 75, 49, 0) $Button17 = GUICtrlCreateButton("RG SODA", 108, 264, 75, 49, 0) $Button18 = GUICtrlCreateButton("HOTDOG", 108, 312, 75, 49, 0) $Button19 = GUICtrlCreateButton("CAPPICINO", 108, 360, 75, 49, 0) $Button20 = GUICtrlCreateButton("SM CANDY", 108, 408, 75, 49, 0) $Button21 = GUICtrlCreateButton("WATER", 180, 264, 75, 49, 0) $Button22 = GUICtrlCreateButton("POPCORN", 180, 312, 75, 49, 0) $Button23 = GUICtrlCreateButton("ICE", 180, 360, 75, 49, 0) $Button24 = GUICtrlCreateButton("CHIPS", 180, 408, 75, 49, 0) $Button25 = GUICtrlCreateButton("CHILL", 252, 264, 75, 49, 0) $Button26 = GUICtrlCreateButton("NACHOS", 252, 312, 75, 49, 0) $Button27 = GUICtrlCreateButton("CHIPS", 252, 360, 75, 49, 0) $Button28 = GUICtrlCreateButton("MUFFINS", 252, 408, 75, 49, 0) $Button29 = GUICtrlCreateButton("CANCEL", 164, 504, 91, 41, 0) GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif") $Button30 = GUICtrlCreateButton("CREDIT CARD", 252, 504, 163, 41, 0) GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif") $Button31 = GUICtrlCreateButton("TENDER CASH", 412, 504, 223, 41, 0) GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif") $Button32 = GUICtrlCreateButton("VOID", 36, 504, 131, 41, 0) GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif") $Button33 = GUICtrlCreateButton("SUBTOTAL", 36, 456, 291, 49, 0) GUICtrlSetFont(-1, 18, 800, 0, "MS Sans Serif") $Button34 = GUICtrlCreateButton("TOTAL", 324, 456, 311, 49, 0) GUICtrlSetFont(-1, 18, 800, 0, "MS Sans Serif") $Button35 = GUICtrlCreateButton("X", 328, 264, 83, 193, 0) GUICtrlSetFont(-1, 36, 400, 0, "Lucida Console") GUICtrlCreateGroup("", -99, -99, 1, 1) $TabSheet2 = GUICtrlCreateTabItem("TRANSACTIONS") $Group2 = GUICtrlCreateGroup("", 20, 40, 633, 521) $Date1 = GUICtrlCreateDate("2007/06/06 17:04:58", 228, 64, 186, 21) $ListView1 = GUICtrlCreateListView("", 36, 104, 602, 438) GUICtrlCreateGroup("", -99, -99, 1, 1) $TabSheet3 = GUICtrlCreateTabItem("BATCH") $Group3 = GUICtrlCreateGroup("", 20, 40, 633, 521) $Date2 = GUICtrlCreateDate("2007/06/06 17:15:22", 228, 64, 186, 21) GUICtrlCreateGroup("", -99, -99, 1, 1) GUICtrlCreateTabItem("") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### GuiCtrlSetData($Label1, "0.00") While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 GuiCtrlSetData($List1, "1|") Case $Button2 GuiCtrlSetData($List1, "2|") Case $Button3 GuiCtrlSetData($List1, "3|") Case $Button4 GuiCtrlSetData($List1, "4|") Case $Button5 GuiCtrlSetData($List1, "5|") Case $Button6 GuiCtrlSetData($List1, "6|") Case $Button7 GuiCtrlSetData($List1, "7|") Case $Button8 GuiCtrlSetData($List1, "8|") Case $Button9 GuiCtrlSetData($List1, "9|") Case $Button10 GuiCtrlSetData($List1, "0|") Case $Button11 GuiCtrlSetData($List1, "+|") Case $Button12 GuiCtrlSetData($List1, "-|") Case $Button13 GuiCtrlSetData($List1, "LARGE SODA|") GuiCtrlSetData($Label1, "3.00") Case $Button14 GuiCtrlSetData($List1, "HAMBURGER|") GuiCtrlSetData($Label1, "3.00") Case $Button15 GuiCtrlSetData($List1, "HOT COCOA|") GuiCtrlSetData($Label1, "3.00") Case $Button16 GuiCtrlSetData($List1, "LARGE CANDY|") GuiCtrlSetData($Label1, "3.00") Case $Button17 GuiCtrlSetData($List1, "REGULAR SODA|") GuiCtrlSetData($Label1, "2.00") Case $Button18 GuiCtrlSetData($List1, "HOTDOG|") GuiCtrlSetData($Label1, "3.00") Case $Button19 GuiCtrlSetData($List1, "CAPPICINO|") GuiCtrlSetData($Label1, "3.00") Case $Button20 GuiCtrlSetData($List1, "SMALL CANDY|") GuiCtrlSetData($Label1, "2.00") Case $Button21 GuiCtrlSetData($List1, "WATER|") GuiCtrlSetData($Label1, "2.00") Case $Button22 GuiCtrlSetData($List1, "POPCORN|") GuiCtrlSetData($Label1, "3.00") Case $Button23 GuiCtrlSetData($List1, "CUP OF ICE|") GuiCtrlSetData($Label1, "1.00") Case $Button24 GuiCtrlSetData($List1, "CHIPS|") GuiCtrlSetData($Label1, "1.00") Case $Button25 GuiCtrlSetData($List1, "CHILL|") GuiCtrlSetData($Label1, "3.00") Case $Button26 GuiCtrlSetData($List1, "NACHOS|") GuiCtrlSetData($Label1, "3.00") Case $Button27 GuiCtrlSetData($List1, "CHIPS|") GuiCtrlSetData($Label1, "1.00") Case $Button28 GuiCtrlSetData($List1, "MUFFINS|") GuiCtrlSetData($Label1, "3.00") Case $Button29 GuiCtrlSetData($List1, "|") Case $Button30 GuiCtrlSetData($List1, "|") Case $Button31 GuiCtrlSetData($List1, "|") Case $Button32 GuiCtrlSetData($List1, "|") Case $Button33 GuiCtrlSetData($List1, "|") Case $Button34 GuiCtrlSetData($List1, "|") Case $Button35 GuiCtrlSetData($List1, "|") EndSwitch WEnd
LongStream Posted June 7, 2007 Posted June 7, 2007 @tAKTelapis, I like the idea and have updated the code accordingly and did a slight change to it - see below - but I am realizing there does not seem to be a way to update specific line items. using this method. I think that would make [POPCORN] [X] [3] not able to update only a single item to make it say in the display ($list1) that POPCORN x 3 or the order has 3 popcorns, rather than POPCORN POPCORN POPCORN. I am therefore looking into the listview gui function as perhaps a better alternative. (used these "[" and "]" to indicate a button press in this forum) for now here is what I have.... Note I added a label below the list to indicat the subtotal .... I am working on the list view and the math as a single issue. Any help or suggestions are still immensely appreciated... Shane Hale ... Perhaps instead of looking at the process like "Popcorn X 3" you should look at it with "3 x Popcorn" Most POS systems I've worked with have you do QTY x ITEM. If no QTY is entered, they default to 1, so you could just enter "Popcorn" and it would add 1 popcorn to the sale. *shrug* Just a thought.
ResNullius Posted June 7, 2007 Posted June 7, 2007 Perhaps instead of looking at the process like "Popcorn X 3" you should look at it with "3 x Popcorn"Most POS systems I've worked with have you do QTY x ITEM. If no QTY is entered, they default to 1, so you could just enter "Popcorn" and it would add 1 popcorn to the sale.*shrug* Just a thought.I second that motion; it will also make it easier to deal with the logic of processing your GetMsg results. If I have some time I'll take a look at the code thus far and see what I can offer.
ShaneHale Posted June 11, 2007 Author Posted June 11, 2007 Ok Changed the order of input as suggested and the lay out is now different than befor. Now I am stuck on how to show the data in a listview list as list view items so I can add and remove them. I am not sure if this is the best way to do this but I feel like I have to be able to manipulat the data after I show it. For example if someone orders 2 popcorns but then decided the only whanted 1 than how would I remove that from plain old list? So list view seemed like a better choice but it seems to be outside the scope of my ability to 1) submit the next item as the next item to put in the list because each seems to need to be prenamed, and 2) manipulate those items after they are submited to change the quanity - since I dont know where that item was submitted or what it was submited as. this is getting confusing. Man need to remae it to complex POS instead of simple POS Here is the changes I have made to the layout and what I have attemped to do with the listview so far. Some one please help me with something encouraging, I feel like this can be done still. Regards, Shane Hale expandcollapse popup#include <GUIConstants.au3> #Region ### START Koda GUI section ### Form=c:\security\koda_1.6.0.2\forms\aform2.kxf $Form1_1 = GUICreate("Simple POS", 618, 586, 209, 116) $Tab1 = GUICtrlCreateTab(8, 8, 601, 569) $TabSheet1 = GUICtrlCreateTabItem("REGISTER") $Group1 = GUICtrlCreateGroup("", 20, 32, 577, 529) GUICtrlSetColor(-1, 0xFFFF00) $ListView = GUICtrlCreateListView("Item|Quanity", 36, 112, 249, 374) GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x00FFFF) GUICtrlSetBkColor(-1, 0x000000) GUICtrlCreateGroup("", -99, -99, 1, 1) $Label1 = GUICtrlCreateLabel("", 36, 48, 249, 60, BitOR($SS_CENTER,$SS_CENTERIMAGE,$SS_SUNKEN,$WS_BORDER)) GUICtrlSetFont(-1, 22, 800, 0, "Lucida Console") GUICtrlSetColor(-1, 0xFFFF00) GUICtrlSetBkColor(-1, 0x008000) $Button1 = GUICtrlCreateButton("1", 292, 384, 75, 49, 0) GUICtrlSetFont(-1, 18, 400, 0, "Lucida Console") $Button2 = GUICtrlCreateButton("2", 364, 384, 75, 49, 0) GUICtrlSetFont(-1, 18, 400, 0, "Lucida Console") $Button3 = GUICtrlCreateButton("3", 436, 384, 75, 49, 0) GUICtrlSetFont(-1, 18, 400, 0, "Lucida Console") $Button4 = GUICtrlCreateButton("4", 292, 336, 75, 49, 0) GUICtrlSetFont(-1, 18, 400, 0, "Lucida Console") $Button5 = GUICtrlCreateButton("5", 364, 336, 75, 49, 0) GUICtrlSetFont(-1, 18, 400, 0, "Lucida Console") $Button6 = GUICtrlCreateButton("6", 436, 336, 75, 49, 0) GUICtrlSetFont(-1, 18, 400, 0, "Lucida Console") $Button7 = GUICtrlCreateButton("7", 292, 288, 75, 49, 0) GUICtrlSetFont(-1, 18, 400, 0, "Lucida Console") $Button8 = GUICtrlCreateButton("8", 364, 288, 75, 49, 0) GUICtrlSetFont(-1, 18, 400, 0, "Lucida Console") $Button9 = GUICtrlCreateButton("9", 436, 288, 75, 49, 0) GUICtrlSetFont(-1, 18, 400, 0, "Lucida Console") $Button10 = GUICtrlCreateButton("0", 292, 432, 147, 49, 0) GUICtrlSetFont(-1, 18, 400, 0, "Lucida Console") $Button11 = GUICtrlCreateButton("+", 508, 288, 75, 97, 0) GUICtrlSetFont(-1, 28, 400, 0, "Lucida Console") $Button12 = GUICtrlCreateButton("-", 508, 384, 75, 49, 0) GUICtrlSetFont(-1, 28, 400, 0, "Lucida Console") $Button13 = GUICtrlCreateButton("LG SODA", 292, 48, 75, 49, 0) $Button14 = GUICtrlCreateButton("BURGER", 292, 96, 75, 49, 0) $Button15 = GUICtrlCreateButton("COCOA", 292, 144, 75, 49, 0) $Button16 = GUICtrlCreateButton("LG CANDY", 292, 192, 75, 49, 0) $Button17 = GUICtrlCreateButton("RG SODA", 364, 48, 75, 49, 0) $Button18 = GUICtrlCreateButton("HOTDOG", 364, 96, 75, 49, 0) $Button19 = GUICtrlCreateButton("CAPPICINO", 364, 144, 75, 49, 0) $Button20 = GUICtrlCreateButton("SM CANDY", 364, 192, 75, 49, 0) $Button21 = GUICtrlCreateButton("WATER", 436, 48, 75, 49, 0) $Button22 = GUICtrlCreateButton("POPCORN", 436, 96, 75, 49, 0) $Button23 = GUICtrlCreateButton("ICE", 436, 144, 75, 49, 0) $Button24 = GUICtrlCreateButton("CHIPS", 508, 144, 75, 49, 0) $Button25 = GUICtrlCreateButton("CHILL", 508, 48, 75, 49, 0) $Button26 = GUICtrlCreateButton("NACHOS", 508, 96, 75, 49, 0) $Button27 = GUICtrlCreateButton("CHIPS", 508, 192, 75, 49, 0) $Button28 = GUICtrlCreateButton("MUFFINS", 436, 192, 75, 49, 0) $Button29 = GUICtrlCreateButton("CANCEL", 36, 496, 99, 41, 0) GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif") $Button30 = GUICtrlCreateButton("CREDIT CARD", 292, 496, 145, 41, 0) GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif") $Button31 = GUICtrlCreateButton("TENDER CASH", 436, 496, 147, 41, 0) GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif") $Button32 = GUICtrlCreateButton("TOTAL", 436, 432, 147, 49, 0) GUICtrlSetFont(-1, 18, 800, 0, "MS Sans Serif") $Button33 = GUICtrlCreateButton("X", 292, 240, 291, 49, 0) GUICtrlSetFont(-1, 36, 400, 0, "Lucida Console") $TabSheet2 = GUICtrlCreateTabItem("TRANSACTIONS") GUICtrlSetState(-1,$GUI_SHOW) $Group2 = GUICtrlCreateGroup("", 20, 32, 577, 529) $Date1 = GUICtrlCreateDate("2007/06/06 17:04:58", 212, 56, 186, 21) $ListView1 = GUICtrlCreateListView("", 166, 95, 285, 432) GUICtrlCreateGroup("", -99, -99, 1, 1) $TabSheet3 = GUICtrlCreateTabItem("BATCH") $Group3 = GUICtrlCreateGroup("", 20, 32, 577, 529) $Date2 = GUICtrlCreateDate("2007/06/06 17:15:22", 212, 56, 186, 21) GUICtrlCreateGroup("", -99, -99, 1, 1) GUICtrlCreateTabItem("") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 GuiCtrlSetData($Label1, "1") Case $Button2 GuiCtrlSetData($Label1, "2") Case $Button3 GuiCtrlSetData($Label1, "3") Case $Button4 GuiCtrlSetData($Label1, "4") Case $Button5 GuiCtrlSetData($Label1, "5") Case $Button6 GuiCtrlSetData($Label1, "6") Case $Button7 GuiCtrlSetData($Label1, "7") Case $Button8 GuiCtrlSetData($Label1, "8") Case $Button9 GuiCtrlSetData($Label1, "9") Case $Button10 GuiCtrlSetData($Label1, "0") Case $Button11 GuiCtrlSetData($Label1, "+") Case $Button12 GuiCtrlSetData($Label1, "-") Case $Button13 GuiCtrlSetData($ListView, "LARGE SODA|") GuiCtrlSetData($Label1, "3.00") Case $Button14 GuiCtrlSetData($ListView, "HAMBURGER|") GuiCtrlSetData($Label1, "3.00") Case $Button15 GuiCtrlSetData($ListView, "HOT COCOA|") GuiCtrlSetData($Label1, "3.00") Case $Button16 GuiCtrlSetData($ListView, "LARGE CANDY|") GuiCtrlSetData($Label1, "3.00") Case $Button17 GuiCtrlSetData($ListView, "REGULAR SODA|") GuiCtrlSetData($Label1, "2.00") Case $Button18 GuiCtrlSetData($ListView, "HOTDOG|") GuiCtrlSetData($Label1, "3.00") Case $Button19 GuiCtrlSetData($ListView, "CAPPICINO|") GuiCtrlSetData($Label1, "3.00") Case $Button20 GuiCtrlSetData($ListView, "SMALL CANDY|") GuiCtrlSetData($Label1, "2.00") Case $Button21 GuiCtrlSetData($ListView, "WATER|") GuiCtrlSetData($Label1, "2.00") Case $Button22 GuiCtrlSetData($ListView, "POPCORN|") GuiCtrlSetData($Label1, "3.00") Case $Button23 GuiCtrlSetData($ListView, "CUP OF ICE|") GuiCtrlSetData($Label1, "1.00") Case $Button24 GuiCtrlSetData($ListView, "CHIPS|") GuiCtrlSetData($Label1, "1.00") Case $Button25 GuiCtrlSetData($ListView, "CHILL|") GuiCtrlSetData($Label1, "3.00") Case $Button26 GuiCtrlSetData($ListView, "NACHOS|") GuiCtrlSetData($Label1, "3.00") Case $Button27 GuiCtrlSetData($ListView, "CHIPS|") GuiCtrlSetData($Label1, "1.00") Case $Button28 GuiCtrlSetData($ListView, "MUFFINS|") GuiCtrlSetData($Label1, "3.00") Case $Button29 GuiCtrlSetData($ListView, "|") Case $Button30 GuiCtrlSetData($ListView, "|") Case $Button31 GuiCtrlSetData($ListView, "|") Case $Button32 GuiCtrlSetData($ListView, "|") Case $Button33 GuiCtrlSetData($ListView, "|") EndSwitch WEnd
DjDeep00 Posted March 24, 2008 Posted March 24, 2008 @ShaneHale...Did you ever get to finish this POS software?
DjDeep00 Posted March 25, 2008 Posted March 25, 2008 Has anyone else tried creating a POS via Autoit?
herewasplato Posted March 25, 2008 Posted March 25, 2008 @ShaneHale...Did you ever get to finish this POS software?Profile says "Last Seen: 14th November 2007"Don't hold your breath for a reply. :-) [size="1"][font="Arial"].[u].[/u][/font][/size]
Swift Posted March 25, 2008 Posted March 25, 2008 Since it appears that this user is not coming back, or is long gone, I have decided to take over with the help of DBaK.As of right now, this program we add every item/price to the listview as you click them, and will eventually add it up, display the total, and then display the change needed given.If you are interested with this program, it will probably be created in AutoIt 3.2.8.3 because of some of new versions where there is listview issues.If you are interested in watching this program developer from where he left off, you can read dbak's forum in which there is a topic on this. Http://dbak.mine.nu .
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