( erstellt lediglich ein ini-file , wo Source und Destination der gewählten Ordner gespeichert werden )
Code: Select all
;- test GUI
#Warn
SetWorkingDir, %A_ScriptDir%
Filename1=FileCOPY_2016
Gui,2: default
Gui,2:Color, Black
Gui,2:Color, ControlColor, Black
Gui,2:Font,,FixedSys
source1x:=""
dest1x:=""
fdd1:=""
fdd2:=""
fdd3:=""
RSSINI=%A_scriptdir%\%filename1%_INI.ini
ifnotexist,%rssini%
{
IniWrite,C:\test1 , %rssini% ,Source , Source_PATH
IniWrite,C:\test2 , %rssini% ,Destination , Destination_Path
}
IniRead, source1x, %rssini% , Source , Source_PATH
IniRead, dest1x, %rssini% , Destination , Destination_Path
Gui,2: Add, button, x10 y10 h25 w100 gSource1, Source ...
Gui,2: Add, button, x10 y40 h25 w100 gDest1 , DEST ...
Gui,2: Add, Edit, x130 y10 w800 vsource1x cGray readonly,%source1x%
Gui,2: Add, Edit, x130 y40 w800 vdest1x cGray readonly,%dest1x%
Gui,2: Add, button, x950 y10 h25 w80 gSource1a vSOURCEB,OPEN
Gui,2: Add, button, x950 y40 h25 w80 gDest1a vDESTB ,OPEN
Gui,2: Add, Edit, x130 y80 w800 cRed readonly vExtensions,
Gui,2: add, button, x10 y80 h25 w80 gStartx vSt1,Start
Gui,2: Add, Text , x130 y105 w800 cGray vtext1
Gui,2: Show,x100 y10 w1050 h170,%filename1%
ifnotexist,%source1x%
{
GuiControl,Disable,sourceb
GuiControl,Disable,St1
}
ifnotexist,%dest1x%
{
GuiControl,Disable,destb
GuiControl,Disable,St1
}
return
;-----------------------------
startx:
Extensions1 := "htm,html,txt"
Guicontrol,2: ,text1,TEST command missing
Guicontrol,2: ,extensions,%extensions1%
return
source1:
;---------- SOURCE select ----------------------
FD1:=""
FileSelectFolder,FD1,, 2, Pick up SOURCE folder
if (fd1="")
return
Guicontrol,2: ,source1x,%fd1%
GuiControl,Enable,sourceb
gosub,save1
return
;------------------------------------------
dest1:
;--------- DESTINATION select ------------------
FD2:=""
FileSelectFolder,FD2,, 2, Pick up DESTINATION folder
if (fd2="")
return
Guicontrol,2: ,dest1x,%fd2%
GuiControl,Enable,destb
gosub,save1
return
source1a:
Gui,2:submit,nohide
ifexist,%source1x%
run,%source1x%
return
;------------------------
dest1a:
Gui,2:submit,nohide
ifexist,%dest1x%
run,%dest1x%
return
;------------------------
2Guiclose:
Gui,2:submit,nohide
gosub,save1
exitapp
;-----------------------------
save1:
IniWrite,%source1x% , %rssini% ,Source , Source_PATH
IniWrite,%dest1x% , %rssini% ,Destination , Destination_Path
guicontrolget,source1x
guicontrolget,dest1x
ifexist,%source1x%
fdd1:=1
ifexist,%dest1x%
fdd2:=1
fdd3:=(fdd1+fdd2)
if (fdd3=2)
GuiControl,Enable,ST1
return
;-----------------------------