Jump to content

interoperationg within two gui


faustf
 Share

Recommended Posts

hi guy  i have  little problem  ,  i  not  have  much clear in mind   the   interoperation within two gui , i read a  wiki

https://www.autoitscript.com/wiki/Managing_Multiple_GUIs

my  example  is little  bit  different ,  i  have  a  1 first script is  formed  like  OnEventMode ,  and  second  script   is not  inside  of  my  1° script  but is  a #include  , and  is formed like  OnEventMode , the situation is:  i call  in  1° script a  2° script  like function , and  i would inside the variable $aTruckMSHIP , have  array , with  choices did do in 2° gui

$aTruckMSHIP = _Truck_pooling_many_ship_gui($Qtt_Pacchi)

but  this  dont  happen because when i call  $aTruckMSHIP = _Truck_pooling_many_ship_gui($Qtt_Pacchi)   , the  flow  continue  of  my first script ,  also if  popup  the 2° gui .

for  prevent this problem , i tryed  to insert a  cicle  while 1  ,inside  a  1° script , but in this mode  create 2° gui in looping , and if  i  insert in 2° gui , popup them  but stay in loop and  not  can choice nothing  in 2°gui.

ofcourse i do some  error , someonce  can explain me   how  is   possible resolve it   , thankz  so much  :)  at  all

 

Link to comment
Share on other sites

  • Moderators

@faustf This is becoming like a broken record with you. How do you expect people to help you with your code when you don't provide any?! 

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

sorry @Jlogan3o13 but is  very big  the  script , but  not  wanna  broken  nothing ,  and  i publish a  part of  code , but  ofcourse is not runnable , not  because i dont  want  , but  because  have  many #include

a part of my  1° script ( call a  function in second  script  $aTruckMSHIP = _Truck_pooling_many_ship_gui($Qtt_Pacchi) )

Select
                                    Case $Qtt_Pacchi = 1
                                        ;|||||||||||||   TRUCKPOOLING WEB !!   |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
                                        ;------- QUESTA PARTE SERVE PER RICHIAMARE EXE MACRO ESTERNO CON OPZIONI ---------------------------------------------
                                        Local $sLogin = ($sUserLogin_TruckPooling & '" "' & $sPasswLogin_TruckPooling)
                                        Local $s1page = ($Buste_Pacchi_Pllets & '" "' & $sNaz_mitt & '" "' & $aDataShip[18] & '" "' & $sCap_mitt & '" "' & $sCity_mitt & '" "' & $aDataShip[16] & '" "' & $aDataShip[15] & '" "' & $Qtt_Pacchi & '" "' & $dPeso & '" "' & $dH & '" "' & $dL & '" "' & $dP)
                                        Local $sMittente = ($sNome_mitt & '" "' & $sCognome_mitt & '" "' & $sTll_mitt & '" "' & $sMail_mittente & '" "' & $sIndirizzo_mitt)
                                        Local $sDestinatario = ($aDataShip[11] & '" "' & $aDataShip[12] & '" "' & $aDataShip[13] & '" "' & $aDataShip[14])

                                        Local $sOptionTruck = ('"' & $sLogin & '" "' & $s1page & '" "' & $sMittente & '" "' & $sDestinatario & '"')
                                        Run(@ScriptDir & "\SPEDIZIONIERI\TRUCKPOOLING_IT\truckpooling_web.exe " & $sOptionTruck, "", @SW_SHOWMAXIMIZED)
                                        ;----------------------------------------------------------------------------------------------------------------------
                                    Case $Qtt_Pacchi > 1 And $Qtt_Pacchi <= 3
                                        $aTruckMSHIP = _Truck_pooling_many_ship_gui($Qtt_Pacchi)
                                    Case $Qtt_Pacchi > 3 And $Qtt_Pacchi <= 8
                                        $aTruckMSHIP = _Truck_pooling_many_ship_gui($Qtt_Pacchi)
                                    Case $Qtt_Pacchi >= 9
                                        MsgBox(0, 'Info', 'Puoi fare fino a 7 spedizioni alla volta')

                                EndSelect

the  2° script 

#cs ----------------------------------------------------------------------------

    AutoIt Version: 3.3.14.2
    Author:         faustf

    Script Function: Ship_options for gestionale per ufffico NEW
    Template AutoIt script.
    maschera per aggiunta più spedizioni,in truckpooling e altri
    spedizionieri

#ce ----------------------------------------------------------------------------
#cs
    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
#ce
Global $SHIPOPTIONS_Gui_ship_many
Global $SHIPOPTIONS_Group1, $SHIPOPTIONS_Input4, $SHIPOPTIONS_Label5, $SHIPOPTIONS_Label6, $SHIPOPTIONS_Input5
Global $SHIPOPTIONS_Label7, $SHIPOPTIONS_Input6, $SHIPOPTIONS_Label8, $SHIPOPTIONS_Input7, $SHIPOPTIONS_Input1
Global $SHIPOPTIONS_Label1, $SHIPOPTIONS_Label2, $SHIPOPTIONS_Input2, $SHIPOPTIONS_Label3, $SHIPOPTIONS_Input3
Global $SHIPOPTIONS_Label4, $SHIPOPTIONS_Input8, $SHIPOPTIONS_Input16, $SHIPOPTIONS_Label16, $SHIPOPTIONS_Label17
Global $SHIPOPTIONS_Input17, $SHIPOPTIONS_Label18, $SHIPOPTIONS_Input18, $SHIPOPTIONS_Label19, $SHIPOPTIONS_Input19
Global $SHIPOPTIONS_Input21, $SHIPOPTIONS_Label21, $SHIPOPTIONS_Label22, $SHIPOPTIONS_Input22, $SHIPOPTIONS_Label23
Global $SHIPOPTIONS_Input23, $SHIPOPTIONS_Label24, $SHIPOPTIONS_Input24, $SHIPOPTIONS_Input26, $SHIPOPTIONS_Label26
Global $SHIPOPTIONS_Label27, $SHIPOPTIONS_Input27, $SHIPOPTIONS_Label28, $SHIPOPTIONS_Input28, $SHIPOPTIONS_Label29
Global $SHIPOPTIONS_Input29, $SHIPOPTIONS_Input36, $SHIPOPTIONS_Label36, $SHIPOPTIONS_Label37, $SHIPOPTIONS_Input37
Global $SHIPOPTIONS_Label38, $SHIPOPTIONS_Input38, $SHIPOPTIONS_Label39, $SHIPOPTIONS_Input39, $SHIPOPTIONS_Input41
Global $SHIPOPTIONS_Label41, $SHIPOPTIONS_Label42, $SHIPOPTIONS_Input42, $SHIPOPTIONS_Label43, $SHIPOPTIONS_Input43
Global $SHIPOPTIONS_Label44, $SHIPOPTIONS_Input44, $SHIPOPTIONS_Button3, $SHIPOPTIONS_Button4, $SHIPOPTIONS_Button5
Global $SHIPOPTIONS_Button6, $SHIPOPTIONS_Button7, $SHIPOPTIONS_Button8, $SHIPOPTIONS_Button9, $SHIPOPTIONS_Button10
Global $SHIPOPTIONS_Button11, $SHIPOPTIONS_Button12, $SHIPOPTIONS_Group2, $SHIPOPTIONS_Button1, $SHIPOPTIONS_Button2
Global $truckpooling_pack, $aTruc_KGHLP[1],$TrucControlConcludi=0
;_Truck_pooling_many_ship_gui()  ; d arimuovere quando diventa parte integrata gestionale


Func _Truck_pooling_many_ship_gui($Qtt_Pacchi)

    $SHIPOPTIONS_Gui_ship_many = GUICreate("Form1", 213, 453, 403, 219, -1, $WS_EX_TOPMOST)
    $SHIPOPTIONS_Group1 = GUICtrlCreateGroup("", 1, 82, 211, 369)
    _All_disable()
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $SHIPOPTIONS_Button3 = GUICtrlCreateButton("Concludi", 148, 426, 60, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Button4 = GUICtrlCreateButton("Time Acq.", 6, 426, 60, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Button5 = GUICtrlCreateButton("Conf.", 70, 426, 37, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Group2 = GUICtrlCreateGroup("", 1, -3, 211, 89)
    $SHIPOPTIONS_Button1 = GUICtrlCreateButton("NO", 164, 60, 43, 21)
    $SHIPOPTIONS_Button2 = GUICtrlCreateButton("SI", 5, 60, 43, 21)
    $SHIPOPTIONS_Label10 = GUICtrlCreateLabel("I colli successivi hanno", 8, 11, 137, 17)
    GUICtrlSetFont(-1, 9, 800, 0, "MS Sans Serif")
    $SHIPOPTIONS_Label11 = GUICtrlCreateLabel("Lo stesso Peso, H,L,P ??", 9, 30, 148, 17)
    GUICtrlSetFont(-1, 9, 800, 0, "MS Sans Serif")
    GUICtrlCreateGroup("", -99, -99, 1, 1)

    GUISetState(@SW_SHOW)


    $truckpooling_pack = $Qtt_Pacchi
    GUISetOnEvent($GUI_EVENT_CLOSE, "_chiudi")
    ;GUICtrlSetOnEvent($SHIPOPTIONS_Button2, "_stampe_mailing") ; si  restituisco gli stessi pesi altezza  per ogni collo e lo restituisco
    GUICtrlSetOnEvent($SHIPOPTIONS_Button1, _Enable_gui) ; no carico altri pesi e altezze per ogni collo in un array e lo  restituisco
    GUICtrlSetOnEvent($SHIPOPTIONS_Button3, _Concludi) ; no carico altri pesi e altezze per ogni collo in un array e lo  restituisco

EndFunc   ;==>_Truck_pooling_many_ship_gui




Func _Concludi()

    Select
        Case $truckpooling_pack = 2
            ReDim $aTruc_KGHLP[4]
            $aTruc_KGHLP[0] = GUICtrlRead($SHIPOPTIONS_Input4) ; Peso
            $aTruc_KGHLP[1] = GUICtrlRead($SHIPOPTIONS_Input5) ; H
            $aTruc_KGHLP[2] = GUICtrlRead($SHIPOPTIONS_Input6) ; L
            $aTruc_KGHLP[3] = GUICtrlRead($SHIPOPTIONS_Input7) ; P

            Return $aTruc_KGHLP
            ;_ArrayDisplay($aTruc_KGHLP)
        Case $truckpooling_pack = 3
            ReDim $aTruc_KGHLP[8]
            $aTruc_KGHLP[0] = GUICtrlRead($SHIPOPTIONS_Input4) ; Peso
            $aTruc_KGHLP[1] = GUICtrlRead($SHIPOPTIONS_Input5) ; H
            $aTruc_KGHLP[2] = GUICtrlRead($SHIPOPTIONS_Input6) ; L
            $aTruc_KGHLP[3] = GUICtrlRead($SHIPOPTIONS_Input7) ; P
            ;--------------------------------------------------- LINEA 2
            $aTruc_KGHLP[4] = GUICtrlRead($SHIPOPTIONS_Input1) ; Peso
            $aTruc_KGHLP[5] = GUICtrlRead($SHIPOPTIONS_Input2) ; H
            $aTruc_KGHLP[6] = GUICtrlRead($SHIPOPTIONS_Input3) ; L
            $aTruc_KGHLP[7] = GUICtrlRead($SHIPOPTIONS_Input8) ; P

            Return $aTruc_KGHLP
            ;_ArrayDisplay($aTruc_KGHLP)
        Case $truckpooling_pack = 4
            ReDim $aTruc_KGHLP[12]
            $aTruc_KGHLP[0] = GUICtrlRead($SHIPOPTIONS_Input4) ; Peso
            $aTruc_KGHLP[1] = GUICtrlRead($SHIPOPTIONS_Input5) ; H
            $aTruc_KGHLP[2] = GUICtrlRead($SHIPOPTIONS_Input6) ; L
            $aTruc_KGHLP[3] = GUICtrlRead($SHIPOPTIONS_Input7) ; P
            ;--------------------------------------------------- LINEA 2
            $aTruc_KGHLP[4] = GUICtrlRead($SHIPOPTIONS_Input1) ; Peso
            $aTruc_KGHLP[5] = GUICtrlRead($SHIPOPTIONS_Input2) ; H
            $aTruc_KGHLP[6] = GUICtrlRead($SHIPOPTIONS_Input3) ; L
            $aTruc_KGHLP[7] = GUICtrlRead($SHIPOPTIONS_Input8) ; P
            ;--------------------------------------------------- LINEA 3
            $aTruc_KGHLP[8] = GUICtrlRead($SHIPOPTIONS_Input41) ; Peso
            $aTruc_KGHLP[9] = GUICtrlRead($SHIPOPTIONS_Input42) ; H
            $aTruc_KGHLP[10] = GUICtrlRead($SHIPOPTIONS_Input43); L
            $aTruc_KGHLP[11] = GUICtrlRead($SHIPOPTIONS_Input44); P

            Return $aTruc_KGHLP
            ;_ArrayDisplay($aTruc_KGHLP)
        Case $truckpooling_pack = 5
            ReDim $aTruc_KGHLP[16]
            $aTruc_KGHLP[0] = GUICtrlRead($SHIPOPTIONS_Input4) ; Peso
            $aTruc_KGHLP[1] = GUICtrlRead($SHIPOPTIONS_Input5) ; H
            $aTruc_KGHLP[2] = GUICtrlRead($SHIPOPTIONS_Input6) ; L
            $aTruc_KGHLP[3] = GUICtrlRead($SHIPOPTIONS_Input7) ; P
            ;--------------------------------------------------- LINEA 2
            $aTruc_KGHLP[4] = GUICtrlRead($SHIPOPTIONS_Input1) ; Peso
            $aTruc_KGHLP[5] = GUICtrlRead($SHIPOPTIONS_Input2) ; H
            $aTruc_KGHLP[6] = GUICtrlRead($SHIPOPTIONS_Input3) ; L
            $aTruc_KGHLP[7] = GUICtrlRead($SHIPOPTIONS_Input8) ; P
            ;--------------------------------------------------- LINEA 3
            $aTruc_KGHLP[8] = GUICtrlRead($SHIPOPTIONS_Input41) ; Peso
            $aTruc_KGHLP[9] = GUICtrlRead($SHIPOPTIONS_Input42) ; H
            $aTruc_KGHLP[10] = GUICtrlRead($SHIPOPTIONS_Input43); L
            $aTruc_KGHLP[11] = GUICtrlRead($SHIPOPTIONS_Input44); P
            ;--------------------------------------------------- LINEA 4
            $aTruc_KGHLP[12] = GUICtrlRead($SHIPOPTIONS_Input16) ; Peso
            $aTruc_KGHLP[13] = GUICtrlRead($SHIPOPTIONS_Input17) ; H
            $aTruc_KGHLP[14] = GUICtrlRead($SHIPOPTIONS_Input18); L
            $aTruc_KGHLP[15] = GUICtrlRead($SHIPOPTIONS_Input19); P

            Return $aTruc_KGHLP
            ;_ArrayDisplay($aTruc_KGHLP)
        Case $truckpooling_pack = 6
            ReDim $aTruc_KGHLP[20]
            $aTruc_KGHLP[0] = GUICtrlRead($SHIPOPTIONS_Input4) ; Peso
            $aTruc_KGHLP[1] = GUICtrlRead($SHIPOPTIONS_Input5) ; H
            $aTruc_KGHLP[2] = GUICtrlRead($SHIPOPTIONS_Input6) ; L
            $aTruc_KGHLP[3] = GUICtrlRead($SHIPOPTIONS_Input7) ; P
            ;--------------------------------------------------- LINEA 2
            $aTruc_KGHLP[4] = GUICtrlRead($SHIPOPTIONS_Input1) ; Peso
            $aTruc_KGHLP[5] = GUICtrlRead($SHIPOPTIONS_Input2) ; H
            $aTruc_KGHLP[6] = GUICtrlRead($SHIPOPTIONS_Input3) ; L
            $aTruc_KGHLP[7] = GUICtrlRead($SHIPOPTIONS_Input8) ; P
            ;--------------------------------------------------- LINEA 3
            $aTruc_KGHLP[8] = GUICtrlRead($SHIPOPTIONS_Input41) ; Peso
            $aTruc_KGHLP[9] = GUICtrlRead($SHIPOPTIONS_Input42) ; H
            $aTruc_KGHLP[10] = GUICtrlRead($SHIPOPTIONS_Input43); L
            $aTruc_KGHLP[11] = GUICtrlRead($SHIPOPTIONS_Input44); P
            ;--------------------------------------------------- LINEA 4
            $aTruc_KGHLP[12] = GUICtrlRead($SHIPOPTIONS_Input16) ; Peso
            $aTruc_KGHLP[13] = GUICtrlRead($SHIPOPTIONS_Input17) ; H
            $aTruc_KGHLP[14] = GUICtrlRead($SHIPOPTIONS_Input18); L
            $aTruc_KGHLP[15] = GUICtrlRead($SHIPOPTIONS_Input19); P
            ;--------------------------------------------------- LINEA 5
            $aTruc_KGHLP[16] = GUICtrlRead($SHIPOPTIONS_Input21) ; Peso
            $aTruc_KGHLP[17] = GUICtrlRead($SHIPOPTIONS_Input22) ; H
            $aTruc_KGHLP[18] = GUICtrlRead($SHIPOPTIONS_Input23); L
            $aTruc_KGHLP[19] = GUICtrlRead($SHIPOPTIONS_Input24); P

            Return $aTruc_KGHLP
            ;_ArrayDisplay($aTruc_KGHLP)
        Case $truckpooling_pack = 7
            ReDim $aTruc_KGHLP[24]
            $aTruc_KGHLP[0] = GUICtrlRead($SHIPOPTIONS_Input4)   ; Peso
            $aTruc_KGHLP[1] = GUICtrlRead($SHIPOPTIONS_Input5)   ; H
            $aTruc_KGHLP[2] = GUICtrlRead($SHIPOPTIONS_Input6)   ; L
            $aTruc_KGHLP[3] = GUICtrlRead($SHIPOPTIONS_Input7)   ; P
            ;--------------------------------------------------- LINEA 2
            $aTruc_KGHLP[4] = GUICtrlRead($SHIPOPTIONS_Input1)   ; Peso
            $aTruc_KGHLP[5] = GUICtrlRead($SHIPOPTIONS_Input2)   ; H
            $aTruc_KGHLP[6] = GUICtrlRead($SHIPOPTIONS_Input3)   ; L
            $aTruc_KGHLP[7] = GUICtrlRead($SHIPOPTIONS_Input8)   ; P
            ;--------------------------------------------------- LINEA 3
            $aTruc_KGHLP[8] = GUICtrlRead($SHIPOPTIONS_Input41)  ; Peso
            $aTruc_KGHLP[9] = GUICtrlRead($SHIPOPTIONS_Input42)  ; H
            $aTruc_KGHLP[10] = GUICtrlRead($SHIPOPTIONS_Input43) ; L
            $aTruc_KGHLP[11] = GUICtrlRead($SHIPOPTIONS_Input44) ; P
            ;--------------------------------------------------- LINEA 4
            $aTruc_KGHLP[12] = GUICtrlRead($SHIPOPTIONS_Input16) ; Peso
            $aTruc_KGHLP[13] = GUICtrlRead($SHIPOPTIONS_Input17) ; H
            $aTruc_KGHLP[14] = GUICtrlRead($SHIPOPTIONS_Input18) ; L
            $aTruc_KGHLP[15] = GUICtrlRead($SHIPOPTIONS_Input19) ; P
            ;--------------------------------------------------- LINEA 5
            $aTruc_KGHLP[16] = GUICtrlRead($SHIPOPTIONS_Input21) ; Peso
            $aTruc_KGHLP[17] = GUICtrlRead($SHIPOPTIONS_Input22) ; H
            $aTruc_KGHLP[18] = GUICtrlRead($SHIPOPTIONS_Input23) ; L
            $aTruc_KGHLP[19] = GUICtrlRead($SHIPOPTIONS_Input24) ; P
            ;--------------------------------------------------- LINEA 6
            $aTruc_KGHLP[20] = GUICtrlRead($SHIPOPTIONS_Input26) ; Peso
            $aTruc_KGHLP[21] = GUICtrlRead($SHIPOPTIONS_Input27) ; H
            $aTruc_KGHLP[22] = GUICtrlRead($SHIPOPTIONS_Input28) ; L
            $aTruc_KGHLP[23] = GUICtrlRead($SHIPOPTIONS_Input29) ; P
            Return $aTruc_KGHLP
            ;_ArrayDisplay($aTruc_KGHLP)
        Case $truckpooling_pack = 8
            ReDim $aTruc_KGHLP[28]
            $aTruc_KGHLP[0] = GUICtrlRead($SHIPOPTIONS_Input4)   ; Peso
            $aTruc_KGHLP[1] = GUICtrlRead($SHIPOPTIONS_Input5)   ; H
            $aTruc_KGHLP[2] = GUICtrlRead($SHIPOPTIONS_Input6)   ; L
            $aTruc_KGHLP[3] = GUICtrlRead($SHIPOPTIONS_Input7)   ; P
            ;--------------------------------------------------- LINEA 2
            $aTruc_KGHLP[4] = GUICtrlRead($SHIPOPTIONS_Input1)   ; Peso
            $aTruc_KGHLP[5] = GUICtrlRead($SHIPOPTIONS_Input2)   ; H
            $aTruc_KGHLP[6] = GUICtrlRead($SHIPOPTIONS_Input3)   ; L
            $aTruc_KGHLP[7] = GUICtrlRead($SHIPOPTIONS_Input8)   ; P
            ;--------------------------------------------------- LINEA 3
            $aTruc_KGHLP[8] = GUICtrlRead($SHIPOPTIONS_Input41)  ; Peso
            $aTruc_KGHLP[9] = GUICtrlRead($SHIPOPTIONS_Input42)  ; H
            $aTruc_KGHLP[10] = GUICtrlRead($SHIPOPTIONS_Input43) ; L
            $aTruc_KGHLP[11] = GUICtrlRead($SHIPOPTIONS_Input44) ; P
            ;--------------------------------------------------- LINEA 4
            $aTruc_KGHLP[12] = GUICtrlRead($SHIPOPTIONS_Input16) ; Peso
            $aTruc_KGHLP[13] = GUICtrlRead($SHIPOPTIONS_Input17) ; H
            $aTruc_KGHLP[14] = GUICtrlRead($SHIPOPTIONS_Input18) ; L
            $aTruc_KGHLP[15] = GUICtrlRead($SHIPOPTIONS_Input19) ; P
            ;--------------------------------------------------- LINEA 5
            $aTruc_KGHLP[16] = GUICtrlRead($SHIPOPTIONS_Input21) ; Peso
            $aTruc_KGHLP[17] = GUICtrlRead($SHIPOPTIONS_Input22) ; H
            $aTruc_KGHLP[18] = GUICtrlRead($SHIPOPTIONS_Input23) ; L
            $aTruc_KGHLP[19] = GUICtrlRead($SHIPOPTIONS_Input24) ; P
            ;--------------------------------------------------- LINEA 6
            $aTruc_KGHLP[20] = GUICtrlRead($SHIPOPTIONS_Input26) ; Peso
            $aTruc_KGHLP[21] = GUICtrlRead($SHIPOPTIONS_Input27) ; H
            $aTruc_KGHLP[22] = GUICtrlRead($SHIPOPTIONS_Input28) ; L
            $aTruc_KGHLP[23] = GUICtrlRead($SHIPOPTIONS_Input29) ; P
            ;--------------------------------------------------- LINEA 7
            $aTruc_KGHLP[24] = GUICtrlRead($SHIPOPTIONS_Input36) ; Peso
            $aTruc_KGHLP[25] = GUICtrlRead($SHIPOPTIONS_Input37) ; H
            $aTruc_KGHLP[26] = GUICtrlRead($SHIPOPTIONS_Input38) ; L
            $aTruc_KGHLP[27] = GUICtrlRead($SHIPOPTIONS_Input39) ; P
            Return $aTruc_KGHLP
            ;_ArrayDisplay($aTruc_KGHLP)
    EndSelect
$TrucControlConcludi=1
EndFunc   ;==>_Concludi


Func _Enable_gui()
    GUICtrlSetState($SHIPOPTIONS_Button3, $GUI_ENABLE)
    GUICtrlSetState($SHIPOPTIONS_Button4, $GUI_ENABLE)
    GUICtrlSetState($SHIPOPTIONS_Button5, $GUI_ENABLE)
    Select
        Case $truckpooling_pack = 2
            _Eneble_line1()
        Case $truckpooling_pack = 3
            _Eneble_line1()
            _Eneble_line2()
        Case $truckpooling_pack = 4
            _Eneble_line1()
            _Eneble_line2()
            _Eneble_line3()
        Case $truckpooling_pack = 5
            _Eneble_line1()
            _Eneble_line2()
            _Eneble_line3()
            _Eneble_line4()
        Case $truckpooling_pack = 6
            _Eneble_line1()
            _Eneble_line2()
            _Eneble_line3()
            _Eneble_line4()
            _Eneble_line5()
        Case $truckpooling_pack = 7
            _Eneble_line1()
            _Eneble_line2()
            _Eneble_line3()
            _Eneble_line4()
            _Eneble_line5()
            _Eneble_line6()
        Case $truckpooling_pack = 8
            _Eneble_line1()
            _Eneble_line2()
            _Eneble_line3()
            _Eneble_line4()
            _Eneble_line5()
            _Eneble_line6()
            _Eneble_line7()
    EndSelect
EndFunc   ;==>_Enable_gui

Func _Eneble_line1()
    $SHIPOPTIONS_Input4 = GUICtrlCreateInput("", 6, 123, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label5 = GUICtrlCreateLabel("Peso", 7, 104, 28, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label6 = GUICtrlCreateLabel("H", 39, 104, 12, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Input5 = GUICtrlCreateInput("", 36, 123, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label7 = GUICtrlCreateLabel("L", 70, 104, 10, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Input6 = GUICtrlCreateInput("", 67, 123, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label8 = GUICtrlCreateLabel("P", 102, 104, 11, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Input7 = GUICtrlCreateInput("", 99, 123, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Button6 = GUICtrlCreateButton("Acq.", 130, 124, 37, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
EndFunc   ;==>_Eneble_line1

Func _Eneble_line2()
    $SHIPOPTIONS_Input1 = GUICtrlCreateInput("", 6, 168, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label1 = GUICtrlCreateLabel("Peso", 7, 149, 28, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label2 = GUICtrlCreateLabel("H", 39, 149, 12, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Input2 = GUICtrlCreateInput("", 36, 168, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label3 = GUICtrlCreateLabel("L", 70, 149, 10, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Input3 = GUICtrlCreateInput("", 67, 168, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label4 = GUICtrlCreateLabel("P", 102, 149, 11, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Input8 = GUICtrlCreateInput("", 99, 168, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Button7 = GUICtrlCreateButton("Acq.", 130, 168, 37, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
EndFunc   ;==>_Eneble_line2
Func _Eneble_line3()

    $SHIPOPTIONS_Input41 = GUICtrlCreateInput("", 6, 211, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label41 = GUICtrlCreateLabel("Peso", 7, 192, 28, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label42 = GUICtrlCreateLabel("H", 39, 192, 12, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Input42 = GUICtrlCreateInput("", 36, 211, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label43 = GUICtrlCreateLabel("L", 70, 192, 10, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Input43 = GUICtrlCreateInput("", 67, 211, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label44 = GUICtrlCreateLabel("P", 102, 192, 11, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Input44 = GUICtrlCreateInput("", 99, 211, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Button8 = GUICtrlCreateButton("Acq.", 130, 211, 37, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)

EndFunc   ;==>_Eneble_line3
Func _Eneble_line4()

    $SHIPOPTIONS_Input16 = GUICtrlCreateInput("", 6, 258, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label16 = GUICtrlCreateLabel("Peso", 7, 239, 28, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label17 = GUICtrlCreateLabel("H", 39, 239, 12, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Input17 = GUICtrlCreateInput("", 36, 258, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label18 = GUICtrlCreateLabel("L", 70, 239, 10, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Input18 = GUICtrlCreateInput("", 67, 258, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label19 = GUICtrlCreateLabel("P", 102, 239, 11, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Input19 = GUICtrlCreateInput("", 99, 258, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Button9 = GUICtrlCreateButton("Acq.", 131, 258, 37, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)

EndFunc   ;==>_Eneble_line4
Func _Eneble_line5()
    $SHIPOPTIONS_Input21 = GUICtrlCreateInput("", 6, 303, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label21 = GUICtrlCreateLabel("Peso", 7, 284, 28, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label22 = GUICtrlCreateLabel("H", 39, 284, 12, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Input22 = GUICtrlCreateInput("", 36, 303, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label23 = GUICtrlCreateLabel("L", 70, 284, 10, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Input23 = GUICtrlCreateInput("", 67, 303, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label24 = GUICtrlCreateLabel("P", 102, 284, 11, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Input24 = GUICtrlCreateInput("", 99, 303, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)

    $SHIPOPTIONS_Button10 = GUICtrlCreateButton("Acq.", 131, 303, 37, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)


EndFunc   ;==>_Eneble_line5
Func _Eneble_line6()
    $SHIPOPTIONS_Input26 = GUICtrlCreateInput("", 6, 347, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label26 = GUICtrlCreateLabel("Peso", 7, 328, 28, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label27 = GUICtrlCreateLabel("H", 39, 328, 12, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Input27 = GUICtrlCreateInput("", 36, 347, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label28 = GUICtrlCreateLabel("L", 70, 328, 10, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Input28 = GUICtrlCreateInput("", 67, 347, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label29 = GUICtrlCreateLabel("P", 102, 328, 11, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Input29 = GUICtrlCreateInput("", 99, 347, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Button11 = GUICtrlCreateButton("Acq.", 131, 347, 37, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)

EndFunc   ;==>_Eneble_line6
Func _Eneble_line7()
    $SHIPOPTIONS_Input36 = GUICtrlCreateInput("", 6, 393, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label36 = GUICtrlCreateLabel("Peso", 7, 374, 28, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label37 = GUICtrlCreateLabel("H", 39, 374, 12, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Input37 = GUICtrlCreateInput("", 36, 393, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label38 = GUICtrlCreateLabel("L", 70, 374, 10, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Input38 = GUICtrlCreateInput("", 67, 393, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label39 = GUICtrlCreateLabel("P", 102, 374, 11, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Input39 = GUICtrlCreateInput("", 99, 393, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Button12 = GUICtrlCreateButton("Acq.", 131, 393, 37, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)

EndFunc   ;==>_Eneble_line7






Func _All_disable()
    $SHIPOPTIONS_Input4 = GUICtrlCreateInput("", 6, 123, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label5 = GUICtrlCreateLabel("Peso", 7, 104, 28, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label6 = GUICtrlCreateLabel("H", 39, 104, 12, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Input5 = GUICtrlCreateInput("", 36, 123, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label7 = GUICtrlCreateLabel("L", 70, 104, 10, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Input6 = GUICtrlCreateInput("", 67, 123, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label8 = GUICtrlCreateLabel("P", 102, 104, 11, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Input7 = GUICtrlCreateInput("", 99, 123, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Input1 = GUICtrlCreateInput("", 6, 168, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label1 = GUICtrlCreateLabel("Peso", 7, 149, 28, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label2 = GUICtrlCreateLabel("H", 39, 149, 12, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Input2 = GUICtrlCreateInput("", 36, 168, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label3 = GUICtrlCreateLabel("L", 70, 149, 10, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Input3 = GUICtrlCreateInput("", 67, 168, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label4 = GUICtrlCreateLabel("P", 102, 149, 11, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Input8 = GUICtrlCreateInput("", 99, 168, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Input16 = GUICtrlCreateInput("", 6, 258, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label16 = GUICtrlCreateLabel("Peso", 7, 239, 28, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label17 = GUICtrlCreateLabel("H", 39, 239, 12, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Input17 = GUICtrlCreateInput("", 36, 258, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label18 = GUICtrlCreateLabel("L", 70, 239, 10, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Input18 = GUICtrlCreateInput("", 67, 258, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label19 = GUICtrlCreateLabel("P", 102, 239, 11, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Input19 = GUICtrlCreateInput("", 99, 258, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Input21 = GUICtrlCreateInput("", 6, 303, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label21 = GUICtrlCreateLabel("Peso", 7, 284, 28, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label22 = GUICtrlCreateLabel("H", 39, 284, 12, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Input22 = GUICtrlCreateInput("", 36, 303, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label23 = GUICtrlCreateLabel("L", 70, 284, 10, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Input23 = GUICtrlCreateInput("", 67, 303, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label24 = GUICtrlCreateLabel("P", 102, 284, 11, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Input24 = GUICtrlCreateInput("", 99, 303, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Input26 = GUICtrlCreateInput("", 6, 347, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label26 = GUICtrlCreateLabel("Peso", 7, 328, 28, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label27 = GUICtrlCreateLabel("H", 39, 328, 12, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Input27 = GUICtrlCreateInput("", 36, 347, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label28 = GUICtrlCreateLabel("L", 70, 328, 10, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Input28 = GUICtrlCreateInput("", 67, 347, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label29 = GUICtrlCreateLabel("P", 102, 328, 11, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Input29 = GUICtrlCreateInput("", 99, 347, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Input36 = GUICtrlCreateInput("", 6, 393, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label36 = GUICtrlCreateLabel("Peso", 7, 374, 28, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label37 = GUICtrlCreateLabel("H", 39, 374, 12, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Input37 = GUICtrlCreateInput("", 36, 393, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label38 = GUICtrlCreateLabel("L", 70, 374, 10, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Input38 = GUICtrlCreateInput("", 67, 393, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label39 = GUICtrlCreateLabel("P", 102, 374, 11, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Input39 = GUICtrlCreateInput("", 99, 393, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Input41 = GUICtrlCreateInput("", 6, 211, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label41 = GUICtrlCreateLabel("Peso", 7, 192, 28, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label42 = GUICtrlCreateLabel("H", 39, 192, 12, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Input42 = GUICtrlCreateInput("", 36, 211, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label43 = GUICtrlCreateLabel("L", 70, 192, 10, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Input43 = GUICtrlCreateInput("", 67, 211, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label44 = GUICtrlCreateLabel("P", 102, 192, 11, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Input44 = GUICtrlCreateInput("", 99, 211, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Button3 = GUICtrlCreateButton("Concludi", 148, 426, 60, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Button4 = GUICtrlCreateButton("Time Acq.", 6, 426, 60, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Button5 = GUICtrlCreateButton("Conf.", 70, 426, 37, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Button6 = GUICtrlCreateButton("Acq.", 130, 124, 37, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Button7 = GUICtrlCreateButton("Acq.", 130, 168, 37, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Button8 = GUICtrlCreateButton("Acq.", 130, 211, 37, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Button9 = GUICtrlCreateButton("Acq.", 131, 258, 37, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Button10 = GUICtrlCreateButton("Acq.", 131, 303, 37, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Button11 = GUICtrlCreateButton("Acq.", 131, 347, 37, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Button12 = GUICtrlCreateButton("Acq.", 131, 393, 37, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
EndFunc   ;==>_All_disable












Func _chiudi()
    GUIDelete($SHIPOPTIONS_Gui_ship_many)
EndFunc   ;==>_chiudi

thankz  at all

Link to comment
Share on other sites

so this  is a reduction  :)

 

1 script

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <Array.au3>

#include "SHIP_OPTIONS.au3"

Global $Form2, $Input1, $Button1


Opt("GuiOnEventMode", 1)
Opt("GUICloseOnESC", 0)
Opt("GUIResizeMode", 128)


_gui()

Func _gui()

    $Form2 = GUICreate("Form1", 413, 305, 302, 218)
    $Input1 = GUICtrlCreateInput("2", 56, 56, 121, 21)
    $Button1 = GUICtrlCreateButton("Button1", 216, 56, 75, 25)
    GUISetState(@SW_SHOW)

    GUISetOnEvent($GUI_EVENT_CLOSE, "_close")
    GUICtrlSetOnEvent($Button1, "_1")
EndFunc   ;==>_gui


Func _1()
    Local $baba = GUICtrlRead($Input1)

    Select

        Case $baba > 1 And $baba <= 3
        Local   $aTruckMSHIP = _Truck_pooling_many_ship_gui($baba)
            _ArrayDisplay($aTruckMSHIP)
        Case $baba > 3 And $baba <= 8
        Local   $aTruckMSHIP = _Truck_pooling_many_ship_gui($baba)
            _ArrayDisplay($aTruckMSHIP)
        Case $baba >= 9
            MsgBox(0, 'Info', 'Puoi fare fino a 7 spedizioni alla volta')

    EndSelect

EndFunc   ;==>_1

Func _close()

    Exit

EndFunc   ;==>_close

While 1

    Sleep(1000)

WEnd

2 script

#cs ----------------------------------------------------------------------------

    AutoIt Version: 3.3.14.2
    Author:         faustf

    Script Function: Ship_options for gestionale per ufffico NEW
    Template AutoIt script.
    maschera per aggiunta più spedizioni,in truckpooling e altri
    spedizionieri

#ce ----------------------------------------------------------------------------
#cs
    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
#ce
Global $SHIPOPTIONS_Gui_ship_many
Global $SHIPOPTIONS_Group1, $SHIPOPTIONS_Input4, $SHIPOPTIONS_Label5, $SHIPOPTIONS_Label6, $SHIPOPTIONS_Input5
Global $SHIPOPTIONS_Label7, $SHIPOPTIONS_Input6, $SHIPOPTIONS_Label8, $SHIPOPTIONS_Input7, $SHIPOPTIONS_Input1
Global $SHIPOPTIONS_Label1, $SHIPOPTIONS_Label2, $SHIPOPTIONS_Input2, $SHIPOPTIONS_Label3, $SHIPOPTIONS_Input3
Global $SHIPOPTIONS_Label4, $SHIPOPTIONS_Input8, $SHIPOPTIONS_Input16, $SHIPOPTIONS_Label16, $SHIPOPTIONS_Label17
Global $SHIPOPTIONS_Input17, $SHIPOPTIONS_Label18, $SHIPOPTIONS_Input18, $SHIPOPTIONS_Label19, $SHIPOPTIONS_Input19
Global $SHIPOPTIONS_Input21, $SHIPOPTIONS_Label21, $SHIPOPTIONS_Label22, $SHIPOPTIONS_Input22, $SHIPOPTIONS_Label23
Global $SHIPOPTIONS_Input23, $SHIPOPTIONS_Label24, $SHIPOPTIONS_Input24, $SHIPOPTIONS_Input26, $SHIPOPTIONS_Label26
Global $SHIPOPTIONS_Label27, $SHIPOPTIONS_Input27, $SHIPOPTIONS_Label28, $SHIPOPTIONS_Input28, $SHIPOPTIONS_Label29
Global $SHIPOPTIONS_Input29, $SHIPOPTIONS_Input36, $SHIPOPTIONS_Label36, $SHIPOPTIONS_Label37, $SHIPOPTIONS_Input37
Global $SHIPOPTIONS_Label38, $SHIPOPTIONS_Input38, $SHIPOPTIONS_Label39, $SHIPOPTIONS_Input39, $SHIPOPTIONS_Input41
Global $SHIPOPTIONS_Label41, $SHIPOPTIONS_Label42, $SHIPOPTIONS_Input42, $SHIPOPTIONS_Label43, $SHIPOPTIONS_Input43
Global $SHIPOPTIONS_Label44, $SHIPOPTIONS_Input44, $SHIPOPTIONS_Button3, $SHIPOPTIONS_Button4, $SHIPOPTIONS_Button5
Global $SHIPOPTIONS_Button6, $SHIPOPTIONS_Button7, $SHIPOPTIONS_Button8, $SHIPOPTIONS_Button9, $SHIPOPTIONS_Button10
Global $SHIPOPTIONS_Button11, $SHIPOPTIONS_Button12, $SHIPOPTIONS_Group2, $SHIPOPTIONS_Button1, $SHIPOPTIONS_Button2
Global $truckpooling_pack, $aTruc_KGHLP[1],$TrucControlConcludi=0
;_Truck_pooling_many_ship_gui()  ; d arimuovere quando diventa parte integrata gestionale


Func _Truck_pooling_many_ship_gui($Qtt_Pacchi)

    $SHIPOPTIONS_Gui_ship_many = GUICreate("Form1", 213, 453, 403, 219, -1, $WS_EX_TOPMOST)
    $SHIPOPTIONS_Group1 = GUICtrlCreateGroup("", 1, 82, 211, 369)
    _All_disable()
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $SHIPOPTIONS_Button3 = GUICtrlCreateButton("Concludi", 148, 426, 60, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Button4 = GUICtrlCreateButton("Time Acq.", 6, 426, 60, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Button5 = GUICtrlCreateButton("Conf.", 70, 426, 37, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Group2 = GUICtrlCreateGroup("", 1, -3, 211, 89)
    $SHIPOPTIONS_Button1 = GUICtrlCreateButton("NO", 164, 60, 43, 21)
    $SHIPOPTIONS_Button2 = GUICtrlCreateButton("SI", 5, 60, 43, 21)
    $SHIPOPTIONS_Label10 = GUICtrlCreateLabel("I colli successivi hanno", 8, 11, 137, 17)
    GUICtrlSetFont(-1, 9, 800, 0, "MS Sans Serif")
    $SHIPOPTIONS_Label11 = GUICtrlCreateLabel("Lo stesso Peso, H,L,P ??", 9, 30, 148, 17)
    GUICtrlSetFont(-1, 9, 800, 0, "MS Sans Serif")
    GUICtrlCreateGroup("", -99, -99, 1, 1)

    GUISetState(@SW_SHOW)


    $truckpooling_pack = $Qtt_Pacchi
    GUISetOnEvent($GUI_EVENT_CLOSE, "_chiudi")
    ;GUICtrlSetOnEvent($SHIPOPTIONS_Button2, "_stampe_mailing") ; si  restituisco gli stessi pesi altezza  per ogni collo e lo restituisco
    GUICtrlSetOnEvent($SHIPOPTIONS_Button1, _Enable_gui) ; no carico altri pesi e altezze per ogni collo in un array e lo  restituisco
    GUICtrlSetOnEvent($SHIPOPTIONS_Button3, _Concludi) ; no carico altri pesi e altezze per ogni collo in un array e lo  restituisco

EndFunc   ;==>_Truck_pooling_many_ship_gui




Func _Concludi()

    Select
        Case $truckpooling_pack = 2
            ReDim $aTruc_KGHLP[4]
            $aTruc_KGHLP[0] = GUICtrlRead($SHIPOPTIONS_Input4) ; Peso
            $aTruc_KGHLP[1] = GUICtrlRead($SHIPOPTIONS_Input5) ; H
            $aTruc_KGHLP[2] = GUICtrlRead($SHIPOPTIONS_Input6) ; L
            $aTruc_KGHLP[3] = GUICtrlRead($SHIPOPTIONS_Input7) ; P

            Return $aTruc_KGHLP
            ;_ArrayDisplay($aTruc_KGHLP)
        Case $truckpooling_pack = 3
            ReDim $aTruc_KGHLP[8]
            $aTruc_KGHLP[0] = GUICtrlRead($SHIPOPTIONS_Input4) ; Peso
            $aTruc_KGHLP[1] = GUICtrlRead($SHIPOPTIONS_Input5) ; H
            $aTruc_KGHLP[2] = GUICtrlRead($SHIPOPTIONS_Input6) ; L
            $aTruc_KGHLP[3] = GUICtrlRead($SHIPOPTIONS_Input7) ; P
            ;--------------------------------------------------- LINEA 2
            $aTruc_KGHLP[4] = GUICtrlRead($SHIPOPTIONS_Input1) ; Peso
            $aTruc_KGHLP[5] = GUICtrlRead($SHIPOPTIONS_Input2) ; H
            $aTruc_KGHLP[6] = GUICtrlRead($SHIPOPTIONS_Input3) ; L
            $aTruc_KGHLP[7] = GUICtrlRead($SHIPOPTIONS_Input8) ; P

            Return $aTruc_KGHLP
            ;_ArrayDisplay($aTruc_KGHLP)
        Case $truckpooling_pack = 4
            ReDim $aTruc_KGHLP[12]
            $aTruc_KGHLP[0] = GUICtrlRead($SHIPOPTIONS_Input4) ; Peso
            $aTruc_KGHLP[1] = GUICtrlRead($SHIPOPTIONS_Input5) ; H
            $aTruc_KGHLP[2] = GUICtrlRead($SHIPOPTIONS_Input6) ; L
            $aTruc_KGHLP[3] = GUICtrlRead($SHIPOPTIONS_Input7) ; P
            ;--------------------------------------------------- LINEA 2
            $aTruc_KGHLP[4] = GUICtrlRead($SHIPOPTIONS_Input1) ; Peso
            $aTruc_KGHLP[5] = GUICtrlRead($SHIPOPTIONS_Input2) ; H
            $aTruc_KGHLP[6] = GUICtrlRead($SHIPOPTIONS_Input3) ; L
            $aTruc_KGHLP[7] = GUICtrlRead($SHIPOPTIONS_Input8) ; P
            ;--------------------------------------------------- LINEA 3
            $aTruc_KGHLP[8] = GUICtrlRead($SHIPOPTIONS_Input41) ; Peso
            $aTruc_KGHLP[9] = GUICtrlRead($SHIPOPTIONS_Input42) ; H
            $aTruc_KGHLP[10] = GUICtrlRead($SHIPOPTIONS_Input43); L
            $aTruc_KGHLP[11] = GUICtrlRead($SHIPOPTIONS_Input44); P

            Return $aTruc_KGHLP
            ;_ArrayDisplay($aTruc_KGHLP)
        Case $truckpooling_pack = 5
            ReDim $aTruc_KGHLP[16]
            $aTruc_KGHLP[0] = GUICtrlRead($SHIPOPTIONS_Input4) ; Peso
            $aTruc_KGHLP[1] = GUICtrlRead($SHIPOPTIONS_Input5) ; H
            $aTruc_KGHLP[2] = GUICtrlRead($SHIPOPTIONS_Input6) ; L
            $aTruc_KGHLP[3] = GUICtrlRead($SHIPOPTIONS_Input7) ; P
            ;--------------------------------------------------- LINEA 2
            $aTruc_KGHLP[4] = GUICtrlRead($SHIPOPTIONS_Input1) ; Peso
            $aTruc_KGHLP[5] = GUICtrlRead($SHIPOPTIONS_Input2) ; H
            $aTruc_KGHLP[6] = GUICtrlRead($SHIPOPTIONS_Input3) ; L
            $aTruc_KGHLP[7] = GUICtrlRead($SHIPOPTIONS_Input8) ; P
            ;--------------------------------------------------- LINEA 3
            $aTruc_KGHLP[8] = GUICtrlRead($SHIPOPTIONS_Input41) ; Peso
            $aTruc_KGHLP[9] = GUICtrlRead($SHIPOPTIONS_Input42) ; H
            $aTruc_KGHLP[10] = GUICtrlRead($SHIPOPTIONS_Input43); L
            $aTruc_KGHLP[11] = GUICtrlRead($SHIPOPTIONS_Input44); P
            ;--------------------------------------------------- LINEA 4
            $aTruc_KGHLP[12] = GUICtrlRead($SHIPOPTIONS_Input16) ; Peso
            $aTruc_KGHLP[13] = GUICtrlRead($SHIPOPTIONS_Input17) ; H
            $aTruc_KGHLP[14] = GUICtrlRead($SHIPOPTIONS_Input18); L
            $aTruc_KGHLP[15] = GUICtrlRead($SHIPOPTIONS_Input19); P

            Return $aTruc_KGHLP
            ;_ArrayDisplay($aTruc_KGHLP)
        Case $truckpooling_pack = 6
            ReDim $aTruc_KGHLP[20]
            $aTruc_KGHLP[0] = GUICtrlRead($SHIPOPTIONS_Input4) ; Peso
            $aTruc_KGHLP[1] = GUICtrlRead($SHIPOPTIONS_Input5) ; H
            $aTruc_KGHLP[2] = GUICtrlRead($SHIPOPTIONS_Input6) ; L
            $aTruc_KGHLP[3] = GUICtrlRead($SHIPOPTIONS_Input7) ; P
            ;--------------------------------------------------- LINEA 2
            $aTruc_KGHLP[4] = GUICtrlRead($SHIPOPTIONS_Input1) ; Peso
            $aTruc_KGHLP[5] = GUICtrlRead($SHIPOPTIONS_Input2) ; H
            $aTruc_KGHLP[6] = GUICtrlRead($SHIPOPTIONS_Input3) ; L
            $aTruc_KGHLP[7] = GUICtrlRead($SHIPOPTIONS_Input8) ; P
            ;--------------------------------------------------- LINEA 3
            $aTruc_KGHLP[8] = GUICtrlRead($SHIPOPTIONS_Input41) ; Peso
            $aTruc_KGHLP[9] = GUICtrlRead($SHIPOPTIONS_Input42) ; H
            $aTruc_KGHLP[10] = GUICtrlRead($SHIPOPTIONS_Input43); L
            $aTruc_KGHLP[11] = GUICtrlRead($SHIPOPTIONS_Input44); P
            ;--------------------------------------------------- LINEA 4
            $aTruc_KGHLP[12] = GUICtrlRead($SHIPOPTIONS_Input16) ; Peso
            $aTruc_KGHLP[13] = GUICtrlRead($SHIPOPTIONS_Input17) ; H
            $aTruc_KGHLP[14] = GUICtrlRead($SHIPOPTIONS_Input18); L
            $aTruc_KGHLP[15] = GUICtrlRead($SHIPOPTIONS_Input19); P
            ;--------------------------------------------------- LINEA 5
            $aTruc_KGHLP[16] = GUICtrlRead($SHIPOPTIONS_Input21) ; Peso
            $aTruc_KGHLP[17] = GUICtrlRead($SHIPOPTIONS_Input22) ; H
            $aTruc_KGHLP[18] = GUICtrlRead($SHIPOPTIONS_Input23); L
            $aTruc_KGHLP[19] = GUICtrlRead($SHIPOPTIONS_Input24); P

            Return $aTruc_KGHLP
            ;_ArrayDisplay($aTruc_KGHLP)
        Case $truckpooling_pack = 7
            ReDim $aTruc_KGHLP[24]
            $aTruc_KGHLP[0] = GUICtrlRead($SHIPOPTIONS_Input4)   ; Peso
            $aTruc_KGHLP[1] = GUICtrlRead($SHIPOPTIONS_Input5)   ; H
            $aTruc_KGHLP[2] = GUICtrlRead($SHIPOPTIONS_Input6)   ; L
            $aTruc_KGHLP[3] = GUICtrlRead($SHIPOPTIONS_Input7)   ; P
            ;--------------------------------------------------- LINEA 2
            $aTruc_KGHLP[4] = GUICtrlRead($SHIPOPTIONS_Input1)   ; Peso
            $aTruc_KGHLP[5] = GUICtrlRead($SHIPOPTIONS_Input2)   ; H
            $aTruc_KGHLP[6] = GUICtrlRead($SHIPOPTIONS_Input3)   ; L
            $aTruc_KGHLP[7] = GUICtrlRead($SHIPOPTIONS_Input8)   ; P
            ;--------------------------------------------------- LINEA 3
            $aTruc_KGHLP[8] = GUICtrlRead($SHIPOPTIONS_Input41)  ; Peso
            $aTruc_KGHLP[9] = GUICtrlRead($SHIPOPTIONS_Input42)  ; H
            $aTruc_KGHLP[10] = GUICtrlRead($SHIPOPTIONS_Input43) ; L
            $aTruc_KGHLP[11] = GUICtrlRead($SHIPOPTIONS_Input44) ; P
            ;--------------------------------------------------- LINEA 4
            $aTruc_KGHLP[12] = GUICtrlRead($SHIPOPTIONS_Input16) ; Peso
            $aTruc_KGHLP[13] = GUICtrlRead($SHIPOPTIONS_Input17) ; H
            $aTruc_KGHLP[14] = GUICtrlRead($SHIPOPTIONS_Input18) ; L
            $aTruc_KGHLP[15] = GUICtrlRead($SHIPOPTIONS_Input19) ; P
            ;--------------------------------------------------- LINEA 5
            $aTruc_KGHLP[16] = GUICtrlRead($SHIPOPTIONS_Input21) ; Peso
            $aTruc_KGHLP[17] = GUICtrlRead($SHIPOPTIONS_Input22) ; H
            $aTruc_KGHLP[18] = GUICtrlRead($SHIPOPTIONS_Input23) ; L
            $aTruc_KGHLP[19] = GUICtrlRead($SHIPOPTIONS_Input24) ; P
            ;--------------------------------------------------- LINEA 6
            $aTruc_KGHLP[20] = GUICtrlRead($SHIPOPTIONS_Input26) ; Peso
            $aTruc_KGHLP[21] = GUICtrlRead($SHIPOPTIONS_Input27) ; H
            $aTruc_KGHLP[22] = GUICtrlRead($SHIPOPTIONS_Input28) ; L
            $aTruc_KGHLP[23] = GUICtrlRead($SHIPOPTIONS_Input29) ; P
            Return $aTruc_KGHLP
            ;_ArrayDisplay($aTruc_KGHLP)
        Case $truckpooling_pack = 8
            ReDim $aTruc_KGHLP[28]
            $aTruc_KGHLP[0] = GUICtrlRead($SHIPOPTIONS_Input4)   ; Peso
            $aTruc_KGHLP[1] = GUICtrlRead($SHIPOPTIONS_Input5)   ; H
            $aTruc_KGHLP[2] = GUICtrlRead($SHIPOPTIONS_Input6)   ; L
            $aTruc_KGHLP[3] = GUICtrlRead($SHIPOPTIONS_Input7)   ; P
            ;--------------------------------------------------- LINEA 2
            $aTruc_KGHLP[4] = GUICtrlRead($SHIPOPTIONS_Input1)   ; Peso
            $aTruc_KGHLP[5] = GUICtrlRead($SHIPOPTIONS_Input2)   ; H
            $aTruc_KGHLP[6] = GUICtrlRead($SHIPOPTIONS_Input3)   ; L
            $aTruc_KGHLP[7] = GUICtrlRead($SHIPOPTIONS_Input8)   ; P
            ;--------------------------------------------------- LINEA 3
            $aTruc_KGHLP[8] = GUICtrlRead($SHIPOPTIONS_Input41)  ; Peso
            $aTruc_KGHLP[9] = GUICtrlRead($SHIPOPTIONS_Input42)  ; H
            $aTruc_KGHLP[10] = GUICtrlRead($SHIPOPTIONS_Input43) ; L
            $aTruc_KGHLP[11] = GUICtrlRead($SHIPOPTIONS_Input44) ; P
            ;--------------------------------------------------- LINEA 4
            $aTruc_KGHLP[12] = GUICtrlRead($SHIPOPTIONS_Input16) ; Peso
            $aTruc_KGHLP[13] = GUICtrlRead($SHIPOPTIONS_Input17) ; H
            $aTruc_KGHLP[14] = GUICtrlRead($SHIPOPTIONS_Input18) ; L
            $aTruc_KGHLP[15] = GUICtrlRead($SHIPOPTIONS_Input19) ; P
            ;--------------------------------------------------- LINEA 5
            $aTruc_KGHLP[16] = GUICtrlRead($SHIPOPTIONS_Input21) ; Peso
            $aTruc_KGHLP[17] = GUICtrlRead($SHIPOPTIONS_Input22) ; H
            $aTruc_KGHLP[18] = GUICtrlRead($SHIPOPTIONS_Input23) ; L
            $aTruc_KGHLP[19] = GUICtrlRead($SHIPOPTIONS_Input24) ; P
            ;--------------------------------------------------- LINEA 6
            $aTruc_KGHLP[20] = GUICtrlRead($SHIPOPTIONS_Input26) ; Peso
            $aTruc_KGHLP[21] = GUICtrlRead($SHIPOPTIONS_Input27) ; H
            $aTruc_KGHLP[22] = GUICtrlRead($SHIPOPTIONS_Input28) ; L
            $aTruc_KGHLP[23] = GUICtrlRead($SHIPOPTIONS_Input29) ; P
            ;--------------------------------------------------- LINEA 7
            $aTruc_KGHLP[24] = GUICtrlRead($SHIPOPTIONS_Input36) ; Peso
            $aTruc_KGHLP[25] = GUICtrlRead($SHIPOPTIONS_Input37) ; H
            $aTruc_KGHLP[26] = GUICtrlRead($SHIPOPTIONS_Input38) ; L
            $aTruc_KGHLP[27] = GUICtrlRead($SHIPOPTIONS_Input39) ; P
            Return $aTruc_KGHLP
            ;_ArrayDisplay($aTruc_KGHLP)
    EndSelect
$TrucControlConcludi=1
EndFunc   ;==>_Concludi


Func _Enable_gui()
    GUICtrlSetState($SHIPOPTIONS_Button3, $GUI_ENABLE)
    GUICtrlSetState($SHIPOPTIONS_Button4, $GUI_ENABLE)
    GUICtrlSetState($SHIPOPTIONS_Button5, $GUI_ENABLE)
    Select
        Case $truckpooling_pack = 2
            _Eneble_line1()
        Case $truckpooling_pack = 3
            _Eneble_line1()
            _Eneble_line2()
        Case $truckpooling_pack = 4
            _Eneble_line1()
            _Eneble_line2()
            _Eneble_line3()
        Case $truckpooling_pack = 5
            _Eneble_line1()
            _Eneble_line2()
            _Eneble_line3()
            _Eneble_line4()
        Case $truckpooling_pack = 6
            _Eneble_line1()
            _Eneble_line2()
            _Eneble_line3()
            _Eneble_line4()
            _Eneble_line5()
        Case $truckpooling_pack = 7
            _Eneble_line1()
            _Eneble_line2()
            _Eneble_line3()
            _Eneble_line4()
            _Eneble_line5()
            _Eneble_line6()
        Case $truckpooling_pack = 8
            _Eneble_line1()
            _Eneble_line2()
            _Eneble_line3()
            _Eneble_line4()
            _Eneble_line5()
            _Eneble_line6()
            _Eneble_line7()
    EndSelect
EndFunc   ;==>_Enable_gui

Func _Eneble_line1()
    $SHIPOPTIONS_Input4 = GUICtrlCreateInput("", 6, 123, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label5 = GUICtrlCreateLabel("Peso", 7, 104, 28, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label6 = GUICtrlCreateLabel("H", 39, 104, 12, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Input5 = GUICtrlCreateInput("", 36, 123, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label7 = GUICtrlCreateLabel("L", 70, 104, 10, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Input6 = GUICtrlCreateInput("", 67, 123, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label8 = GUICtrlCreateLabel("P", 102, 104, 11, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Input7 = GUICtrlCreateInput("", 99, 123, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Button6 = GUICtrlCreateButton("Acq.", 130, 124, 37, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
EndFunc   ;==>_Eneble_line1

Func _Eneble_line2()
    $SHIPOPTIONS_Input1 = GUICtrlCreateInput("", 6, 168, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label1 = GUICtrlCreateLabel("Peso", 7, 149, 28, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label2 = GUICtrlCreateLabel("H", 39, 149, 12, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Input2 = GUICtrlCreateInput("", 36, 168, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label3 = GUICtrlCreateLabel("L", 70, 149, 10, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Input3 = GUICtrlCreateInput("", 67, 168, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label4 = GUICtrlCreateLabel("P", 102, 149, 11, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Input8 = GUICtrlCreateInput("", 99, 168, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Button7 = GUICtrlCreateButton("Acq.", 130, 168, 37, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
EndFunc   ;==>_Eneble_line2
Func _Eneble_line3()

    $SHIPOPTIONS_Input41 = GUICtrlCreateInput("", 6, 211, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label41 = GUICtrlCreateLabel("Peso", 7, 192, 28, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label42 = GUICtrlCreateLabel("H", 39, 192, 12, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Input42 = GUICtrlCreateInput("", 36, 211, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label43 = GUICtrlCreateLabel("L", 70, 192, 10, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Input43 = GUICtrlCreateInput("", 67, 211, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label44 = GUICtrlCreateLabel("P", 102, 192, 11, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Input44 = GUICtrlCreateInput("", 99, 211, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Button8 = GUICtrlCreateButton("Acq.", 130, 211, 37, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)

EndFunc   ;==>_Eneble_line3
Func _Eneble_line4()

    $SHIPOPTIONS_Input16 = GUICtrlCreateInput("", 6, 258, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label16 = GUICtrlCreateLabel("Peso", 7, 239, 28, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label17 = GUICtrlCreateLabel("H", 39, 239, 12, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Input17 = GUICtrlCreateInput("", 36, 258, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label18 = GUICtrlCreateLabel("L", 70, 239, 10, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Input18 = GUICtrlCreateInput("", 67, 258, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label19 = GUICtrlCreateLabel("P", 102, 239, 11, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Input19 = GUICtrlCreateInput("", 99, 258, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Button9 = GUICtrlCreateButton("Acq.", 131, 258, 37, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)

EndFunc   ;==>_Eneble_line4
Func _Eneble_line5()
    $SHIPOPTIONS_Input21 = GUICtrlCreateInput("", 6, 303, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label21 = GUICtrlCreateLabel("Peso", 7, 284, 28, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label22 = GUICtrlCreateLabel("H", 39, 284, 12, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Input22 = GUICtrlCreateInput("", 36, 303, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label23 = GUICtrlCreateLabel("L", 70, 284, 10, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Input23 = GUICtrlCreateInput("", 67, 303, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label24 = GUICtrlCreateLabel("P", 102, 284, 11, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Input24 = GUICtrlCreateInput("", 99, 303, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)

    $SHIPOPTIONS_Button10 = GUICtrlCreateButton("Acq.", 131, 303, 37, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)


EndFunc   ;==>_Eneble_line5
Func _Eneble_line6()
    $SHIPOPTIONS_Input26 = GUICtrlCreateInput("", 6, 347, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label26 = GUICtrlCreateLabel("Peso", 7, 328, 28, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label27 = GUICtrlCreateLabel("H", 39, 328, 12, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Input27 = GUICtrlCreateInput("", 36, 347, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label28 = GUICtrlCreateLabel("L", 70, 328, 10, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Input28 = GUICtrlCreateInput("", 67, 347, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label29 = GUICtrlCreateLabel("P", 102, 328, 11, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Input29 = GUICtrlCreateInput("", 99, 347, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Button11 = GUICtrlCreateButton("Acq.", 131, 347, 37, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)

EndFunc   ;==>_Eneble_line6
Func _Eneble_line7()
    $SHIPOPTIONS_Input36 = GUICtrlCreateInput("", 6, 393, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label36 = GUICtrlCreateLabel("Peso", 7, 374, 28, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label37 = GUICtrlCreateLabel("H", 39, 374, 12, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Input37 = GUICtrlCreateInput("", 36, 393, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label38 = GUICtrlCreateLabel("L", 70, 374, 10, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Input38 = GUICtrlCreateInput("", 67, 393, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Label39 = GUICtrlCreateLabel("P", 102, 374, 11, 17)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Input39 = GUICtrlCreateInput("", 99, 393, 25, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)
    $SHIPOPTIONS_Button12 = GUICtrlCreateButton("Acq.", 131, 393, 37, 21)
    GUICtrlSetState(-1, $GUI_ENABLE)

EndFunc   ;==>_Eneble_line7






Func _All_disable()
    $SHIPOPTIONS_Input4 = GUICtrlCreateInput("", 6, 123, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label5 = GUICtrlCreateLabel("Peso", 7, 104, 28, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label6 = GUICtrlCreateLabel("H", 39, 104, 12, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Input5 = GUICtrlCreateInput("", 36, 123, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label7 = GUICtrlCreateLabel("L", 70, 104, 10, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Input6 = GUICtrlCreateInput("", 67, 123, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label8 = GUICtrlCreateLabel("P", 102, 104, 11, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Input7 = GUICtrlCreateInput("", 99, 123, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Input1 = GUICtrlCreateInput("", 6, 168, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label1 = GUICtrlCreateLabel("Peso", 7, 149, 28, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label2 = GUICtrlCreateLabel("H", 39, 149, 12, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Input2 = GUICtrlCreateInput("", 36, 168, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label3 = GUICtrlCreateLabel("L", 70, 149, 10, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Input3 = GUICtrlCreateInput("", 67, 168, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label4 = GUICtrlCreateLabel("P", 102, 149, 11, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Input8 = GUICtrlCreateInput("", 99, 168, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Input16 = GUICtrlCreateInput("", 6, 258, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label16 = GUICtrlCreateLabel("Peso", 7, 239, 28, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label17 = GUICtrlCreateLabel("H", 39, 239, 12, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Input17 = GUICtrlCreateInput("", 36, 258, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label18 = GUICtrlCreateLabel("L", 70, 239, 10, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Input18 = GUICtrlCreateInput("", 67, 258, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label19 = GUICtrlCreateLabel("P", 102, 239, 11, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Input19 = GUICtrlCreateInput("", 99, 258, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Input21 = GUICtrlCreateInput("", 6, 303, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label21 = GUICtrlCreateLabel("Peso", 7, 284, 28, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label22 = GUICtrlCreateLabel("H", 39, 284, 12, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Input22 = GUICtrlCreateInput("", 36, 303, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label23 = GUICtrlCreateLabel("L", 70, 284, 10, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Input23 = GUICtrlCreateInput("", 67, 303, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label24 = GUICtrlCreateLabel("P", 102, 284, 11, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Input24 = GUICtrlCreateInput("", 99, 303, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Input26 = GUICtrlCreateInput("", 6, 347, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label26 = GUICtrlCreateLabel("Peso", 7, 328, 28, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label27 = GUICtrlCreateLabel("H", 39, 328, 12, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Input27 = GUICtrlCreateInput("", 36, 347, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label28 = GUICtrlCreateLabel("L", 70, 328, 10, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Input28 = GUICtrlCreateInput("", 67, 347, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label29 = GUICtrlCreateLabel("P", 102, 328, 11, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Input29 = GUICtrlCreateInput("", 99, 347, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Input36 = GUICtrlCreateInput("", 6, 393, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label36 = GUICtrlCreateLabel("Peso", 7, 374, 28, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label37 = GUICtrlCreateLabel("H", 39, 374, 12, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Input37 = GUICtrlCreateInput("", 36, 393, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label38 = GUICtrlCreateLabel("L", 70, 374, 10, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Input38 = GUICtrlCreateInput("", 67, 393, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label39 = GUICtrlCreateLabel("P", 102, 374, 11, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Input39 = GUICtrlCreateInput("", 99, 393, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Input41 = GUICtrlCreateInput("", 6, 211, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label41 = GUICtrlCreateLabel("Peso", 7, 192, 28, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label42 = GUICtrlCreateLabel("H", 39, 192, 12, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Input42 = GUICtrlCreateInput("", 36, 211, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label43 = GUICtrlCreateLabel("L", 70, 192, 10, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Input43 = GUICtrlCreateInput("", 67, 211, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Label44 = GUICtrlCreateLabel("P", 102, 192, 11, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Input44 = GUICtrlCreateInput("", 99, 211, 25, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Button3 = GUICtrlCreateButton("Concludi", 148, 426, 60, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Button4 = GUICtrlCreateButton("Time Acq.", 6, 426, 60, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Button5 = GUICtrlCreateButton("Conf.", 70, 426, 37, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Button6 = GUICtrlCreateButton("Acq.", 130, 124, 37, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Button7 = GUICtrlCreateButton("Acq.", 130, 168, 37, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Button8 = GUICtrlCreateButton("Acq.", 130, 211, 37, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Button9 = GUICtrlCreateButton("Acq.", 131, 258, 37, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Button10 = GUICtrlCreateButton("Acq.", 131, 303, 37, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Button11 = GUICtrlCreateButton("Acq.", 131, 347, 37, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $SHIPOPTIONS_Button12 = GUICtrlCreateButton("Acq.", 131, 393, 37, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
EndFunc   ;==>_All_disable


Func _chiudi()
    GUIDelete($SHIPOPTIONS_Gui_ship_many)
EndFunc   ;==>_chiudi

thankz again  :)

 

Link to comment
Share on other sites

  • Moderators

faustf,

What an awful mess that was. Here is a tidied up version which I think does what you want - the array $aTruckMSHIP is filled when you press the "Concludi" button and as it is a Global variable it is ready to read when you require:

;#AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w- 4 -w 5 -w 6 -w- 7

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <Array.au3>
#include <StaticConstants.au3>

Opt("GuiOnEventMode", 1)
Opt("GUICloseOnESC", 0)
Opt("GUIResizeMode", 128)

; Start of include ############################################

Global $Form2, $Input1, $Button1

Global $aInputs[8][5], $aLabels[8][5], $aButtons[8], $aShipOptionsButtons[6]

Global $SHIPOPTIONS_Gui_ship_many, $aTruckMSHIP
Global $SHIPOPTIONS_Button1, $SHIPOPTIONS_Button2
Global $truckpooling_pack, $TrucControlConcludi = 0

Func _Truck_pooling_many_ship_gui($Qtt_Pacchi)

    $SHIPOPTIONS_Gui_ship_many = GUICreate("Form2", 213, 453, 403, 219, -1, $WS_EX_TOPMOST)
    GUISetOnEvent($GUI_EVENT_CLOSE, "_chiudi")

    GUICtrlCreateGroup("", 1, 82, 211, 369)
    _All_disable()
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $aShipOptionsButtons[3] = GUICtrlCreateButton("Concludi", 148, 426, 60, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $aShipOptionsButtons[4] = GUICtrlCreateButton("Time Acq.", 6, 426, 60, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $aShipOptionsButtons[5] = GUICtrlCreateButton("Conf.", 70, 426, 37, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    GUICtrlCreateGroup("", 1, -3, 211, 89)
    $aShipOptionsButtons[1] = GUICtrlCreateButton("NO", 164, 60, 43, 21)
    $aShipOptionsButtons[2] = GUICtrlCreateButton("SI", 5, 60, 43, 21)
    GUICtrlCreateLabel("I colli successivi hanno", 8, 11, 137, 17)
    GUICtrlSetFont(-1, 9, 800, 0, "MS Sans Serif")
    GUICtrlCreateLabel("Lo stesso Peso, H,L,P ??", 9, 30, 148, 17)
    GUICtrlSetFont(-1, 9, 800, 0, "MS Sans Serif")
    GUICtrlCreateGroup("", -99, -99, 1, 1)

    GUISetState(@SW_SHOW)

    $truckpooling_pack = $Qtt_Pacchi

    ;GUICtrlSetOnEvent($SHIPOPTIONS_Button2, "_stampe_mailing") ; si  restituisco gli stessi pesi altezza  per ogni collo e lo restituisco
    GUICtrlSetOnEvent($aShipOptionsButtons[1], _Enable_gui) ; no carico altri pesi e altezze per ogni collo in un array e lo  restituisco
    GUICtrlSetOnEvent($aShipOptionsButtons[3], _Concludi) ; no carico altri pesi e altezze per ogni collo in un array e lo  restituisco

EndFunc   ;==>_Truck_pooling_many_ship_gui

Func _Concludi()

    ConsoleWrite("Hit" & @CRLF)


    Global $aTruckMSHIP[4 * ($truckpooling_pack - 1)]

    For $i = 1 To $truckpooling_pack - 1
        For $j = 1 To 4
            $aTruckMSHIP[(($i - 1) * 4) + ($j - 1)] = GUICtrlRead($aInputs[$i][$j])
        Next
    Next

    $TrucControlConcludi = 1

    _ArrayDisplay($aTruckMSHIP, "Filled array", Default, 8)

EndFunc   ;==>_Concludi

Func _Enable_gui()
    GUICtrlSetState($aShipOptionsButtons[3], $GUI_ENABLE)
    GUICtrlSetState($aShipOptionsButtons[4], $GUI_ENABLE)
    GUICtrlSetState($aShipOptionsButtons[5], $GUI_ENABLE)
    _Enable_Lines($truckpooling_pack - 1)
EndFunc   ;==>_Enable_gui

Func _Enable_Lines($iCount)
    For $i = 1 To $iCount
        For $j = 1 To 4
            GUICtrlSetState($aInputs[$i][$j], $GUI_ENABLE)
            GUICtrlSetState($aLabels[$i][$j], $GUI_ENABLE)
        Next
        GUICtrlSetState($aButtons[$i], $GUI_ENABLE)
    Next
EndFunc   ;==>_Enable_Lines

Func _All_disable()

    Local $aLabelTitles[5] = ["", "Peso", "H", "L", "P"]

    Local $iY = 123 - 45
    For $i = 1 To 7
        Local $iX = -24
        For $j = 1 To 4
            $aInputs[$i][$j] = GUICtrlCreateInput("", $iX + (30 * $j), $iY + (45 * $i), 25, 21)
            GUICtrlSetState(-1, $GUI_DISABLE)
            $aLabels[$i][$j] = GUICtrlCreateLabel($aLabelTitles[$j], $iX + (30 * $j), $iY - 20 + (45 * $i), 28, 17)
            GUICtrlSetState(-1, $GUI_DISABLE)
        Next
        $aButtons[$i] = GUICtrlCreateButton("Acq.", 130, $iY + (45 * $i), 37, 21)
        GUICtrlSetState(-1, $GUI_DISABLE)
    Next

    $aShipOptionsButtons[3] = GUICtrlCreateButton("Concludi", 148, 426, 60, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $aShipOptionsButtons[4] = GUICtrlCreateButton("Time Acq.", 6, 426, 60, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $aShipOptionsButtons[5] = GUICtrlCreateButton("Conf.", 70, 426, 37, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)

EndFunc   ;==>_All_disable


Func _chiudi()
    GUIDelete($SHIPOPTIONS_Gui_ship_many)
EndFunc   ;==>_chiudi

; End of include ############################################

_gui()

Func _gui()

    $Form2 = GUICreate("Form1", 413, 305, 302, 218)
    GUISetOnEvent($GUI_EVENT_CLOSE, "_close")

    $Input1 = GUICtrlCreateInput("2", 56, 56, 121, 21)
    $Button1 = GUICtrlCreateButton("Button1", 216, 56, 75, 25)
    GUICtrlSetOnEvent($Button1, "_1")

    GUISetState(@SW_SHOW)

EndFunc   ;==>_gui

Func _1()

Local $baba = GUICtrlRead($Input1)
    Switch $baba
        Case 1 To 8
            _Truck_pooling_many_ship_gui($baba)
        Case Else
            MsgBox(0, 'Info', 'Puoi fare fino a 7 spedizioni alla volta')
    EndSwitch

EndFunc   ;==>_1

Func _close()
    Exit
EndFunc   ;==>_close

While 1
    Sleep(10)
WEnd

As you may notice I have used arrays to hold the various controls - it makes for much less typing and much easier-to-understand code. Please ask if you have any questions.

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

hi @Melba23  i saw  your solution  , and  is very elegant , i like so much , the  ruduction of  include i think  is  very clever  , i  have  questions . you use  in include  
    _ArrayDisplay($aTruckMSHIP, "Filled array", Default, 8) when push the  button  concludi , but i would  send at  first  script , a array $aTruckMSHIP (ofcourse  after press button concludi).

i want  use it  after this

Local $baba = GUICtrlRead($Input1)
    Switch $baba
        Case 1 To 8
            _Truck_pooling_many_ship_gui($baba)
            
            (i  must  use  it  a  result of  pushing button concludi in gui 2)

I would like the flow of  first script was dependent on the second , after some opertaion in  gui 2  result of  them going at the first and  restart flow  (after call second gui)

thankz  again 

Link to comment
Share on other sites

  • Moderators

faustf,

Delighted that you like the rather more elegant way of dealing with grids of controls. Now to your questions:

- There is no such thing as "first script" and "include" - by including the second script within the first, you have only a single script. And as I have given the $aTruckMSHIP array Global scope, you can access it from anywhere within the combined script - I only displayed it within the concludi function to show that it was created correctly.

- As to the flow of the script - by using OnEvent mode you are forced to return to the idle loop after each function call or you run into all sorts of problems - so there is no way to "stop" the script. However, if all you want is to prevent the first GUI being actioned while the second is visible, I suggest using GUISetState to disable or hide it and then to re-enable it once the second GUI is deleted.

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...