Chimaera Posted June 22, 2011 Share Posted June 22, 2011 Hi all little problem Ive run into, im making some input boxes that i want totaled at the bottom as numbers are added, however i seem to have got in a loop and cant figure how to get it to monitor them and update the total without running the loop 24/7 Ive stuck it on a GUI so you can see whats going on #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Global $income_total $GUI_Start = GUICreate("HBC", 500, 500, -1, -1) Global $income_input_types[14][2] = [[13, 2],["", 75],["", 100],["", 125],["", 150],["", 175],["",200],["",225],["",250],["",275],["",300],["",325],["",350],["", 375]] Global $income_input_array[$income_input_types[0][0] + 1] Global $income_input_Totals[$income_input_types[0][0] + 1] For $i = 1 To $income_input_types[0][0] $income_input_array[$i] = GUICtrlCreateInput($income_input_types[$i][0], 190, $income_input_types[$i][1], 80, 20) Next GUICtrlCreatelabel( "Sub Total",190,420,100,30) $income_sub_total = GUICtrlCreateLabel($income_total ,290 ,420) GUISetState() While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $income_total For $i = 1 to $income_input_types[0][0] If GUICtrlRead($income_input_array[$i]) = "" Then $income_total += $income_input_Totals[$i] EndIf Next ConsoleWrite($income_total & @CRLF) EndSwitch WEnd Thanks for any help Chimaera If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() Link to comment Share on other sites More sharing options...
guinness Posted June 22, 2011 Share Posted June 22, 2011 By Melba23 >> expandcollapse popup#include <EditConstants.au3> Global $Global_Input[5], $Global_TEMPInput[5], $Total = 0, $bChanged = 0 _Main() Func _Main() GUICreate("GUI") $Global_Input[0] = GUICtrlCreateInput('', 5, 5, 40) GUICtrlCreateLabel('1:', 75, 5) $Global_Input[1] = GUICtrlCreateInput('', 5, 45, 40) GUICtrlCreateLabel('2:', 75, 45) $Global_Input[2] = GUICtrlCreateInput('', 5, 85, 40) GUICtrlCreateLabel('3:', 75, 85) $Global_Input[3] = GUICtrlCreateInput('', 5, 125, 40) GUICtrlCreateLabel('4:', 75, 125) $Global_Input[4] = GUICtrlCreateInput('', 5, 165, 40) GUICtrlCreateLabel('Total:', 75, 165) GUISetState(@SW_SHOW) GUIRegisterMsg(0x0111, "WM_COMMAND") While 1 If GUIGetMsg() = -3 Then ExitLoop WEnd GUIDelete() Exit EndFunc ;==>_Main Func WM_COMMAND($hWnd, $iMsg, $iwParam, $ilParam) #forceref $hWnd, $iMsg, $ilParam Local $wm_IDFrom = BitAND($iwParam, 0xFFFF); LoWord Local $wm_Code = BitShift($iwParam, 16) ; HiWord If $wm_Code = $EN_CHANGE Then For $A = 0 To UBound($Global_Input) - 2 If $wm_IDFrom = $Global_Input[$A] Then $Total = 0 For $B = 0 To UBound($Global_Input) - 2 $Total += GUICtrlRead($Global_Input[$B]) Next GUICtrlSetData($Global_Input[4], $Total) ExitLoop EndIf Next EndIf EndFunc ;==>WM_COMMAND UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 22, 2011 Moderators Share Posted June 22, 2011 Chimaera,Just look for the EN_CHANGE message when you update an input: expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <EditConstants.au3> Global $income_total $GUI_Start = GUICreate("HBC", 500, 500, -1, -1) Global $income_input_types[14][2] = [[13, 2],["", 75],["", 100],["", 125],["", 150],["", 175],["",200],["",225],["",250],["",275],["",300],["",325],["",350],["", 375]] Global $income_input_array[$income_input_types[0][0] + 1] Global $income_input_Totals[$income_input_types[0][0] + 1] For $i = 1 To $income_input_types[0][0] $income_input_array[$i] = GUICtrlCreateInput($income_input_types[$i][0], 190, $income_input_types[$i][1], 80, 20) Next GUICtrlCreatelabel( "Sub Total",190,420,100,30) $income_sub_total = GUICtrlCreateLabel($income_total ,290 ,420, 100, 20) GUISetState() GUIRegisterMsg($WM_COMMAND, "On_WM_COMMAND") While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func On_WM_COMMAND($hWnd, $Msg, $wParam, $lParam) $nNotifyCode = BitShift($wParam, 16) $nID = BitAND($wParam, 0x0000FFFF) ; Was it an update message If $nNotifyCode = $EN_UPDATE Then ; Count inputs $iCount = UBound($income_input_array) - 1 Switch $nID ; Check ControlID matches one of the inputs Case $income_input_array[1] To $income_input_array[$iCount] ; Reset total $income_total = 0 ; Count total For $i = 1 to $iCount $income_total += GUICtrlRead($income_input_array[$i]) Next ; Display total GUICtrlSetData($income_sub_total, $income_total) EndSwitch EndIf EndFunc ;==>On_WM_COMMANDM23I see guinness has already found a similar example! Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Chimaera Posted June 22, 2011 Author Share Posted June 22, 2011 (edited) Ok that looks good but .. I have on the full program 8 tabs like that so i was aiming for a variable for each total then calculate them together to give final total Can i create 8 Func _Main_1() _Main_2() etc or is there a better way? And would i be able to reuse Func WM_COMMAND($hWnd, $iMsg, $iwParam, $ilParam) for all of them? Chimaera EDIT sorry didnt see your post Melba23 but does my question still apply? Edited June 22, 2011 by Chimaera If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 22, 2011 Moderators Share Posted June 22, 2011 Chimaera,Create each block of inputs in immediate succession so that you get successive ControlIDs and then use multiple Case structures within the message handler. Give it a go and I will do the same - we can compare results. But I am not showing you mine unless you show me yours first! M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Chimaera Posted June 22, 2011 Author Share Posted June 22, 2011 I have upto a max of 4 arrays on each tab only 2 of them are input arrays, surely if its on a second tab they wont be successive and with the text array (basically the titles for the inputs done in a similar way) but they are interspersed between the input arrays as i work on a per tab basis Anyway ill have a look at the suggestions and see what i can come up with. Thanks for the help Chimaera If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 22, 2011 Moderators Share Posted June 22, 2011 Chimaera,As long as each set of inputs is created in immediate succession the trick will work - take a look at this very rough and ready example:expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <EditConstants.au3> #include <Array.au3> Global $nIncome_Total, $nIncome_Sub0, $nIncome_Sub1, $nIncome_Sub2 Global $aIncome_Input_Types_0[14][2] = [[13, 2],["", 75],["", 100],["", 125],["", 150],["", 175],["",200],["",225],["",250],["",275],["",300],["",325],["",350],["", 375]] Global $aIncome_Input_Types_1[12][2] = [[11, 2],["", 75],["", 100],["", 125],["", 150],["", 175],["",200],["",225],["",250],["",275],["",300],["",325]] Global $aIncome_Input_Types_2[10][2] = [[9, 2],["", 75],["", 100],["", 125],["", 150],["", 175],["",200],["",225],["",250],["",275]] Global $aIncome_Input_CIDs_0[$aIncome_Input_Types_0[0][0] + 1], $aIncome_Input_CIDs_1[$aIncome_Input_Types_1[0][0] + 1], $aIncome_Input_CIDs_2[$aIncome_Input_Types_2[0][0] + 1] $GUI_Start = GUICreate("HBC", 500, 500) $hTab = GUICtrlCreateTab(10, 10, 480, 480) $hTab0 = GUICtrlCreateTabItem("Tab 0") For $i = 1 To $aIncome_Input_Types_0[0][0] $aIncome_Input_CIDs_0[$i] = GUICtrlCreateInput($aIncome_Input_Types_0[$i][0], 190, $aIncome_Input_Types_0[$i][1], 80, 20) Next _ArrayDisplay($aIncome_Input_CIDs_0) GUICtrlCreatelabel("Sub Total 0",190,420,100,30) $hSubTotal_0 = GUICtrlCreateLabel($nIncome_Sub0 ,290 ,420, 100, 20) GUICtrlCreatelabel("Global Total",190,450,100,30) $hTotal_0 = GUICtrlCreateLabel($nIncome_Total ,290 ,450, 100, 20) $hTab1 = GUICtrlCreateTabItem("Tab 1") For $i = 1 To $aIncome_Input_Types_1[0][0] $aIncome_Input_CIDs_1[$i] = GUICtrlCreateInput($aIncome_Input_Types_1[$i][0], 190, $aIncome_Input_Types_1[$i][1], 80, 20) Next _ArrayDisplay($aIncome_Input_CIDs_1) GUICtrlCreatelabel("Sub Total 1",190,420,100,30) $hSubTotal_1 = GUICtrlCreateLabel($nIncome_Sub1 ,290 ,420, 100, 20) GUICtrlCreatelabel("Global Total",190,450,100,30) $hTotal_1 = GUICtrlCreateLabel($nIncome_Total ,290 ,450, 100, 20) $hTab2 = GUICtrlCreateTabItem("Tab 2") For $i = 1 To $aIncome_Input_Types_2[0][0] $aIncome_Input_CIDs_2[$i] = GUICtrlCreateInput($aIncome_Input_Types_2[$i][0], 190, $aIncome_Input_Types_2[$i][1], 80, 20) Next _ArrayDisplay($aIncome_Input_CIDs_2) GUICtrlCreatelabel("Sub Total 2",190,420,100,30) $hSubTotal_2 = GUICtrlCreateLabel($nIncome_Sub2 ,290 ,420, 100, 20) GUICtrlCreatelabel("Global Total",190,450,100,30) $hTotal_2 = GUICtrlCreateLabel($nIncome_Total ,290 ,450, 100, 20) GUICtrlCreateTabItem("") GUISetState() GUIRegisterMsg($WM_COMMAND, "On_WM_COMMAND") While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func On_WM_COMMAND($hWnd, $Msg, $wParam, $lParam) $nNotifyCode = BitShift($wParam, 16) $nID = BitAND($wParam, 0x0000FFFF) ; Was it an update message If $nNotifyCode = $EN_UPDATE Then ; Count inputs $iCount_0 = $aIncome_Input_Types_0[0][0] $iCount_1 = $aIncome_Input_Types_1[0][0] $iCount_2 = $aIncome_Input_Types_2[0][0] Switch $nID ; If ControlID matches one of the inputs on Tab 0 Case $aIncome_Input_CIDs_0[1] To $aIncome_Input_CIDs_0[$iCount_0] ; Reset subtotal $nIncome_Sub0 = 0 ; Count total For $i = 1 to $iCount_0 $nIncome_Sub0 += GUICtrlRead($aIncome_Input_CIDs_0[$i]) Next ; Display total GUICtrlSetData($hSubTotal_0, $nIncome_Sub0) ; If ControlID matches one of the inputs on Tab 0 Case $aIncome_Input_CIDs_1[1] To $aIncome_Input_CIDs_1[$iCount_1] ; Reset subtotal $nIncome_Sub1 = 0 ; Count total For $i = 1 to $iCount_1 $nIncome_Sub1 += GUICtrlRead($aIncome_Input_CIDs_1[$i]) Next ; Display total GUICtrlSetData($hSubTotal_1, $nIncome_Sub1) ; If ControlID matches one of the inputs on Tab 0 Case $aIncome_Input_CIDs_2[1] To $aIncome_Input_CIDs_2[$iCount_2] ; Reset subtotal $nIncome_Sub2 = 0 ; Count total For $i = 1 to $iCount_2 $nIncome_Sub2 += GUICtrlRead($aIncome_Input_CIDs_2[$i]) Next ; Display total GUICtrlSetData($hSubTotal_2, $nIncome_Sub2) EndSwitch ; Set global total $nIncome_Total = $nIncome_Sub0 + $nIncome_Sub1 + $nIncome_Sub2 GUICtrlSetData($hTotal_0, $nIncome_Total) GUICtrlSetData($hTotal_1, $nIncome_Total) GUICtrlSetData($hTotal_2, $nIncome_Total) EndIf EndFunc ;==>On_WM_COMMANDLots of scope for putting the repetitive parts of it into functions, but it shows the idea. It does not matter what you do in between creating the blocks of inputs, all that matters is creating the block of inputs themselves in immediate succession. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Chimaera Posted June 22, 2011 Author Share Posted June 22, 2011 Lol now im horribly confused leave it with me ill be back ... in a month prob Ill have to try and get my head round it Thanks again C If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 22, 2011 Moderators Share Posted June 22, 2011 Chimaera, Does this explanation in another thread help at all? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Chimaera Posted June 22, 2011 Author Share Posted June 22, 2011 Ill read up and get back to you M23, its the jump from simple array that you taught me a while ago to massively elaborate code (from my eyes) that's confused me I can see little bits from the original that makes sense, i will have to sit and play with it until i get the gist of what it does Ill be back ... <<sure thats been said before Thanks again Chimaera If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 22, 2011 Moderators Share Posted June 22, 2011 Chimaera, It is actually the same code, but repeated 3 times - once for each tab. Anyway, please feel free to ask any questions you want - the whole idea is that you understand what is going on and can modify the code to fit yrou particular needs. That is why I am here after all! M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
UEZ Posted June 22, 2011 Share Posted June 22, 2011 Here another way: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Opt("GUIOnEventMode", 1) Global $income_total $GUI_Start = GUICreate("HBC", 500, 500, -1, -1) Global $income_input_types[14][2] = [[13, 2],["", 75],["", 100],["", 125],["", 150],["", 175],["",200],["",225],["",250],["",275],["",300],["",325],["",350],["", 375]] Global $income_input_array[$income_input_types[0][0] + 1] Global $income_input_Totals[$income_input_types[0][0] + 1] For $i = 1 To $income_input_types[0][0] $income_input_array[$i] = GUICtrlCreateInput("0", 190, $income_input_types[$i][1], 80, 20) GUICtrlSetOnEvent($income_input_array[$i], "Sum") Next $l = GUICtrlCreatelabel( "Sub Total: 0",190,420,100,30) $income_sub_total = GUICtrlCreateLabel($income_total ,290 ,420) GUISetState() GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit") While Sleep(10000) WEnd Func Sum() Local $i, $income_total For $i = 1 to $income_input_types[0][0] $income_total += GUICtrlRead($income_input_array[$i]) Next GUICtrlSetData($l, "Sub Total: " & $income_total) EndFunc Func _Exit() Exit EndFunc Br, UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ 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