Jump to content

tabsheet questions


faustf
 Share

Recommended Posts

hi guys  i have a part of script  with a tabsheet   one  call ebay  and second call configuration , i want open a  one  when start program but

always  open a second like first ,

anyone can help me ?? thankz

Func _SITI_WEB()

    _Boom() ; cancella tutto quello che trova su la  gui
    _Inizializza_eBay_Param()

    Local $read_file = _True_ReadFile(@ScriptDir & "\TOOLS\FTPbox\log_4_GEST.txt", $FO_READ)
    If $read_file = "1time=on" Then
        ShellExecute(@ScriptDir & "\TOOLS\FTPbox\FTPbox.exe")
        _True_write_File(@ScriptDir & "\TOOLS\FTPbox\log_4_GEST.txt", "1time=off")
    Else
        ShellExecute(@ScriptDir & "\TOOLS\FTPbox\FTPbox.exe", "", "", "", @SW_HIDE)
    EndIf

    GUISetCursor(15) ; mouse clessidra
    $SITIWEB_Tab1 = GUICtrlCreateTab(1, 2, 1690, 765)
    $SITIWEB_TabSheet1 = GUICtrlCreateTabItem($GUI_Lang[101]) ; tab eBay
    GUICtrlSetState(-1, $GUI_SHOW) ; will be display first
    $SITIWEB_Button7 = GUICtrlCreateButton("", 6, 25, 41, 39, $BS_ICON) ; nuova inserzione eBay
    GUICtrlSetImage(-1, $DLL_LOCATE, -89)
    GUICtrlSetTip(-1, $GUI_Lang[119])
    $SITIWEB_Button8 = GUICtrlCreateButton("", 49, 25, 41, 39, $BS_ICON) ; apri inserzione nel browser
    GUICtrlSetImage(-1, $DLL_LOCATE, -99)
    GUICtrlSetTip(-1, $GUI_Lang[118])
    $SITIWEB_Button17 = GUICtrlCreateButton("", 1645, 25, 41, 39, $BS_ICON) ; ricarica utente
    GUICtrlSetImage(-1, $DLL_LOCATE, -96)
    GUICtrlSetTip(-1, $GUI_Lang[131])
    $SITIWEB_Button19 = GUICtrlCreateButton("", 1428, 25, 41, 39, $BS_ICON) ; carica contemporaneamente piu utenti tokenizati , vendite in corso
    GUICtrlSetImage(-1, $DLL_LOCATE, -97)
    GUICtrlSetTip(-1, $GUI_Lang[135])


    Local $sDefault_Log = IniRead($sDefault_eBay_login, "log_eBay_default_user", "Key1", "Default Value") ; user
    $SITIWEB_Combo3 = GUICtrlCreateCombo($sDefault_Log, 1494, 30, 145, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL)) ; combo degli utenti ebay
    Local $aRetArray, $sFilePath = @ScriptDir & "\WEB-SITE\eBay\utenti\utenti_con_token.txt"
    _FileReadToArray($sFilePath, $aRetArray)
    For $i = 1 To UBound($aRetArray) - 1
        GUICtrlSetData($SITIWEB_Combo3, $aRetArray[$i], $sDefault_Log)
    Next

    _GUICtrlStatusBar_SetParts($StatusBar1, $aParts)
    _GUICtrlStatusBar_SetText($StatusBar1, "eBay Login Default: " & $sDefault_Log, 1)
    _GUICtrlStatusBar_SetIcon($StatusBar1, 1, _WinAPI_ExtractIcon($DLL_LOCATE, 87))

    $SITIWEB_Group3 = GUICtrlCreateGroup($GUI_Lang[117], 5, 70, 1682, 297) ; prodotti in vendita

    _prodotti_in_vendita_eBay()

    $SITIWEB_Group4 = GUICtrlCreateGroup($GUI_Lang[122], 5, 369, 1682, 393) ; storico
    ;$SITIWEB_List3 = GUICtrlCreateList("", 208, 385, 1475, 305)
    $SITIWEB_List3 = _ListView_OK("", 208, 385, 1475, 371, "Item ID_150_Nome Prodotto_360_Qt._50_Formato_100_Prezzo C.S._100_Prezzo Asta_100_Prezzo Spedizione_100_Url Site_450")


    $SITIWEB_TreeView1 = GUICtrlCreateTreeView(10, 387, 195, 69, BitOR($GUI_SS_DEFAULT_TREEVIEW, $WS_BORDER))


    _GUICtrlTreeView_BeginUpdate($SITIWEB_TreeView1)
    $SITIWEB_tree_eBay = GUICtrlCreateTreeViewItem($GUI_Lang[101], $SITIWEB_TreeView1) ; eBay
    _GUICtrlTreeView_SetIcon($SITIWEB_TreeView1, $SITIWEB_tree_eBay, @ScriptDir & "\INCLUDE\shell32.dll", 87)
    _GUICtrlTreeView_EndUpdate($SITIWEB_TreeView1)
    $SITIWEB_venduti = GUICtrlCreateTreeViewItem($GUI_Lang[120], $SITIWEB_tree_eBay) ; venduti
    $SITIWEB_non_venduti = GUICtrlCreateTreeViewItem($GUI_Lang[121], $SITIWEB_tree_eBay) ; non venduti
    $SITIWEB_ship = GUICtrlCreateTreeViewItem($GUI_Lang[129], $SITIWEB_tree_eBay) ; spedizioni


    $SITIWEB_Input3 = GUICtrlCreateInput("", 10, 734, 113, 21) ; input cerca
    $SITIWEB_Button12 = GUICtrlCreateButton($GUI_Lang[32], 130, 734, 75, 21) ; tasto cerca

    GUICtrlCreateGroup("", -99, -99, 1, 1)

    $SITIWEB_TabSheet2 = GUICtrlCreateTabItem($GUI_Lang[100]) ; tab Configurazione
    ;GUICtrlSetState(-1,$GUI_SHOW)

    ;$SITIWEB_Group1 = GUICtrlCreateGroup($GUI_Lang[102], 1273, 27, 412, 353) ; Registrazione
    $SITIWEB_Group1 = GUICtrlCreateGroup($GUI_Lang[102], 1273, 27, 412, 385) ; Registrazione

    $SITIWEB_Label4 = GUICtrlCreateLabel("eBay Site", 1542, 124, 49, 17)
    $SITIWEB_Combo2 = GUICtrlCreateCombo("eBay Italia", 1538, 145, 137, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL))
    GUICtrlSetData($SITIWEB_Combo2, "eBay Australia|eBay Austria|eBay Belgium|eBay Belgium (French)|eBay Canada (English)|" & _
            "eBay Canada (French)|eBay French|eBay Germany|eBay Hong Kong|eBay India|eBay Ireland|eBay Netherlands|eBay Singapore|" & _
            "eBay Spain|eBay Switaerland|eBay UK|eBay United States|eBay Poland|eBay Philippines|eBay Malaysia|eBay Motors", "eBay Italia")
    $SITIWEB_Button1 = GUICtrlCreateButton("Registrazione con mail", 1586, 285, 91, 85, $BS_ICON) ; Registrazione con mail
    GUICtrlSetImage(-1, @ScriptDir & "\WEB-SITE\eBay\icon\multy.ico", -1)
    $SITIWEB_Button3 = GUICtrlCreateButton("Registrazione solo eBay", 1586, 175, 91, 85, $BS_ICON) ; Registrazione solo eBay
    GUICtrlSetImage(-1, @ScriptDir & "\WEB-SITE\eBay\icon\Chrisbanks2-Cold-Fusion-Hd-Ebay.ico", -1)
    $SITIWEB_Button2 = GUICtrlCreateButton("Registrazione solo mail", 1482, 176, 91, 86, $BS_ICON) ; Registrazione solo mail
    GUICtrlSetImage(-1, @ScriptDir & "\WEB-SITE\eBay\icon\index.ico", -1)
    $SITIWEB_Checkbox1 = GUICtrlCreateCheckbox($GUI_Lang[106], 1471, 72, 65, 17) ; Id list
    $SITIWEB_Checkbox2 = GUICtrlCreateCheckbox($GUI_Lang[107], 1471, 50, 97, 17) ; Utente standard
    $SITIWEB_Button4 = GUICtrlCreateButton($GUI_Lang[108], 1604, 51, 75, 21) ; Registra
    $SITIWEB_Button5 = GUICtrlCreateButton($GUI_Lang[100], 1605, 84, 75, 21) ;Configura

    $SITIWEB_Button18 = GUICtrlCreateButton($GUI_Lang[151], 1283, 381, 83, 21) ; genera token

    $SITIWEB_Button6 = GUICtrlCreateButton($GUI_Lang[152], 1482, 286, 91, 85, $BS_ICON) ; Registrazione solo Paypal
    GUICtrlSetImage(-1, @ScriptDir & "\WEB-SITE\eBay\icon\Uiconstock-E-Commerce-Paypal.ico", -1)
    $SITIWEB_List1 = GUICtrlCreateListView("", 1279, 53, 185, 318, $LVS_SORTASCENDING)
    _GUICtrlListView_SetExtendedListViewStyle($SITIWEB_List1, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_CHECKBOXES, $LVS_EX_GRIDLINES, $LVS_EX_SUBITEMIMAGES)) ; questa stringa fa la griglia stile excel
    _GUICtrlListView_AddColumn($SITIWEB_List1, $GUI_Lang[103], 180) ; Utente fake

    Local $aFakeUser = _FileListToArray(@ScriptDir & "\WEB-SITE\eBay\utenti")

    For $i = 1 To $aFakeUser[0]
        If $aFakeUser[$i] = "." Or $aFakeUser[$i] = ".." Then
        Else
            Local $Exist = FileExists(@ScriptDir & "\WEB-SITE\eBay\utenti\" & $aFakeUser[$i] & "\utente_eBay_Login.ini")
            If $Exist = 1 Then
                ;       Local $hImage = _GUIImageList_Create(16, 16, 5, 3)
                ;       _GUIImageList_AddIcon($hImage, $DLL_LOCATE, 93)
                ;       _GUICtrlListView_SetImageList($SITIWEB_List1, $hImage, 1)
                ;       _GUICtrlListView_AddItem($SITIWEB_List1, $aFakeUser[$i], $i)

                ; Load images
                Local $hImage = _GUIImageList_Create(16, 16, 5, 3)
                _GUIImageList_AddIcon($hImage, $DLL_LOCATE, 92)
                _GUICtrlListView_SetImageList($SITIWEB_List1, $hImage, 1)

                ; Add items
                ;_GUICtrlListView_AddItem($SITIWEB_List1, "Row 1: Col 1", 0)
                _GUICtrlListView_AddItem($SITIWEB_List1, $aFakeUser[$i], 0)
            Else
                _GUICtrlListView_AddItem($SITIWEB_List1, $aFakeUser[$i], $i)
            EndIf

        EndIf
    Next
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $SITIWEB_Group2 = GUICtrlCreateGroup($GUI_Lang[111], 1272, 415, 413, 92) ; parametrei ebay
    $SITIWEB_Input1 = GUICtrlCreateInput("", 1281, 454, 111, 21)
    $SITIWEB_Label1 = GUICtrlCreateLabel($GUI_Lang[41], 1283, 437, 36, 17) ; login
    $SITIWEB_Label2 = GUICtrlCreateLabel($GUI_Lang[42], 1398, 437, 50, 17) ; password
    $SITIWEB_Input2 = GUICtrlCreateInput("", 1396, 454, 112, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_PASSWORD))
    $SITIWEB_Button9 = GUICtrlCreateButton($GUI_Lang[25], 1281, 481, 43, 21) ; setta
    $SITIWEB_Combo1 = GUICtrlCreateCombo("eBay Italia", 1533, 454, 145, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL))
    GUICtrlSetData($SITIWEB_Combo1, "eBay Australia|eBay Austria|eBay Belgium|eBay Belgium (French)|eBay Canada (English)|" & _
            "eBay Canada (French)|eBay French|eBay Germany|eBay Hong Kong|eBay India|eBay Ireland|eBay Netherlands|eBay Singapore|" & _
            "eBay Spain|eBay Switaerland|eBay UK|eBay United States|eBay Poland|eBay Philippines|eBay Malaysia|eBay Motors", "eBay Italia")
    $SITIWEB_Label3 = GUICtrlCreateLabel($GUI_Lang[112], 1536, 436, 49, 17) ; eBay site
    ;$SITIWEB_Button10 = GUICtrlCreateButton($GUI_Lang[113], 1330, 445, 65, 21) ; Use default
    $SITIWEB_Button11 = GUICtrlCreateButton($GUI_Lang[20], 1401, 481, 65, 21) ; Carica
    GUICtrlCreateGroup("", -99, -99, 1, 1)

    Local $iLPayID = IniRead($sPath_User_standar_ini, "SU_Mail_com", "payid", "")
    Local $iLPayName = IniRead($sPath_User_standar_ini, "SU_Mail_com", "payname", "")
    Local $iLShipID = IniRead($sPath_User_standar_ini, "SU_Mail_com", "shipid", "")
    Local $iLShipName = IniRead($sPath_User_standar_ini, "SU_Mail_com", "shipname", "")
    Local $iLRetID = IniRead($sPath_User_standar_ini, "SU_Mail_com", "retid", "")
    Local $iLRetName = IniRead($sPath_User_standar_ini, "SU_Mail_com", "retname", "")


    $SITIWEB_Group5 = GUICtrlCreateGroup($GUI_Lang[241], 7, 28, 409, 375) ; eBay configurazioni globali
    $SITIWEB_List4 = _ListView_OK("", 10, 44, 400, 318, "ID_100_Nome_288")
    $SITIWEB_Button21 = GUICtrlCreateButton($GUI_Lang[25], 354, 371, 56, 21) ; Setta
    $SITIWEB_Button22 = GUICtrlCreateButton($GUI_Lang[242], 14, 372, 59, 21) ; Apri conf
    $SITIWEB_Button23 = GUICtrlCreateButton($GUI_Lang[243], 294, 371, 56, 21) ; scarica

    If $iLPayID = "" Or $iLPayName = "" Or $iLShipID = "" Or $iLShipName = "" Or $iLRetID = "" Or $iLRetName = "" Then
        MsgBox(0, 'Info', 'Non ci sono liste associate associa paypal ,  tipo di spedizione e return', 5) ; Non ci sono liste associate associa paypal ,  tipo di spedizione e return
        _Scarica_eBay_user_preference()
    Else
        ; da inserire cio che è nel file ini
        _GUICtrlListView_BeginUpdate($SITIWEB_List4)

        GUICtrlCreateListViewItem($iLPayID & "|" & $iLPayName, $SITIWEB_List4)
        GUICtrlCreateListViewItem($iLShipID & "|" & $iLShipName, $SITIWEB_List4)
        GUICtrlCreateListViewItem($iLRetID & "|" & $iLRetName, $SITIWEB_List4)
        #cs
            If Not Mod($i, 2) Then
            ;Even
            GUICtrlSetBkColor(-1, 0xffffff)
            Else
            ;Odd
            GUICtrlSetBkColor(-1, 0xe6e6e6)
            EndIf
        #ce
        _GUICtrlListView_EndUpdate($SITIWEB_List4)
    EndIf

    GUICtrlCreateGroup("", -99, -99, 1, 1)
    GUICtrlCreateTabItem("")

    GUISetState(@SW_SHOW)
    GUISetCursor(2) ; mouse puntatore

    ;configura eBay
    GUICtrlSetOnEvent($SITIWEB_Button2, _Reg_only_mail) ; regista solo la mail macro
    GUICtrlSetOnEvent($SITIWEB_Button4, _Registra_utente) ; registra  utente standar in standar.ini file
    GUICtrlSetOnEvent($SITIWEB_Button3, _Reg_Only_eBay) ; registra su ebay
    GUICtrlSetOnEvent($SITIWEB_Button6, _Reg_Only_Paypal) ; regista su paypal
    GUICtrlSetOnEvent($SITIWEB_Button1, _Reg_All_PayeBayMail) ; registra tutto paypal ebay e mail
    GUICtrlSetOnEvent($SITIWEB_Button5, _Conf_Fake_User) ; configura
    GUICtrlSetOnEvent($SITIWEB_Button9, _Setta_eBay_User_Login) ; setta l utente  di default
    GUICtrlSetOnEvent($SITIWEB_Button11, _Carica_Fake_Login_eBay) ; bottone carica
    GUICtrlSetOnEvent($SITIWEB_Button23, _Scarica_eBay_user_preference) ; bottone Scarica
    GUICtrlSetOnEvent($SITIWEB_Button21, _Setta_eBay_user_preference) ; bottone Setta

    ;ebay
    GUICtrlSetOnEvent($SITIWEB_Button8, _Open_inserzione_B) ; bottone apri nell Browser
    GUICtrlSetOnEvent($SITIWEB_venduti, _Storico_Venduti) ; treeview
    GUICtrlSetOnEvent($SITIWEB_non_venduti, _Storico_non_Venduto) ; treeview
    GUICtrlSetOnEvent($SITIWEB_ship, _Spedizioni_eBay) ; treeview
    GUICtrlSetOnEvent($SITIWEB_Button12, _Find_Client_siti_web) ; cerca in siti web
    GUICtrlSetOnEvent($SITIWEB_Button18, _Get_token_utente) ; crea il token per il multi utente
    GUICtrlSetOnEvent($SITIWEB_Button17, _ricarica_utente_eBay) ;ricarica l'utente Token
    GUICtrlSetOnEvent($SITIWEB_Button19, _carica_ALL_utenti_eBay) ;ricarica tutti gli utenti eBay
    GUICtrlSetOnEvent($SITIWEB_Button7, _New_ITEM_eBay) ; crea nuova inserzione eBay

    ; eBay

    ;GUICtrlSetOnEvent($SITIWEB_Button6, "_New_Item")

EndFunc   ;==>_SITI_WEB

 

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