Jump to content

error on copy notes


Recommended Posts

I have the following code that sometimes when running it is throwing the error of 

"line 1264 (file "C:\users\diagnostic Tech 10\Desktop\Sales Note Template.exe"):

Error: Variable used without being declared.


#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=c:\users\vince s\documents\form2.kxf
$Form2 = GUICreate("Sales Note Template", 820, 608, 971, 114)
GUISetBkColor(0xC0C0C0)

#Region Lables====================================================================
$SalesAgentName = GUICtrlCreateLabel("Diagnostic Agent: ", 8, 8, 245, 21, $SS_CENTER)
GUICtrlSetFont(-1, 11, 800, 0, "Times New Roman")
$CustomerFullName = GUICtrlCreateLabel("Customer Full Name: ", 8, 64, 245, 21, $SS_CENTER)
GUICtrlSetFont(-1, 11, 800, 0, "Times New Roman")
$CustomerEmailAdd = GUICtrlCreateLabel("Customer E-Mail Address: ", 8, 120, 250, 21, $SS_CENTER)
GUICtrlSetFont(-1, 11, 800, 0, "Times New Roman")
$CustomerNumber = GUICtrlCreateLabel("Customer Phone Number: ", 8, 176, 252, 21, $SS_CENTER)
GUICtrlSetFont(-1, 11, 800, 0, "Times New Roman")
$PrimaryNumber = GUICtrlCreateLabel("Primary: ", 48, 208, 44, 17)
$SecondaryNumber = GUICtrlCreateLabel("Secondary: ", 168, 208, 61, 17)
$PlanPurchased = GUICtrlCreateLabel("Plan Purchased: ", 8, 256, 249, 21, $SS_CENTER)
GUICtrlSetFont(-1, 11, 800, 0, "Times New Roman")
$softwarepurchased = GUICtrlCreateLabel("Software Purchased: ", 8, 312, 253, 21, $SS_CENTER)
GUICtrlSetFont(-1, 11, 800, 0, "Times New Roman")
$TotalAmountPaid = GUICtrlCreateLabel("Total Amount Paid: ", 8, 488, 255, 21, $SS_CENTER)
GUICtrlSetFont(-1, 11, 800, 0, "Times New Roman")
$OperatingSystem = GUICtrlCreateLabel("Operating System: ", 8, 368, 250, 21, $SS_CENTER)
GUICtrlSetFont(-1, 11, 800, 0, "Times New Roman")
$ComputersSignedUp = GUICtrlCreateLabel("Computers Signed Up: ", 8, 424, 253, 21, $SS_CENTER)
GUICtrlSetFont(-1, 11, 800, 0, "Times New Roman")
$permissiontoremoveav = GUICtrlCreateLabel("Did You Get Permission To Remove Current Antivirus: ", 344, 16, 200, 59)
GUICtrlSetFont(-1, 11, 800, 0, "Times New Roman")
$AVtoRemove = GUICtrlCreateLabel("Security Software To Remove If Any: ", 272, 120, 315, 21, $SS_CENTER)
GUICtrlSetFont(-1, 11, 800, 0, "Times New Roman")
$preferredbrowser = GUICtrlCreateLabel("Preferred Browser: ", 600, 16, 192, 21, $SS_CENTER)
GUICtrlSetFont(-1, 11, 800, 0, "Times New Roman")
$desiredhomepage = GUICtrlCreateLabel("Desired Home Page: ", 600, 120, 193, 21, $SS_CENTER)
GUICtrlSetFont(-1, 11, 800, 0, "Times New Roman")
$capturedwinpass = GUICtrlCreateLabel("Captured Windows Password: ", 600, 248, 203, 21, $SS_CENTER)
GUICtrlSetFont(-1, 11, 800, 0, "Times New Roman")
$winoptionalpass = GUICtrlCreateLabel("Password: ", 600, 296, 57, 17)
$additionalnotes = GUICtrlCreateLabel("Additional Notes About Customer's Specfied Issues Or Repairs: ", 320, 368, 423, 17, $SS_CENTER)
#EndRegion Lables====================================================================

#Region Inputs=====================================================================
$InputAgentName = GUICtrlCreateInput("", 8, 32, 249, 21)
$InputCustomerName = GUICtrlCreateInput("", 8, 88, 249, 21)
$InputCustomerEmailAdd = GUICtrlCreateInput("", 8, 144, 249, 21)
$InputCustomerPNumber = GUICtrlCreateInput("", 8, 224, 121, 21)
$InputCustomerSNumber = GUICtrlCreateInput("", 136, 224, 121, 21)
#EndRegion Inputs=====================================================================

#Region ComboBoxes===================================================================
$SelectPlan = GUICtrlCreateCombo("", 8, 280, 249, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "1 Year Repair Service|1 Time Repair Service|Six Month Repair Service|Software Install Only")
$SelectSoftware = GUICtrlCreateCombo("", 8, 336, 249, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "Life Time Stopzilla|1 Year Stopzilla |No AV Purchased")
$SelectOperatingSystem = GUICtrlCreateCombo("", 8, 392, 249, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "Windows|MAC")
#EndRegion ComboBoxes===================================================================

#Region Inputs=====================================================================
$Otherinputboxav = GUICtrlCreateInput("", 272, 312, 121, 21)
$otherinput2browser = GUICtrlCreateInput("", 600, 216, 121, 21)
$additionalnotesinput = GUICtrlCreateEdit("", 320, 392, 425, 193)
$InputAmountPaid = GUICtrlCreateInput("$", 80, 520, 121, 21)
$optionalwinpassinput = GUICtrlCreateInput("", 600, 312, 121, 21)
#EndRegion Inputs=====================================================================

#Region RadioButtons============================================================
$SelectPC1 = GUICtrlCreateRadio("1 PC", 48, 456, 49, 17)
$SelectPC2 = GUICtrlCreateRadio("2 PC", 120, 456, 49, 17)
$SelectPC3 = GUICtrlCreateRadio("3 PC", 184, 456, 49, 17)
#EndRegion RadioButtons============================================================

#Region Checkboxes===================================================================
$premoveavyes = GUICtrlCreateCheckbox("Yes", 368, 72, 49, 17)
$premoveavno = GUICtrlCreateCheckbox("No", 456, 72, 49, 17)
$Nortonckbox = GUICtrlCreateCheckbox("Norton", 272, 144, 65, 17)
$Webrootckbox = GUICtrlCreateCheckbox("Webroot", 272, 168, 65, 17)
$Kasperskyckbox = GUICtrlCreateCheckbox("Kaspersky", 272, 192, 81, 17)
$TrendMicrockbox = GUICtrlCreateCheckbox("Trend Micro", 272, 216, 81, 17)
$CaAVckbox = GUICtrlCreateCheckbox("CA Antivirus", 272, 240, 81, 17)
$Avirackbox = GUICtrlCreateCheckbox("Avrira", 272, 264, 57, 17)
$otherchkbox = GUICtrlCreateCheckbox("Other", 272, 288, 57, 17)
$Mcafeechkbox = GUICtrlCreateCheckbox("McAfee", 368, 144, 65, 17)
$avgchkbox = GUICtrlCreateCheckbox("AVG", 368, 168, 57, 17)
$Pandachkbox = GUICtrlCreateCheckbox("Panda", 368, 192, 65, 17)
$Viprechkbox = GUICtrlCreateCheckbox("Vipre", 368, 216, 57, 17)
$Comodochkbox = GUICtrlCreateCheckbox("Comodo", 368, 240, 73, 17)
$Emisoftchkbox = GUICtrlCreateCheckbox("Emsisoft", 368, 264, 65, 17)
$Avastchkbox = GUICtrlCreateCheckbox("Avast", 472, 144, 97, 17)
$Esetchkbox = GUICtrlCreateCheckbox("Eset", 472, 168, 97, 17)
$Sophoschkbox = GUICtrlCreateCheckbox("Sophos", 472, 192, 97, 17)
$ZoneAlarmchkbox = GUICtrlCreateCheckbox("Zone Alarm", 472, 216, 97, 17)
$Fsecurechkbox = GUICtrlCreateCheckbox("F-Secure", 472, 240, 97, 17)
$googlechkbox = GUICtrlCreateCheckbox("Google.com", 600, 144, 97, 17)
$yahoochkbox = GUICtrlCreateCheckbox("Yahoo.com", 704, 144, 81, 17)
$bingchkbox = GUICtrlCreateCheckbox("Bing.com", 704, 192, 73, 17)
$aolchkbox = GUICtrlCreateCheckbox("Aol.com", 600, 168, 97, 17)
$msnchkbox = GUICtrlCreateCheckbox("MSN.com", 704, 168, 73, 17)
$otherchkbox2 = GUICtrlCreateCheckbox("Other", 600, 192, 81, 17)
$bitdefenderchkbox = GUICtrlCreateCheckbox("Bit Defender", 368, 288, 81, 17)
$nonechkbox = GUICtrlCreateCheckbox("None", 472, 264, 49, 17)
$removeallchkbox = GUICtrlCreateCheckbox("Remove All", 472, 288, 97, 17)
$iechkbox = GUICtrlCreateCheckbox("Internet Explorer", 600, 40, 97, 17)
$ffchkbox = GUICtrlCreateCheckbox("FireFox", 736, 40, 65, 17)
$gcchkbox = GUICtrlCreateCheckbox("Google Chrome", 600, 64, 97, 17)
$safarichkbox = GUICtrlCreateCheckbox("Safari", 736, 64, 57, 17)
$operachkbox = GUICtrlCreateCheckbox("Opera", 600, 88, 97, 17)
$winpasscapyes = GUICtrlCreateCheckbox("Yes", 640, 272, 49, 17)
$winpasscapno = GUICtrlCreateCheckbox("No", 704, 272, 41, 17)
#EndRegion Checkboxes===================================================================

$CopyNotes = GUICtrlCreateButton("Generate And Copy Notes", 8, 560, 131, 33)
$newcustomer = GUICtrlCreateButton("New Customer", 144, 560, 115, 33)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###


While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

        Case $CopyNotes

            If GUICtrlRead($SelectPC1) = 1 Then
                $PCsPurchased = 1
            ElseIf GUICtrlRead($SelectPC2) = 1 Then
                $PCsPurchased = 2
            ElseIf GUICtrlRead($SelectPC3) = 1 Then
                $PCsPurchased = 3
            EndIf

            If GUICtrlRead($premoveavyes) = 1 Then $permission_av = ('Yes')
            If GUICtrlRead($premoveavno) = 1 Then $permission_av = ('No')

            If GUICtrlRead($Nortonckbox) = 1 Then $AVSelected = ('Norton Antivirus')
            If GUICtrlRead($Webrootckbox) = 1 Then $AVSelected = ('Webroot Antivirus')
            If GUICtrlRead($Kasperskyckbox) = 1 Then $AVSelected = ('Kaspersky Antivirus')
            If GUICtrlRead($TrendMicrockbox) = 1 Then $AVSelected = ('Trend Micro Antivirus')
            If GUICtrlRead($CaAVckbox) = 1 Then $AVSelected = ('CA Antivirus')
            If GUICtrlRead($Avirackbox) = 1 Then $AVSelected = ('Avrira Antivirus')
            If GUICtrlRead($Mcafeechkbox) = 1 Then $AVSelected = ('McAfee Antivirus')
            If GUICtrlRead($avgchkbox) = 1 Then $AVSelected = ('AVG Antivirus')
            If GUICtrlRead($Pandachkbox) = 1 Then $AVSelected = ('Panda Antivirus')
            If GUICtrlRead($Viprechkbox) = 1 Then $AVSelected = ('Vipre Antivirus')
            If GUICtrlRead($Comodochkbox) = 1 Then $AVSelected = ('Comodo Antivirus')
            If GUICtrlRead($Emisoftchkbox) = 1 Then $AVSelected = ('Emsisoft Antivirus')
            If GUICtrlRead($Avastchkbox) = 1 Then $AVSelected = ('Avast Antivirus')
            If GUICtrlRead($Esetchkbox) = 1 Then $AVSelected = ('Eset Antivirus')
            If GUICtrlRead($Sophoschkbox) = 1 Then $AVSelected = ('Sophos Antivirus')
            If GUICtrlRead($ZoneAlarmchkbox) = 1 Then $AVSelected = ('Zone Alarm')
            If GUICtrlRead($Fsecurechkbox) = 1 Then $AVSelected = ('F-Secure Antivirus')
            if GUICtrlRead($nonechkbox) = 1 Then $AVSelected = ('None')
            if GUICtrlRead($removeallchkbox) = 1 Then $AVSelected = ('Remove All')
            If GUICtrlRead($otherchkbox) = 1 Then $AVSelected = GUICtrlRead($Otherinputboxav)

            If GUICtrlRead($iechkbox) = 1 Then $browser_selected = ('Internet Explorer')
            If GUICtrlRead($gcchkbox) = 1 Then $browser_selected = ('Google Chrome')
            If GUICtrlRead($operachkbox) = 1 Then $browser_selected = ('Opera')
            If GUICtrlRead($ffchkbox) = 1 Then $browser_selected = ('FireFox')
            If GUICtrlRead($safarichkbox) = 1 Then $browser_selected = ('Safari')

            If GUICtrlRead($googlechkbox) = 1 Then $HPSelected = ('Google.com')
            If GUICtrlRead($yahoochkbox) = 1 Then $HPSelected = ('Yahoo.com')
            If GUICtrlRead($bingchkbox) = 1 Then $HPSelected = ('Bing.com')
            If GUICtrlRead($aolchkbox) = 1 Then $HPSelected = ('Aol.com')
            If GUICtrlRead($msnchkbox) = 1 Then $HPSelected = ('MSN.com')
            If GUICtrlRead($otherchkbox2) = 1 Then $HPSelected = GUICtrlRead($otherinput2browser)

            if GUICtrlRead($winpasscapyes) = 1 Then $winPassword = ('Yes')
            if GUICtrlRead($winpasscapno) = 1 Then $winPassword = ('No')




            $output = GUICtrlRead($SalesAgentName) & ' ' & GUICtrlRead($InputAgentName) & @CRLF
            $output &= GUICtrlRead($CustomerFullName) & ' ' & GUICtrlRead($InputCustomerName) & @CRLF
            $output &= GUICtrlRead($CustomerEmailAdd) & ' ' & GUICtrlRead($InputCustomerEmailAdd) & @CRLF
            $output &= GUICtrlRead($PrimaryNumber) & ' ' & GUICtrlRead($InputCustomerPNumber) & @CRLF
            $output &= GUICtrlRead($SecondaryNumber) & ' ' & GUICtrlRead($InputCustomerSNumber) & @CRLF
            $output &= GUICtrlRead($PlanPurchased) & ' ' & GUICtrlRead($SelectPlan) & @CRLF
            $output &= GUICtrlRead($softwarepurchased) & GUICtrlRead($SelectSoftware) & @CRLF
            $output &= GUICtrlRead($TotalAmountPaid) & ' ' & GUICtrlRead($InputAmountPaid) & @CRLF
            $output &= GUICtrlRead($OperatingSystem) & ' ' & GUICtrlRead($SelectOperatingSystem) & @CRLF
            $output &= GUICtrlRead($ComputersSignedUp) & ' ' & $PCsPurchased & @CRLF
            $output &= GUICtrlRead($permissiontoremoveav) & ' ' & $permission_av & @CRLF
            $output &= GUICtrlRead($AVtoRemove) & ' ' & $AVSelected & @CRLF
            $output &= GUICtrlRead($preferredbrowser) & ' ' & $browser_selected & @CRLF
            $output &= GUICtrlRead($desiredhomepage) & ' ' & $HPSelected & @CRLF
            $output &= GUICtrlRead($capturedwinpass) & ' ' & $winPassword & @CRLF
            $output &= GUICtrlRead($winoptionalpass) & ' ' & GUICtrlRead($optionalwinpassinput) & @CRLF
            $output &= GUICtrlRead($additionalnotes) & ' ' & GUICtrlRead($additionalnotesinput) & @CRLF
            $output &="*******************************************************"



            ClipPut($output)
            ConsoleWrite(ClipGet() & @CRLF)

        Case $newcustomer
            ;Loop through all inputs and set them to blank with GUICtrlSetData

            GUICtrlSetData($InputAgentName, "")
            GUICtrlSetData($InputCustomerName, "")
            GUICtrlSetData($InputCustomerEmailAdd, "")
            GUICtrlSetData($InputCustomerPNumber, "")
            GUICtrlSetData($InputCustomerSNumber, "")
            GUICtrlSetData($SelectPlan, ' ', Default)
            GUICtrlSetData($SelectSoftware, ' ', Default)
            GUICtrlSetData($SelectOperatingSystem, ' ', Default)
            GUICtrlSetData($Otherinputboxav, "")
            GUICtrlSetData($otherinput2browser, "")
            GUICtrlSetData($additionalnotesinput, "")
            GUICtrlSetData($InputAmountPaid, "$")
            GUICtrlSetData($optionalwinpassinput, "")

            GUICtrlSetState($SelectPC1, $gui_unchecked)
            GUICtrlSetState($SelectPC2, $gui_unchecked)
            GUICtrlSetState($SelectPC3, $gui_unchecked)
            GUICtrlSetState($premoveavno, $gui_unchecked)
            GUICtrlSetState($premoveavyes, $gui_unchecked)

            GUICtrlSetState($Nortonckbox, $gui_unchecked)
            GUICtrlSetState($Webrootckbox, $gui_unchecked)
            GUICtrlSetState($Kasperskyckbox, $gui_unchecked)
            GUICtrlSetState($TrendMicrockbox, $gui_unchecked)
            GUICtrlSetState($CaAVckbox, $gui_unchecked)
            GUICtrlSetState($Avirackbox, $gui_unchecked)
            GUICtrlSetState($otherchkbox, $gui_unchecked)
            GUICtrlSetState($Mcafeechkbox, $gui_unchecked)
            GUICtrlSetState($avgchkbox, $gui_unchecked)
            GUICtrlSetState($Pandachkbox, $gui_unchecked)
            GUICtrlSetState($Viprechkbox, $gui_unchecked)
            GUICtrlSetState($Comodochkbox, $gui_unchecked)
            GUICtrlSetState($Emisoftchkbox, $gui_unchecked)
            GUICtrlSetState($bitdefenderchkbox, $gui_unchecked)
            GUICtrlSetState($Avastchkbox, $gui_unchecked)
            GUICtrlSetState($Esetchkbox, $gui_unchecked)
            GUICtrlSetState($Sophoschkbox, $gui_unchecked)
            GUICtrlSetState($ZoneAlarmchkbox, $gui_unchecked)
            GUICtrlSetState($Fsecurechkbox, $gui_unchecked)
            GUICtrlSetState($nonechkbox, $gui_unchecked)
            GUICtrlSetState($removeallchkbox, $gui_unchecked)

            GUICtrlSetState($iechkbox, $gui_unchecked)
            GUICtrlSetState($gcchkbox, $gui_unchecked)
            GUICtrlSetState($operachkbox, $gui_unchecked)
            GUICtrlSetState($ffchkbox, $gui_unchecked)
            GUICtrlSetState($safarichkbox, $gui_unchecked)
            GUICtrlSetState($googlechkbox, $gui_unchecked)
            GUICtrlSetState($aolchkbox, $gui_unchecked)
            GUICtrlSetState($otherchkbox2, $gui_unchecked)
            GUICtrlSetState($yahoochkbox, $gui_unchecked)
            GUICtrlSetState($msnchkbox, $gui_unchecked)
            GUICtrlSetState($bingchkbox, $gui_unchecked)

            GUICtrlSetState($winpasscapno, $gui_unchecked)
            GUICtrlSetState($winpasscapyes, $gui_unchecked)



    EndSwitch
WEnd

 

Link to comment
Share on other sites

  • Moderators

tattoofreak87,

There are a whole bunch of variables in that script which are only declared within If statements.  A good example is the following section:

If GUICtrlRead($premoveavyes) = 1 Then $permission_av = ('Yes')
If GUICtrlRead($premoveavno) = 1 Then $permission_av = ('No')

If neither of the checkboxes are selected then you never declare the variable - which will cause an error later when you do this:

$output &= GUICtrlRead($permissiontoremoveav) & ' ' & $permission_av & @CRLF

Given the type of error you are getting, I can well imagine that this is the reason behind it.

The solution? Recast the code so that there are default declared values for the variables or, as in the case above, make sure one of the selections is premade (preferably by using a group of radiobuttons so that they toggle automatically).

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Moderators

tattoofreak87,

Try this - it seems to work fine for me:

#include <GUIConstantsEx.au3>
#include <MsgBoxConstants.au3>
#include <StaticConstants.au3>
#include <ComboConstants.au3>

#Region Text======================================================================
; Declare variableto hold text
Global $sSalesAgentName, $sCustomerFullName, $sCustomerEmailAdd, $sCustomerNumber
Global $sPlanPurchased, $sSoftwarePurchased, $sTotalAmountPaid, $sOperatingSystem
Global $sComputersSignedUp, $sPermissiontoRemoveAV, $sAVtoRemove, $sPreferredBrowser
Global $sDesiredHomePage, $sCapturedWinPass, $sPrimaryNumber, $sSecondaryNumber
Global $sWinOptionalPass, $sAdditionalNotes
; Set default values
_SetText()
#EndRegion Text===================================================================

$Form2 = GUICreate("Sales Note Template", 820, 608)
GUISetBkColor(0xC0C0C0)

#Region Labels====================================================================
$cSalesAgentName = GUICtrlCreateLabel($sSalesAgentName, 8, 8, 245, 21, $SS_CENTER)
$cCustomerFullName = GUICtrlCreateLabel($sCustomerFullName, 8, 64, 245, 21, $SS_CENTER)
$cCustomerEmailAdd = GUICtrlCreateLabel($sCustomerEmailAdd, 8, 120, 250, 21, $SS_CENTER)
$cCustomerNumber = GUICtrlCreateLabel($sCustomerNumber, 8, 176, 252, 21, $SS_CENTER)
$cPlanPurchased = GUICtrlCreateLabel($sPlanPurchased, 8, 256, 249, 21, $SS_CENTER)
$cSoftwarePurchased = GUICtrlCreateLabel($sSoftwarePurchased, 8, 312, 253, 21, $SS_CENTER)
$cTotalAmountPaid = GUICtrlCreateLabel($sTotalAmountPaid, 8, 488, 255, 21, $SS_CENTER)
$cOperatingSystem = GUICtrlCreateLabel($sOperatingSystem, 8, 368, 250, 21, $SS_CENTER)
$cComputersSignedUp = GUICtrlCreateLabel($sComputersSignedUp, 8, 424, 253, 21, $SS_CENTER)
$cPermissiontoRemoveAV = GUICtrlCreateLabel($sPermissiontoRemoveAV, 344, 16, 200, 59)
$cAVtoRemove = GUICtrlCreateLabel($sAVtoRemove, 272, 120, 315, 21, $SS_CENTER)
$cPreferredBrowser = GUICtrlCreateLabel($sPreferredBrowser, 600, 16, 192, 21, $SS_CENTER)
$cDesiredHomePage = GUICtrlCreateLabel($sDesiredHomePage, 600, 120, 193, 21, $SS_CENTER)
$cCapturedWinPass = GUICtrlCreateLabel($sCapturedWinPass, 600, 248, 203, 21, $SS_CENTER)
For $i = $cSalesAgentName To $cCapturedWinPass
    GUICtrlSetFont($i, 11, 800, 0, "Times New Roman")
Next
; No point in stroing ControlId if you never use it
GUICtrlCreateLabel($sPrimaryNumber, 48, 208, 44, 17)
GUICtrlCreateLabel($sSecondaryNumber, 168, 208, 61, 17)
GUICtrlCreateLabel($sWinOptionalPass, 600, 296, 57, 17)
GUICtrlCreateLabel($sAdditionalNotes, 320, 368, 423, 17, $SS_CENTER)
#EndRegion Labels====================================================================

#Region Inputs=====================================================================
$cInputAgentName = GUICtrlCreateInput("", 8, 32, 249, 21)
$cInputCustomerName = GUICtrlCreateInput("", 8, 88, 249, 21)
$cInputCustomerEmailAdd = GUICtrlCreateInput("", 8, 144, 249, 21)
$cInputCustomerPNumber = GUICtrlCreateInput("", 8, 224, 121, 21)
$cInputCustomerSNumber = GUICtrlCreateInput("", 136, 224, 121, 21)
$cInputAV = GUICtrlCreateInput("", 272, 312, 121, 21)
$cInputBrowser = GUICtrlCreateInput("", 600, 216, 121, 21)
$cInputAdditionalNotes = GUICtrlCreateEdit("", 320, 392, 425, 193)
$cInputAmountPaid = GUICtrlCreateInput("$", 80, 520, 121, 21)
$cInputOptionalWinPass = GUICtrlCreateInput("", 600, 312, 121, 21)
#EndRegion Inputs=====================================================================

#Region ComboBoxes===================================================================
; Set default values so there is always something to read
$cSelectPlan = GUICtrlCreateCombo("", 8, 280, 249, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL))
GUICtrlSetData($cSelectPlan, "1 Year Repair Service|1 Time Repair Service|Six Month Repair Service|Software Install Only", "1 Year Repair Service")
$cSelectSoftware = GUICtrlCreateCombo("", 8, 336, 249, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL))
GUICtrlSetData($cSelectSoftware, "Life Time Stopzilla|1 Year Stopzilla |No AV Purchased", "Life Time Stopzilla")
$cSelectOperatingSystem = GUICtrlCreateCombo("", 8, 392, 249, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL))
GUICtrlSetData($cSelectOperatingSystem, "Windows|MAC", "Windows")
#EndRegion ComboBoxes===================================================================

#Region RadioButtons============================================================
; Set into groups so they toggle automatically
GUIStartGroup()
$cSelectPC1 = GUICtrlCreateRadio("1 PC", 48, 456, 49, 17)
; And always set one in each group as checked
GUICtrlSetState($cSelectPC1, $GUI_CHECKED)
$cSelectPC2 = GUICtrlCreateRadio("2 PC", 120, 456, 49, 17)
$cSelectPC3 = GUICtrlCreateRadio("3 PC", 184, 456, 49, 17)
GUIStartGroup()
$cPRemoveAV_Yes = GUICtrlCreateRadio("Yes", 368, 72, 49, 17)
$cPRemoveAV_No = GUICtrlCreateRadio("No", 456, 72, 49, 17)
GUICtrlSetState($cPRemoveAV_No, $GUI_CHECKED)
GUIStartGroup()
$cIE = GUICtrlCreateRadio("Internet Explorer", 600, 40, 97, 17)
GUICtrlSetState($cIE, $GUI_CHECKED)
$cFF = GUICtrlCreateRadio("FireFox", 736, 40, 65, 17)
$cGC = GUICtrlCreateRadio("Google Chrome", 600, 64, 97, 17)
$cSafari = GUICtrlCreateRadio("Safari", 736, 64, 57, 17)
$cOpera = GUICtrlCreateRadio("Opera", 600, 88, 97, 17)
GUIStartGroup()
$cWinPassCapYes = GUICtrlCreateRadio("Yes", 640, 272, 49, 17)
$cWinPassCapNo = GUICtrlCreateRadio("No", 704, 272, 41, 17)
GUICtrlSetState($cWinPassCapNo, $GUI_CHECKED)
GUIStartGroup()
$cGoogle = GUICtrlCreateRadio("Google.com", 600, 144, 97, 17)
GUICtrlSetState($cGoogle, $GUI_CHECKED)
$cYahoo = GUICtrlCreateRadio("Yahoo.com", 704, 144, 81, 17)
$cBing = GUICtrlCreateRadio("Bing.com", 704, 192, 73, 17)
$cAOL = GUICtrlCreateRadio("Aol.com", 600, 168, 97, 17)
$cMSN = GUICtrlCreateRadio("MSN.com", 704, 168, 73, 17)
$cOther = GUICtrlCreateRadio("Other", 600, 192, 81, 17)
GUIStartGroup()
#EndRegion RadioButtons============================================================

#Region Checkboxes===================================================================
$cNortonChk = GUICtrlCreateCheckbox("Norton", 272, 144, 65, 17)
$cWebrootChk = GUICtrlCreateCheckbox("Webroot", 272, 168, 65, 17)
$cKasperskyChk = GUICtrlCreateCheckbox("Kaspersky", 272, 192, 81, 17)
$cTrendMicroChk = GUICtrlCreateCheckbox("Trend Micro", 272, 216, 81, 17)
$cCaAVChk = GUICtrlCreateCheckbox("CA Antivirus", 272, 240, 81, 17)
$cAviraChk = GUICtrlCreateCheckbox("Avrira", 272, 264, 57, 17)
$cMcafeeChk = GUICtrlCreateCheckbox("McAfee", 368, 144, 65, 17)
$cAVGChk = GUICtrlCreateCheckbox("AVG", 368, 168, 57, 17)
$cPandaChk = GUICtrlCreateCheckbox("Panda", 368, 192, 65, 17)
$cVipreChk = GUICtrlCreateCheckbox("Vipre", 368, 216, 57, 17)
$cComodoChk = GUICtrlCreateCheckbox("Comodo", 368, 240, 73, 17)
$cEmisoftChk = GUICtrlCreateCheckbox("Emsisoft", 368, 264, 65, 17)
$cAvastChk = GUICtrlCreateCheckbox("Avast", 472, 144, 97, 17)
$cEsetChk = GUICtrlCreateCheckbox("Eset", 472, 168, 97, 17)
$cSophosChk = GUICtrlCreateCheckbox("Sophos", 472, 192, 97, 17)
$cZoneAlarmChk = GUICtrlCreateCheckbox("Zone Alarm", 472, 216, 97, 17)
$cFsecureChk = GUICtrlCreateCheckbox("F-Secure", 472, 240, 97, 17)
$cBitDefenderChk = GUICtrlCreateCheckbox("Bit Defender", 368, 288, 81, 17)
$cOtherChk = GUICtrlCreateCheckbox("Other", 272, 288, 57, 17)
$cRemoveAllChk = GUICtrlCreateCheckbox("Remove All", 472, 288, 97, 17)
$cNoneChk = GUICtrlCreateCheckbox("None", 472, 264, 49, 17)
; Set something as default
GUICtrlSetState($cNoneChk, $GUI_CHECKED)
#EndRegion Checkboxes===================================================================

$cCopyNotes = GUICtrlCreateButton("Generate And Copy Notes", 8, 560, 131, 33)
$cNewCustomer = GUICtrlCreateButton("New Customer", 144, 560, 115, 33)

GUISetState(@SW_SHOW)

While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit
        Case $cCopyNotes
            ; This will tell us which input has not been filled
            $sError = ""

            ; If the input has a value
            If GUICtrlRead($cInputAgentName) Then
                ; Add it to the label text
                $sSalesAgentName &= " " & GUICtrlRead($cInputAgentName)
            Else
                ; Set the error text to the label text if error text not already set
                If Not $sError Then $sError = $sSalesAgentName
            EndIf

            If GUICtrlRead($cInputCustomerName) Then
                $sCustomerFullName &= " " & GUICtrlRead($cInputCustomerName)
            Else
                If Not $sError Then $sError = $sCustomerFullName
            EndIf

            If GUICtrlRead($cInputCustomerEmailAdd) Then
                $sCustomerEmailAdd &= " " & GUICtrlRead($cInputCustomerEmailAdd)
            Else
                If Not $sError Then $sError = $sCustomerEmailAdd
            EndIf

            If GUICtrlRead($cInputCustomerPNumber) Then
                $sCustomerNumber &= " " & GUICtrlRead($cInputCustomerPNumber)
            Else
                If Not $sError Then $sError = $sCustomerNumber
            EndIf
            ; Add secondary number if there is one - no erro if not
            $sCustomerNumber &= " " & GUICtrlRead($cInputCustomerSNumber)

            ; Teh combos have a default value so can read immediately
            $sPlanPurchased &= " " & GUICtrlRead($cSelectPlan)

            $sSoftwarePurchased &= " " & GUICtrlRead($cSelectSoftware)

            $sOperatingSystem &= " " & GUICtrlRead($cSelectOperatingSystem)

            ; Loop through radios to see which was checked
            For $i = $cSelectPC1 To $cSelectPC3
                If GUICtrlRead($i) = 1 Then
                    ; Add correct value to label text
                    $sComputersSignedUp &= " " & GUICtrlRead($i, 1)
                    ExitLoop
                EndIf
            Next

            ; Check an amount has been input
            If GUICtrlRead($cInputAmountPaid) <> "$" Then
                $sTotalAmountPaid &= " " & GUICtrlRead($cInputAmountPaid)
            Else
                If Not $sError Then $sError = $sTotalAmountPaid
            EndIf

            ; Check permission given to remove AV
            If GUICtrlRead($cPRemoveAV_Yes) = 1 Then
                ; First look for all
                If GUICtrlRead($cRemoveAllChk) = 1 Then
                    $sAVtoRemove &= " All"
                Else
                    ; Now check if "Other" has been checked
                    If GUICtrlRead($cOtherChk) = 1 Then
                        ; And if so check that something was put in the input
                        If GUICtrlRead($cInputAV) Then
                            $sAVtoRemove &= " " & GUICtrlRead($cInputAV)
                        Else
                            If Not $sError Then $sError = "Other AV to Remove"
                        EndIf
                    EndIf
                    ; Now loop through the checkboxes and see which were checked
                    ; These were left as checkboxes as some idiots might have more than one even though it is not a good idea
                    For $i = $cNortonChk To $cBitDefenderChk
                        If GUICtrlRead($i) = 1 Then
                            $sAVtoRemove &= " " & GUICtrlRead($i, 1)
                        EndIf
                    Next
                EndIf
            Else
                ; No premssion to remove
                $sAVtoRemove &= " No permission"
            EndIf

            ; Loop through the browser radios
            For $i = $cIE To $cOpera
                If GUICtrlRead($i) = 1 Then
                    $sPreferredBrowser &= " " & GUICtrlRead($i, 1)
                    ExitLoop
                EndIf
            Next

            ; Check if other home page required
            If GUICtrlRead($cOther) = 1 Then
                ; Check if input contains something
                If GUICtrlRead($cInputBrowser) Then
                    $sDesiredHomePage &= " " & GUICtrlRead($cInputBrowser)
                Else
                    If Not $sError Then $sError = $sDesiredHomePage
                EndIf
            Else
                ; Loop through home page radios
                For $i = $cGoogle To $cMSN
                    If GUICtrlRead($i) = 1 Then
                        $sDesiredHomePage &= " " & GUICtrlRead($i, 1)
                        ExitLoop
                    EndIf
                Next
            EndIf

            ; Check for Win password radio
            If GUICtrlRead($cWinPassCapYes) = 1 Then
                ; Check we have a password
                If GUICtrlRead($cInputOptionalWinPass) Then
                    $sWinOptionalPass &= " " & GUICtrlRead($cInputOptionalWinPass)
                Else
                    If Not $sError Then $sError = $sWinOptionalPass
                EndIf
            Else
                $sWinOptionalPass &= " None"
            EndIf

            ; Add any additional items
            If GUICtrlRead($cInputAdditionalNotes) Then
                $sAdditionalNotes &= " " & GUICtrlRead($cInputAdditionalNotes)
            Else
                $sAdditionalNotes &= " None"
            EndIf

            ; If there was an error
            If $sError Then
                ; Announce it
                MsgBox($MB_SYSTEMMODAL, "Error", $sError & " not completed")
                ; reset all texts for the next try
                _SetText()
            Else
                ; Create output
                $sOutput = $sSalesAgentName & @CRLF & _
                           $sCustomerFullName & @CRLF & _
                           $sCustomerEmailAdd & @CRLF & _
                           $sCustomerNumber & @CRLF & _
                           $sPlanPurchased & @CRLF & _
                           $sSoftwarePurchased & @CRLF & _
                           $sOperatingSystem & @CRLF & _
                           $sTotalAmountPaid & @CRLF & _
                           $sComputersSignedUp & @CRLF & _
                           $sAVtoRemove & @CRLF & _
                           $sPreferredBrowser & @CRLF & _
                           $sDesiredHomePage & @CRLF & _
                           $sWinOptionalPass & @CRLF & _
                           $sAdditionalNotes & @CRLF & _
                           "*******************************************************"
                ClipPut($sOutput)
                ConsoleWrite(ClipGet() & @CRLF)
                ; Reset the GUI by running the "new customer" code
                ContinueCase
            EndIf

        Case $cNewCustomer
            ; Reset texts
            _SetText()
            ; Clear all inputs
            For $i = $cInputAgentName To $cInputOptionalWinPass
                GUICtrlSetData($i, "")
            Next
            ; And reset "$" in the amount
            GUICtrlSetData($cInputAmountPaid, "$")
            ; Reset combos to default
            GUICtrlSetData($cSelectPlan, "|1 Year Repair Service|1 Time Repair Service|Six Month Repair Service|Software Install Only", "1 Year Repair Service")
            GUICtrlSetData($cSelectSoftware, "|Life Time Stopzilla|1 Year Stopzilla |No AV Purchased", "Life Time Stopzilla")
            GUICtrlSetData($cSelectOperatingSystem, "|Windows|MAC", "Windows")
            ; Reset the default radios - the others are automatically unchecked
            GUICtrlSetState($cSelectPC1, $GUI_CHECKED)
            GUICtrlSetState($cPRemoveAV_No, $GUI_CHECKED)
            GUICtrlSetState($cIE, $GUI_CHECKED)
            GUICtrlSetState($cWinPassCapNo, $GUI_CHECKED)
            GUICtrlSetState($cGoogle, $GUI_CHECKED)
            ;  Clear the checkboxes
            For $i = $cNortonChk To $cRemoveAllChk
                GUICtrlSetState($i, $GUI_UNCHECKED)
            Next
            ; And set the default
            GUICtrlSetState($cNoneChk, $GUI_CHECKED)

        Case $cNoneChk
            ; If "No AV" checked, uncheck all other checkboxes
            For $i = $cNortonChk To $cOtherChk
                GUICtrlSetState($i, $GUI_UNCHECKED)
            Next
            GUICtrlSetState($cRemoveAllChk, $GUI_UNCHECKED)

        Case $cRemoveAllChk
            ; If "All AVs" checked, , uncheck all other checkboxes
            For $i = $cNortonChk To $cOtherChk
                GUICtrlSetState($i, $GUI_UNCHECKED)
            Next
            GUICtrlSetState($cNoneChk, $GUI_UNCHECKED)

        Case $cNortonChk To $cOtherChk
            ; if another AV checkbox checked, clear "All" and "None" checkboxes
            GUICtrlSetState($cNoneChk, $GUI_UNCHECKED)
            GUICtrlSetState($cRemoveAllChk, $GUI_UNCHECKED)

    EndSwitch
WEnd

Func _SetText()
    $sSalesAgentName = "Diagnostic Agent: "
    $sCustomerFullName = "Customer Full Name: "
    $sCustomerEmailAdd = "Customer E-Mail Address: "
    $sCustomerNumber = "Customer Phone Number: "
    $sPlanPurchased = "Plan Purchased: "
    $sSoftwarePurchased = "Software Purchased: "
    $sTotalAmountPaid = "Total Amount Paid: "
    $sOperatingSystem = "Operating System: "
    $sComputersSignedUp = "Computers Signed Up: "
    $sPermissiontoRemoveAV = "Did You Get Permission To Remove Current Antivirus: "
    $sAVtoRemove = "Security Software To Remove If Any: "
    $sPreferredBrowser = "Preferred Browser: "
    $sDesiredHomePage = "Desired Home Page: "
    $sCapturedWinPass = "Captured Windows Password: "
    $sPrimaryNumber = "Primary: "
    $sSecondaryNumber = "Secondary: "
    $sWinOptionalPass = "Password: "
    $sAdditionalNotes = "Additional Notes About Customer's Specfied Issues Or Repairs: "
EndFunc

You should now see why radios are easier than checkboxes.  I have commented throughout, but please ask if you have any questions.

M23

 

Edited by Melba23
Typo in code

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Moderators

tattoofreak87,

Apologies - a typo. This line in the Case $cNewCustomer code:

GUICtrlSetData($cSelectPlan, "!1 Year Repair Service

should read:

GUICtrlSetData($cSelectPlan, "|1 Year Repair Service

Sorry about that.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Thank you for your assistance on this, so two more things I was wondering if can be done if not to diffcult or guide me on how to do it?

i wanted to see if there is a way for e-mail field to have it be required in email format?

I was also wondering if in for the phone number fields if it could automatically populate a format of how i want the number written when they click off the phone field for example

5555555555 < ---- is how they type it and i want it populated like (555) 555-5555, is this able to be done?

Link to comment
Share on other sites

  • Moderators

tattoofreak87,

Checking the email can be simple done by checking that the input content matches a required mask - a Regex should be enough. Formatting the number is more difficult, but there are some examples on the forum - let us see who finds them first!

M23

 

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Moderators

tattoofreak87,

A Regular Expression - one of the hardest things I have ever tried to learn. They are very good at matching patterns in strings, but the art is in creating the pattern to match!

Here is my best attempt so far - what do you think of it?

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <MsgBoxConstants.au3>
#include <EditConstants.au3>

Global $sLocalpart = "[[:alnum:]!#$%&'*+-/=?^_`{|}~.]+"
Global $sDomainname = "[[:alnum:].-]+\.[[:alnum:]]+"
Global $aInput[4][2] = [[3, 0], [0, 3], [0, 3], [0, 4]]

$hGUI = GUICreate("Test", 500, 500)

GUICtrlCreateLabel("Email address", 10, 10, 200, 20)
$cEmail = GUICtrlCreateInput("", 10, 40, 200, 20)

GUICtrlCreateLabel("Phone", 10, 100, 200, 20)
GUICtrlCreateLabel("(", 10, 120, 20, 20)
GUICtrlCreateLabel(")", 60, 120, 20, 20)
GUICtrlCreateLabel("-", 120, 120, 20, 20)
For $i = 1 To 3
    $aInput[$i][0] = GUICtrlCreateInput("", (60 * $i) - 40, 120, $aInput[$i][1] * 10, 20)
    GUICtrlSetLimit($aInput[$i][0], $aInput[$i][1])
Next

$cButton = GUICtrlCreateButton("Read", 10, 200, 80, 30)

GUISetState()

GUIRegisterMsg($WM_COMMAND, "_WM_COMMAND")

While 1

    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit
        Case $cButton

            $sError = ""
            If Not _CheckEmail() Then
                $sError = "Invalid email format"
            EndIf

            For $i = 1 To 3
                If StringLen(GUICtrlRead($aInput[$i][0])) <> $aInput[$i][1] Then
                    If Not $sError Then $sError = "Invalid phone number"
                    ExitLoop

                EndIf

            Next
            If $sError Then
                MsgBox($MB_SYSTEMMODAL, "Error", $sError)
            Else
                MsgBox($MB_SYSTEMMODAL, "Read", GUICtrlRead($cEmail) & @CRLF & _
                            "(" & GUICtrlRead($aInput[1][0]) & ") " & GUICtrlRead($aInput[2][0]) & "-" & GUICtrlRead($aInput[3][0]))
            EndIf



    EndSwitch



WEnd



Func _CheckEmail()

    $sEmail = GUICtrlRead($cEmail)
    If StringRegExp($sEmail, '(?i)^(' & $sLocalpart & ')@(' & $sDomainname & ')$', 0) Then
        Return True
    Else
        Return False
    EndIf



EndFunc



Func _WM_COMMAND($hWnd, $Msg, $wParam, $lParam)

    #forceref $hWnd, $Msg, $lParam



    $iCode = BitShift($wParam, 16)
    $iID = BitAND($wParam, 0x0000FFFF)
    Switch $iID

        Case $aInput[1][0], $aInput[2][0], $aInput[3][0]
            $iIndex = $iID - $aInput[1][0] + 1
            Switch $iCode

                Case $EN_UPDATE
                    If StringLen(GUICtrlRead($aInput[$iIndex][0])) = $aInput[$iIndex][1] Then
                        If $iIndex < 3 Then
                            GUICtrlSetState($aInput[$iIndex + 1][0], $GUI_ENABLE)
                            GUICtrlSetState($aInput[$iIndex + 1][0], $GUI_FOCUS)
                        EndIf

                    EndIf

            EndSwitch

    EndSwitch



EndFunc   ;==>_WM_COMMAND

As usual feel free to ask questions - but preferably not too many at a time.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Hey Melba23

i have one problem with the template i just found out

when i go to copy the notes,

for the primary and secondary numbers its coming out in one line written as

Customer Phone Number:  203-735-5428 203-314-2148

as well as password captured yes or no, it does not recognize the yes or no

it is just reading the password box itself

Link to comment
Share on other sites

  • Moderators

tattoofreak87,

To get the phone numbers on 2 lines, just rewrite the section where the phone numbers are read to give you 2 lines.

As for the password, that was a "design decision" on my part - if there was no password given and that radio is set then the password input is not read, which seemed logical. if you are not happy with that, then again just rewrite the section that deals with the password to get it to give you what you do require.

Try and do it yourself - you know where we are if you run into difficulties.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...