Sign in to follow this  
Followers 0
faustf

questions about syn folder and ftp with resize image

1 post in this topic

#1 ·  Posted (edited)

hi guys , i want  create a little app, for sync  one folder with many folder in this many folder i  insert  some time foto and change it , i want sync with ftp  but before uploading if  the image is big   the program must reduce a pixel , i just write  somthing  but , i dont have idea how can  create a part for sync .

the program must control all file  ??? or exist a mode fast  for do that

this is a part of my  code

#include <Array.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <File.au3>
#include <FTPEx.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
Opt("GUIOnEventMode", 1)

Global $Checkbox1,$Input3_password,$input7_percorso_agg,$Button1,$Input1_percorso


Global $control_clickcack=0
_GUI()

Func _GUI()

$Form2 = GUICreate("FTP-sync-size", 508, 243, 773, 309)
GUISetOnEvent($GUI_EVENT_CLOSE, "Form2Close")
GUISetOnEvent($GUI_EVENT_MINIMIZE, "Form2Minimize")
GUISetOnEvent($GUI_EVENT_MAXIMIZE, "Form2Maximize")
GUISetOnEvent($GUI_EVENT_RESTORE, "Form2Restore")
$Group1 = GUICtrlCreateGroup("", 0, 8, 507, 234)
$Input1_percorso = GUICtrlCreateInput("E:\_GESTIONALE_NEW\WEB-SITE\eBay\PUBLICAZIONI\FOTO", 24, 56, 377, 21)
$Label1 = GUICtrlCreateLabel("Sorgente", 32, 37, 47, 17)
$Button1 = GUICtrlCreateButton("Carica", 416, 56, 75, 21)
GUICtrlSetOnEvent(-1, "Button1Click")

$Label2 = GUICtrlCreateLabel("Dominio  FTP", 32, 87, 88, 17)
$Input2_ftp=GUICtrlCreateInput("xxxxxxxxxxxxxxx.com", 24, 106, 377, 21)
$Button2 = GUICtrlCreateButton("Carica", 416, 106, 75, 21)
GUICtrlSetOnEvent(-1, "Button2Click")
$Label7 = GUICtrlCreateLabel("Percorso: ", 32, 144, 52, 17)
$input7_percorso_agg=GUICtrlCreateInput("/public_html/sito/FOTO/", 104, 137, 121, 21)
$Label3 = GUICtrlCreateLabel("User:",32, 168, 53, 17)
$Input3_user=GUICtrlCreateInput("xxxxxxxxxx", 104, 162, 121, 21)

$Label4 = GUICtrlCreateLabel("Password:", 32, 196, 53, 17)
$Input3_password=GUICtrlCreateInput("xxxxxxxxx", 104, 190, 121, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_PASSWORD))

$Label5 = GUICtrlCreateLabel("Porta:", 32, 220, 32, 17)
$Input5 = GUICtrlCreateInput("xxx", 104, 215, 22, 21)


$Button3 = GUICtrlCreateButton("Controlla", 416, 184, 75, 21)
GUICtrlSetOnEvent(-1, "Button3Click")
$Button4 = GUICtrlCreateButton("Attiva come servizio", 378, 211, 115, 21)
GUICtrlSetOnEvent(-1, "Button4Click")
$Label6 = GUICtrlCreateLabel("Controlla ogni:", 279, 139, 71, 17)
GUICtrlSetOnEvent(-1, "Label6Click")
$Input6 = GUICtrlCreateInput("", 352, 135, 49, 21)
GUICtrlSetOnEvent(-1, "Input6Change")
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Checkbox1 = GUICtrlCreateCheckbox("Show", 232, 196, 49, 17)
GUICtrlSetOnEvent(-1, _Checked)
GUISetState(@SW_SHOW)



EndFunc

Func _Checked()
    Switch @GUI_CtrlId
        Case $Checkbox1
            Select
                Case  $control_clickcack = 0
                    Local $a = GUICtrlRead($Input3_password)
                    GUICtrlDelete($Input3_password)
                    $Input3_password=GUICtrlCreateInput($a, 104, 190, 121, 21);, BitOR($GUI_SS_DEFAULT_INPUT,$ES_PASSWORD))
                    $control_clickcack=1
                Case $control_clickcack = 1
                    Local $a = GUICtrlRead($Input3_password)
                    GUICtrlDelete($Input3_password)
                    $Input3_password=GUICtrlCreateInput($a, 104, 190, 121, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_PASSWORD))
                    $control_clickcack=0
            EndSelect
    EndSwitch
EndFunc   ;==>_Checked

While 1
    Sleep(100)
WEnd

Func Button1Click()
 Local Const $sMessage = "Seleziona cartella"

    ; Display an open dialog to select a file.
    Local $sFileSelectFolder = FileSelectFolder($sMessage, "")
    If @error Then
        ; Display the error message.
        MsgBox($MB_SYSTEMMODAL, "", "No folder was selected.")
    Else
        ; Display the selected folder.
      GUICtrlSetData($Input1_percorso,$sFileSelectFolder)
    EndIf
EndFunc



Func Button2Click()

EndFunc
Func Button3Click()

EndFunc
Func Button4Click()

EndFunc
Func Form2Close()
Exit
EndFunc
Func Form2Maximize()

EndFunc
Func Form2Minimize()

EndFunc
Func Form2Restore()

EndFunc
Func Input1Change()

EndFunc
Func Input5Change()

EndFunc
Func Input6Change()

EndFunc
Func Input7Change()

EndFunc
Func Input8Change()

EndFunc
Func Label1Click()

EndFunc
Func Label2Click()

EndFunc
Func Label3Click()

EndFunc
Func Label4Click()

EndFunc
Func Label5Click()

EndFunc
Func Label6Click()

EndFunc

if exist  some commercial program like  syncback (but with option resize foto)  , is  welcome

:)

thankz at all

Edited by faustf

Share this post


Link to post
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
Sign in to follow this  
Followers 0