Code: Select all
#NoEnv
; ------------------------------------------------------------------------------
; Settings
IniFile := "Menu.ini"
BtnCount := 71 ; total number of buttons
BtnsPerColumn := 10 ; buttons per column
BtnW := 100 ; button width
BtnH := 70 ; button height
; ------------------------------------------------------------------------------
; Read the INI file into an array
Menus := []
Loop, %BtnCount%
{
IniRead, Menu, %IniFile%, %A_Index%, Menu, %A_Index%
IniRead, Price, %IniFile%, %A_Index%, Price, %A_Space%
IniRead, Options, %IniFile%, %A_Index%, Options, %A_Space%
Menus[A_Index] := {Name: Menu, Price: Price, Options: Options}
}
; ##############################################################################
Gui, 1:Add, Button, x50 y50 w300 h300 gSales ,Sales Mode
Gui, 1:Add, Button, x350 y50 w300 h300 gManager ,Manager Functions
; ##############################################################################
Gui, 2:Font, s16
Gui, 2:Add, Edit, x1100 y10 w400 h100 vClerkNumIn Password* ;or Password#
;~ Gui, 2:Add, Picture, gHome x10 y10 w100 h-1, Home.BMP
Gui, 2:Add, Button, gHome x10 y10 w100 h100, Home
Gui, 2:Add, button, gClear x10 y113 w85 h85, C
Gui, 2:Add, Button, gSignOn x95 y113 w170 h85, Sign on
Gui, 2:Add, Button, gAddText x10 y197 w85 h85, 1
Gui, 2:Add, Button, gAddText x95 y197 w85 h85, 2
Gui, 2:Add, Button, gAddText x180 y197 w85 h85, 3
Gui, 2:Add, button, gAddText x10 y281 w85 h85, 4
Gui, 2:Add, Button, gAddText x95 y281 w85 h85, 5
Gui, 2:Add, Button, gAddText x180 y281 w85 h85, 6
Gui, 2:Add, button, gAddText x10 y365 w85 h85, 7
Gui, 2:Add, Button, gAddText x95 y365 w85 h85, 8
Gui, 2:Add, Button, gAddText x180 y365 w85 h85, 9
Gui, 2:Add, button, gAddText x10 y449 w85 h85, 0
Gui, 2:Add, Button, gAddText x95 y449 w85 h85, 00
Gui, 2:Add, Button, gAddText x180 y449 w85 h85, .
Gui, 2:Add, Button, gClockIn x280 y381 w200 h150 ,Clock in
Gui, 2:Add, Button, gClockOut x480 y381 w200 h150 ,Clock out
Gui, 2:Font, s28
Gui, 2:Add, text, x660 y10, Please sign on
Gui, 2:Font, s16
; ##############################################################################
Gui, 3:Add, Button, gHome x10 y10 w100 h100, Home
Gui, 3:Add, Button, x150 y50 w250 h250 gSales ,Sales Mode
Gui, 3:Add, Button, gProgramming x400 y50 w250 h250 ,Programming
Gui, 3:Add, Button, x650 y50 w250 h250 gAddClerk ,Add Clerk
Gui, 3:Add, Button, x900 y50 w250 h250 gStaff ,Staff Attend
Gui, 3:Add, Button, x1150 y50 w250 h250 ,Weekly Stock Report
; ############################################################
Gui, 4:Add, Button, gHome x10 y10 w100 h100, Home
Gui, 4:Add, edit, x150 y10 w400 h50 vClerkName
Gui, 4:Add, edit, x650 y10 w400 h50 vClerkNum
Gui, 4:Add, Button, gAddTextName x160 y175 w25 h25, A
Gui, 4:Add, Button, gAddTextName x240 y200 w25 h25, B
Gui, 4:Add, Button, gAddTextName x195 y200 w25 h25, C
Gui, 4:Add, Button, gAddTextName x210 y175 w25 h25, D
Gui, 4:Add, Button, gAddTextName x200 y150 w25 h25, E
Gui, 4:Add, Button, gAddTextName x235 y175 w25 h25, F
Gui, 4:Add, Button, gAddTextName x260 y175 w25 h25, G
Gui, 4:Add, Button, gAddTextName x285 y175 w25 h25, H
Gui, 4:Add, Button, gAddTextName x325 y150 w25 h25, I
Gui, 4:Add, Button, gAddTextName x310 y175 w25 h25, J
Gui, 4:Add, Button, gAddTextName x335 y175 w25 h25, K
Gui, 4:Add, Button, gAddTextName x360 y175 w25 h25, L
Gui, 4:Add, Button, gAddTextName x290 y200 w25 h25, M
Gui, 4:Add, Button, gAddTextName x265 y200 w25 h25, N
Gui, 4:Add, Button, gAddTextName x350 y150 w25 h25, O
Gui, 4:Add, Button, gAddTextName x375 y150 w25 h25, P
Gui, 4:Add, Button, gAddTextName x150 y150 w25 h25, Q
Gui, 4:Add, Button, gAddTextName x225 y150 w25 h25, R
Gui, 4:Add, Button, gAddTextName x185 y175 w25 h25, S
Gui, 4:Add, Button, gAddTextName x250 y150 w25 h25, T
Gui, 4:Add, Button, gAddTextName x300 y150 w25 h25, U
Gui, 4:Add, Button, gAddTextName x220 y200 w25 h25, V
Gui, 4:Add, Button, gAddTextName x175 y150 w25 h25, W
Gui, 4:Add, Button, gAddTextName x195 y200 w25 h25, X
Gui, 4:Add, Button, gAddTextName x275 y150 w25 h25, Y
Gui, 4:Add, Button, gAddTextName x170 y200 w25 h25, Z
Gui, 4:Add, Button, gAddTextspace x315 y200 w75 h25, Space
Gui, 4:Add, button, gClear x10 y113 w85 h85, C
Gui, 4:Add, Button, gAddTextNum x650 y197 w85 h85, 1
Gui, 4:Add, Button, gAddTextNum x734 y197 w85 h85, 2
Gui, 4:Add, Button, gAddTextNum x818 y197 w85 h85, 3
Gui, 4:Add, button, gAddTextNum x650 y281 w85 h85, 4
Gui, 4:Add, Button, gAddTextNum x734 y281 w85 h85, 5
Gui, 4:Add, Button, gAddTextNum x818 y281 w85 h85, 6
Gui, 4:Add, button, gAddTextNum x650 y365 w85 h85, 7
Gui, 4:Add, Button, gAddTextNum x734 y365 w85 h85, 8
Gui, 4:Add, Button, gAddTextNum x818 y365 w85 h85, 9
Gui, 4:Add, button, gAddTextNum x734 y449 w85 h85, 0
Gui, 4:Add, Button, gAddclerk2 x150 y300 w150 h85, Add Clerk
; ##############################################################################
Gui,5:Font, s12
Gui, 5:Add, Edit, x1200 y10 w300 h370 vMenu hwndHMENU
Gui, 5:Add, Edit, x1400 y380 w100 h30 vTotal Right, 0.00
Gui, 5:Add, text, x1350 y385, Total:
Gui, 5:Font, s26
Gui, 5:Add, text, x750 y10, %ClerkName%
Gui, 5:Font, s12
Gui, 5:Add, button, gClear x1100 y410 w70 h70, C
Gui, 5:Add, button, gAddTextMenu x1100 y480 w70 h70, 7
Gui, 5:Add, button, gAddTextMenu x1100 y550 w70 h70, 4
Gui, 5:Add, button, gAddTextMenu x1100 y620 w70 h70, 1
Gui, 5:Add, button, gAddTextMenu x1100 y690 w70 h70, 0
Gui, 5:Add, button, x1170 y410 w70 h70, X
Gui, 5:Add, button, gAddTextMenu x1170 y480 w70 h70, 8
Gui, 5:Add, button, gAddTextMenu x1170 y550 w70 h70, 5
Gui, 5:Add, button, gAddTextMenu x1170 y620 w70 h70, 2
Gui, 5:Add, button, gAddTextMenu x1170 y690 w70 h70, 00
Gui, 5:Add, button, gSignOff x1240 y410 w70 h70, Sign Off
Gui, 5:Add, button, gAddTextMenu x1240 y480 w70 h70, 9
Gui, 5:Add, button, gAddTextMenu x1240 y550 w70 h70, 6
Gui, 5:Add, button, gAddTextMenu x1240 y620 w70 h70, 3
Gui, 5:Add, button, gAddTextMenu x1240 y690 w70 h70, .
Gui, 5:Add, button, x1310 y410 w140 h70, Void
Gui, 5:Add, button, x1310 y480 w140 h70, Refund
Gui, 5:Add, button, gPayment x1310 y620 w140 h140, Payment
Y := "ym"
X := "xm"
Loop, %BtnCount% {
Gui, 5:Add, Button, %X% %Y% w%BtnW% h%BtnH% vBtn%A_Index% gAddToOrder, % Menus[A_Index, "Name"]
If (Mod(A_Index, BtnsPerColumn) = 0) {
Y := "ym"
X := "x+0"
}
Else {
Y := "y+0"
X := "xp"
}
}
; ##############################################################################
Gui, 6:Add, Button, gHome x1460 y10 w70 h70, Home
Y := "ym"
X := "xm"
Loop, %BtnCount% {
Gui, 6:Add, Button, %X% %Y% w%BtnW% h%BtnH% vBtn%A_Index% gSet, % Menus[A_Index, "Name"]
If (Mod(A_Index, BtnsPerColumn) = 0) {
Y := "ym"
X := "x+0"
}
Else {
Y := "y+0"
X := "xp"
}
}
; ##############################################################################
Gui, 7:Margin, 10, 10
Gui, 7:Add, Text, h20 0x0200 Section, Enter new name:
Gui, 7:Add, Text, xs hp 0x0200, Enter new price:
W := BtnW - 10
Gui, 7:Add, Edit, ys w%W% h20 Limit vNewName
Gui, 7:Add, Edit, xp y+m wp h20 Limit vNewPrice
GuiControlGet, P, 7:Pos, NewPrice
Gui, 7:Add, Text, xm, Options:
W := PW + PX - 10
Gui, 7:Add, Edit, xm y+2 w%W% r5 vNewOptions
Gui, 7:Add, Button, xm w80 gWriteIni, Apply
X := PX + PW - 80
Gui, 7:Add, Button, x%X% yp wp g7GuiClose, Cancel
; ##############################################################################
Gui, 2:Show, w1540 h805, Home
; ##############################################################################
Gui, 8:Font, s12
Gui, 8:Add, Text, x1000 y10 w95 h30 +0x200 Right, Paid:
Gui, 8:Add, Edit, x1100 y10 w100 h30 vPaid,
Gui, 8:Add, Text, x1000 y50 w95 h30 +0x200 Right, Change:
Gui, 8:Add, Edit, x1100 y50 w100 h30 vChange, 0.00
Gui, 8:Add, Edit, x1200 y10 w300 h370 vMenu2 hwndHMENU2, %Menu%
Gui, 8:Add, Edit, x1400 y380 w100 h30 vTotal2 Right2, %Total%
Gui, 8:Add, text, x1350 y385, Total:
Gui, 8:Font, s26
Gui, 8:Add, text, x750 y10, %ClerkName%
Gui, 8:Font, s12
gui, 8:Add, button, gTakeAway w100 h100, Take Away
Gui, 8:Add, button, gClear2 x1100 y410 w70 h70, C
Gui, 8:Add, button, gAddTextInput1 x1100 y480 w70 h70, 7
Gui, 8:Add, button, gAddTextInput1 x1100 y550 w70 h70, 4
Gui, 8:Add, button, gAddTextInput1 x1100 y620 w70 h70, 1
Gui, 8:Add, button, gAddTextInput1 x1100 y690 w70 h70, 0
Gui, 8:Add, button, x1170 y410 w70 h70, No Sale
Gui, 8:Add, button, gAddTextInput1 x1170 y480 w70 h70, 8
Gui, 8:Add, button, gAddTextInput1 x1170 y550 w70 h70, 5
Gui, 8:Add, button, gAddTextInput1 x1170 y620 w70 h70, 2
Gui, 8:Add, button, gAddTextInput1 x1170 y690 w70 h70, 00
Gui, 8:Add, button, gSignOff x1240 y410 w70 h70, Sign Off
Gui, 8:Add, button, gAddTextInput1 x1240 y480 w70 h70, 9
Gui, 8:Add, button, gAddTextInput1 x1240 y550 w70 h70, 6
Gui, 8:Add, button, gAddTextInput1 x1240 y620 w70 h70, 3
Gui, 8:Add, button, gAddTextInput1 x1240 y690 w70 h70, .
Gui, 8:Add, button, x1310 y410 w140 h70, Cheque
Gui, 8:Add, button, x1310 y480 w140 h140, Card
Gui, 8:Add, button, gCash x1310 y620 w140 h140, Cash
Gui, 8:Add, Button, gPound vPound20 x960 y480 w140 h70, £20
Gui, 8:Add, Button, gPound vPound10 x960 y550 w140 h70, £10
Gui, 8:Add, Button, gPound vPound5 x960 y620 w140 h70, £5
Return
; ##############################################################################
AddTextInput1:
Gui, Submit, NoHide
GuiControl, , Paid, % Paid A_GuiControl
Return
; ##############################################################################
Pound:
Gui, +OwnDialogs
Given := SubStr(A_GuiControl, 6)
If (Total > Given) {
Remainder := Format("{:0.2f}", Total - Given)
GuiControl, , Total2, %Remainder%
Total := Remainder
Return
}
Remainder := Format("{:0.2f}", Total - Given)
GuiControl, , Total2, %Remainder%
Change := Format("{:0.2f}", Given - Total)
GuiControl, , Paid, % Format("{:0.2f}", Given)
GuiControl, , Change, %Change%
MsgBox, 0, Payment, Change: £%Change%, 5
return
; ###############################################################################
Cash:
Given := SubStr(A_GuiControl, 6)
If (Total > Given) {
Remainder := Format("{:0.2f}", Total - Given)
GuiControl, , Total2, %Remainder%
Total := Remainder
Return
}
Change := Format("{:0.2f}", Given - Total)
GuiControl, , Paid, % Format("{:0.2f}", Given)
GuiControl, , Change, %Change%
MsgBox, 0, Payment, Change: £%Change%, 5
Return
; ##############################################################################
TakeAway:
gui, 8:Hide
Gui, 5:Show, w1540 h805, Order
return
; ##############################################################################
AddToOrder:
BtnNumber := SubStr(A_GuiControl, 4)
Menu := Menus[BtnNumber, "Name"]
If (Menu = BtnNumber) {
MsgBox, 16, Error!, No menu stored for button %BtnNumber%!
Return
}
Price := Menus[BtnNumber, "Price"]
Options := Menus[BtnNumber, "Options"]
OptNumber := 0
If (Options <> "") {
Gui, Opts:New, +hwndHOPTS
Options := StrSplit(Options, "|")
For Index, Option in Options
Gui, Add, Radio, % (Index = 1 ? "vOptNumber" : ""), %Option%
Gui, 5:+Disabled
Gui, Show, , Options
While WinExist("ahk_id " . HOPTS)
Sleep 100
}
Gui, 5:Default
GuiControlGet, Total
Total += Price
GuiControl, , Total, % Format("{:0.2f}", Total)
DllCall("SendMessage", "Ptr", HMENU, "UInt", 0x00B1, "Ptr", -1, "Ptr", -2) ; EM_SETSEL
Order := Menu . " " . Price . "`r`n" . (OptNumber ? "(" . Options[OptNumber] . ")`r`n" : "")
DllCall("SendMessage", "Ptr", HMENU, "UInt", 0x00C2, "Ptr", True, "Str", Order) ; EM_REPLACESEL
Gui, 8:Default
GuiControl, , Total2, % Format("{:0.2f}", Total)
DllCall("SendMessage", "Ptr", HMENU2, "UInt", 0x00B1, "Ptr", -1, "Ptr", -2) ; EM_SETSEL
Order := Menu . " " . Price . "`r`n" . (OptNumber ? "(" . Options[OptNumber] . ")`r`n" : "")
DllCall("SendMessage", "Ptr", HMENU2, "UInt", 0x00C2, "Ptr", True, "Str", Order) ; EM_REPLACESEL
Return
OptsGuiClose:
Gui, 5:-Disabled
Gui, Submit
Gui, Destroy
Return
; ##############################################################################
WriteIni:
Gui, Submit, NoHide
; MsgBox, 0, New Values, Name:`t%NewName%`n`nPrice:`t%NewPrice
GuiControl, 6:, Btn%BtnNumber%, %NewName%
Iniwrite, %NewName%, %IniFile%, %BtnNumber%, Menu
Iniwrite, %NewPrice%, %IniFile%, %BtnNumber%, Price
Options := StrReplace(Trim(RTrim(NewOptions, "`n")), "`n", "|")
Iniwrite, %Options%, %IniFile%, %BtnNumber%, Options
Menus[BtnNumber, "Name"] := NewName
Menus[BtnNumber, "Price"] := NewPrice
Menus[BtnNumber, "Options"] := Options
Gosub, 7GuiClose
Return
; ##############################################################################
Set:
BtnNumber := SubStr(A_GuiControl, 4)
GuiControl, 7:, NewName, % Menus[BtnNumber, "Name"]
GuiControl, 7:, NewPrice, % Menus[BtnNumber, "Price"]
GuiControl, 7:, NewOptions, % StrReplace(Menus[BtnNumber, "Options"], "|", "`n")
Gui, +Disabled
Gui, 7:Show, , Button %BtnNumber%
Return
; ##############################################################################
Gui, 7:Margin, 10, 10
Gui, 7:Add, Text, h20 0x0200 Section, Enter new name:
Gui, 7:Add, Text, xs hp 0x0200, Enter new price:
W := BtnW - 10
Gui, 7:Add, Edit, ys w%W% h20 Limit vNewName
Gui, 7:Add, Edit, xp y+m wp h20 Limit vNewPrice
GuiControlGet, P, 7:Pos, NewPrice
Gui, 7:Add, Text, xm, Options:
W := PW + PX - 10
Gui, 7:Add, Edit, xm y+2 w%W% r5 vNewOptions
Gui, 7:Add, Button, xm w80 gWriteIni, Apply
X := PX + PW - 80
Gui, 7:Add, Button, x%X% yp wp g7GuiClose, Cancel
; ##############################################################################
Home:
Gui, 2:Hide
Gui, 3:Hide
Gui, 4:Hide
Gui, 6:Hide
Gui, 1:Show, w1540 h805, Home
return
; ##############################################################################
Sales:
Gui, 1:Hide
Gui, 2:Show, w1540 h805, Home
return
; ##############################################################################
Manager:
Gui, 1:Hide
Gui, 3:Show, w1540 h805, Manager Functions
return
; ##############################################################################
Payment:
Gui, 5:Hide
Gui, 8:Show, w1540 h805, Payment
return
; ##############################################################################
SignOn:
Gui, Submit, NoHide
IniRead, IsClerkNumExist, Clerk.ini, Clerk, %ClerkNumIn%
if (IsClerkNumExist == "ERROR")
{
GuiControl,, ClerkNumIn
MsgBox, 262192,Attention ,No Such Clerk.,2
return
}
if (ClerkNumIn == "")
{
GuiControl,, ClerkNumIn
MsgBox, 262192,Attention ,No Such Clerk.,2
return
}
else
GuiControl,, ClerkNumIn
Gui, 2:Hide
Gui, 5:Show, w1540 h805, Order
return
; ##############################################################################
Addclerk:
Gui, 3:Hide
Gui, 4:Show, w1540 h805, Add Clerk
return
; ##############################################################################
SignOff:
Gui, 5:Hide
Gui, 2:Show, w1540 h805, Home
return
; ##############################################################################
Programming:
Gui, 3:Hide
Gui, 6:Show, w1540 h805, Programming
Return
; ##############################################################################
1GuiClose:
Gui, 1:Hide
Gui, 2:Show, w1540 h805, Home
Return
; ##############################################################################
2GuiClose:
ExitApp
; ##############################################################################
3GuiClose:
Gui, 3:Hide
Gui, 2:Show, w1540 h805, Home
return
; ##############################################################################
4GuiClose:
Gui, 4:Hide
Gui, 3:Show, w1540 h805, Manager Functions
return
; ##############################################################################
6GuiClose:
Gui, 6:Hide
Gui, 3:Show, w1540 h805, Manager Functions
return
; ##############################################################################
7GuiClose:
Gui, 6:-Disabled
Gui, Hide
Return
; ##############################################################################
Addclerk2:
Gui, Submit, NoHide
IniRead, IsClerkNumExist, Clerk.ini, Clerk, %ClerkNum%
if (IsClerkNumExist == "ERROR")
{
IniRead, ClerkList, Clerk.ini, ClerkList, ClerkList
if (ClerkList == "ERROR")
{
IniWrite, |, Clerk.ini, ClerkList, ClerkList
IniRead, ClerkList, Clerk.ini, ClerkList, ClerkList
}
IfNotInString, ClerkList, %ClerkName%
{
IniWrite, %ClerkName%, Clerk.ini, Clerk, %ClerkNum%
IniWrite, %ClerkList%%ClerkName%|, Clerk.ini, ClerkList, ClerkList
IniWrite, No, Online.ini, Clocked In:, %ClerkName%
MsgBox, 262208,Attention ,%ClerkName% Created.,2
return
}
else
{
MsgBox, 16,Attention ,%ClerkName% In Use.,2
}
}
else
MsgBox, 16,Attention ,%ClerkNum% In Use.,2
return
; ##############################################################################
ClockIn:
Gui, Submit, NoHide
IniRead, IsClerkNumExist, Clerk.ini, Clerk, %ClerkNumIn%
if (IsClerkNumExist == "ERROR")
{
GuiControl,, ClerkNumIn
MsgBox, 262192,Attention ,No Such Clerk.,2
return
}
if (ClerkNumIn == "")
{
GuiControl,, ClerkNumIn
MsgBox, 262192,Attention ,No Such Clerk.,2
return
}
IniRead, ClerkInName, Clerk.ini, Clerk, %ClerkNumIn%
IniRead, Value, Online.ini, Clocked In:, %ClerkInName%
if (Value == "No")
{
IniRead, Test, Hours.ini, %ClerkInName%, Total
If (Test = "ERROR")
IniWrite, 00:00:00, Hours.ini, %ClerkInName%, Total
Now := A_Now
FormatTime, TimeIn, %Now%, HH:mm:ss
FormatTime, DateIn, %Now%, ShortDate
IniWrite, %Now%, Online.ini, Clocked In:, %ClerkInName% ; <<<<<
IniWrite, %A_Now%, Online.ini, Clocked In:, %ClerkInName% Last Time Clocked in
IniWrite, In, Hours.ini, %ClerkInName%, %DateIn% - %TimeIn% Clocked
MsgBox, 262208,Attention ,%ClerkInName% Clocked In.,2
GuiControl,, ClerkNumIn
return
}
else
GuiControl,, ClerkNumIn
MsgBox, 262192,Attention , Already Clocked In,2
return
; ##############################################################################
ClockOut:
Gui, Submit, NoHide
IniRead, IsClerkNumExist, Clerk.ini, Clerk, %ClerkNumIn%
if (IsClerkNumExist == "ERROR")
{
GuiControl,, ClerkNumIn
MsgBox, 262192,Attention ,No Such Clerk.,2
return
}
if (ClerkNumIn == "")
{
MsgBox, 262192,Attention ,No such Clerk.,2
return
}
IniRead, ClerkInName, Clerk.ini, Clerk, %ClerkNumIn%
IniRead, Value, Online.ini, Clocked In:, %ClerkInName%
if (Value != "No") {
Now := A_Now
FormatTime, TimeOut, %Now%, HH:mm:ss
FormatTime, DateOut, %Now%, ShortDate
Secs := Now
Secs -= Value, Seconds
IniRead, Total, Hours.Ini, %ClerkInName%, Total
PrevSecs := Time2Seconds(Total)
If (PrevSecs = "")
PrevSecs := 0
Time := Seconds2Time(Secs)
Total := Seconds2Time(PrevSecs + Secs)
IniWrite, %Total%, Hours.ini, %ClerkInName%, Total
IniWrite, Out (%Time%), Hours.ini, %ClerkInName%, %DateOut% - %TimeOut% Clocked
IniWrite, No, Online.ini, Clocked In:, %ClerkInName%
MsgBox, 262208,Attention ,%ClerkInName% Clocked Out.,2
GuiControl,, ClerkNumIn
}
else
MsgBox, 262192,Attention ,Not Clocked In.,2
GuiControl,, ClerkNumIn
return
; ##############################################################################
Seconds2Time(Secs) {
Return Format("{:02}:{:02}:{:02}", Secs // 3600, Mod(Secs, 3600) // 60, Mod(Secs, 60))
}
; ##############################################################################
Time2Seconds(Time) {
Return RegExMatch(Time, "^(\d+):(\d\d):(\d\d)$", M) ? ((M1 * 3600) + (M2 * 60) + M3) : ""
}
; ##############################################################################
AddText:
Gui, Submit, NoHide
GuiControl, , ClerkNumIn, % ClerkNumIn A_GuiControl
Return
; ##############################################################################
AddTextMenu:
Gui, Submit, NoHide
GuiControl, , Menu, % Menu A_GuiControl
Return
; ##############################################################################
Clear:
ClerkNumIn := ClerkNum := ClerkName := Menu := ""
GuiControl,, ClerkNumIn
GuiControl,, ClerkNum
GuiControl,, ClerkName
GuiControl,, Menu
GuiControl,, Total
GuiControl,, Menu2
GuiControl,, Total2
GuiControl,, Input1
return
; ##############################################################################
Clear2:
GuiControl,, Input1
return
; ##############################################################################
AddTextName:
Gui, Submit, NoHide
GuiControl,, ClerkName, % ClerkName A_GuiControl
return
; ##############################################################################
AddTextNum:
Gui, Submit, NoHide
GuiControl,, ClerkNum, % ClerkNum A_GuiControl
return
; ##############################################################################
AddTextspace:
GuiControl,, ClerkName, % ClerkName " "
Return
; ##############################################################################
GetCursorPos(ByRef X, ByRef Y) {
VarSetCapacity(XY, 8, 0)
RetVal := DllCall("GetCursorPos", "Ptr", &XY, "UInt")
X := NumGet(XY, 0, "Int")
Y := NumGet(XY, 4, "Int")
Return RetVal
}
; ##############################################################################
Staff:
run Hours.ini
return
; ##############################################################################
This is the whole script I have so far, The Cash: part doesn't work as it should as of yet, and also in the Pound: section when the total is less than 0 it still triggers, I would like to make it so it cant, and if the Total is less than 0 and you press sign off Or Takeaway Button it resets it all so you can take another order? but if the total is more than 0 and you press takeaway you can add to it, any ideas how I can do this?