-
Posts
31 -
Joined
-
Last visited
Everything posted by Jcreator
-
array vs loop is this possible
Jcreator replied to Jcreator's topic in AutoIt General Help and Support
@Terenz you saved my life . your script was so easy to experiment with so i could know what i needed to do Thank you and for @damien your explanation helped me know what are the mistake i had in my script @AutoBert i cant thank you enough every time am in trouble i found you there for me without you i would have spend moths postponing this project i owe you so much i hope you have a wonderful day thanks everyone and here is a happy cat face -
this script keeps having contradicting loop
Jcreator replied to Jcreator's topic in AutoIt General Help and Support
@AutoBert thank you so much this was really helpful ^^ -
this script keeps having contradicting loop
Jcreator replied to Jcreator's topic in AutoIt General Help and Support
^^ @SadBunny thx for the advice but i cant seem to find this Tools -> Tidy AutoIt if it exist -
this script keeps having contradicting loop
Jcreator replied to Jcreator's topic in AutoIt General Help and Support
@AutoBert i hope that you dont mind me using your code in a different script and thanks to @mikell for trying to help too -
i have a file flower.txt with the name of the flowers and there picture location and information about that kind of flower. i wana cerat a gui that will display the flower picture and it information here is the script #include <Misc.au3> #include <EditConstants.au3> #include <Constants.au3> #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <MsgBoxConstants.au3> #include <WindowsConstants.au3> #include <AVIConstants.au3> #include <TreeViewConstants.au3> #include <GuiComboBox.au3> #include <GuiTab.au3> #include <file.au3> #include <array.au3> Global $sfPath = 'flowers.txt' Global $aFlowers _FileReadToArray($sfPath,$aFlowers,$FRTA_NOCOUNT,'|') _ArrayColDelete($aFlowers,0) ;row 0 has no data so deleting $Form1 = GUICreate("Search Flower Name",320, 480) $input = GUICtrlCreateInput("", 60, 360, 209, 25) $idss = GUICtrlCreateButton("Search", 130, 400, 73, 65) GUISetState(@SW_SHOW) Func Searchf() Global $Fname = GUICtrlRead($input) For $iNo = 0 To UBound($aFlowers[0][0]) - 1 ; if $Fname = $aFlowers[$iNo][0] then MsgBox($MB_SYSTEMMODAL, "","Flower nfo", ""& $aFlowers[$iNo][1] &"") pic() EndIf Next EndFunc While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $nMsg = $idss Searchf() EndSwitch WEnd func pic() For $iNo = 0 To UBound($aFlowers[0][0]) - 1 GUICtrlCreatePic($aFlowers[$iNo][2], 20, 30, 280, 280) Next EndFunc here is the flower.txt file |Hibiscus|Hibiscus is a hardy perennial which grows in variety of colors, sizes and fragrances. Actually they are tropical flowers which require ample sunlight and moisture to grow well. These flowers start blooming in late spring and continuously bloom through July and August.|C:\T-in\IMG\2.jpg |Lilies|There are different types of lily flowers which bloom in August including water lilies, tiger lilies and gold band lilies. Tiger lilies generate orange flowers having black spots. This lily blooms in delayed July and beginning of August. Gold band lily produce exotic white blooms. All varieties of lilies need enough space to grow and protection from summer sun.|C:\T-in\IMG\1.jpg |Turtlehead|Growing in humid areas, turtleheads are small flowers which bloom from July to September. They mostly produce flowers of white and pink color.|C:\T-in\IMG\3.jpg |Hydrangea|These are ever green bushes which produce flowers in different colors including white, purple, blue and pink. They are easy to grow bushes and can grow 3 to 10 feet tall. They require morning sun to grow but they should be protected from noon and afternoon sun.|C:\T-in\IMG\4.jpg |Dahlias|August proves to be the peak blooming season for dahlias. Dahlias come in colors like white, orange, yellow, red and purple. They can tolerate all types of soil and require full sun to grow.|C:\T-in\IMG\5.jpg am still trying to learn about how the ubound work and the _filereadtoarray
-
this script keeps having contradicting loop
Jcreator replied to Jcreator's topic in AutoIt General Help and Support
am really thankful for all your help guys and am sorry for being slow at understanding the answer -.- still trying to learn this by the way the _FileReadToArray was really useful and i tried to use it in another part of the script where it will show the flowers information and picture by typing the name of the flower script #include <Misc.au3> #include <EditConstants.au3> #include <Constants.au3> #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <MsgBoxConstants.au3> #include <WindowsConstants.au3> #include <AVIConstants.au3> #include <TreeViewConstants.au3> #include <GuiComboBox.au3> #include <GuiTab.au3> #include <file.au3> #include <array.au3> Global $sfPath = 'flowers.txt' Global $aFlowers _FileReadToArray($sfPath,$aFlowers,$FRTA_NOCOUNT,'|') _ArrayColDelete($aFlowers,0) ;row 0 has no data so deleting $Form1 = GUICreate("Search Flower Name",320, 480) $input = GUICtrlCreateInput("", 60, 360, 209, 25) $idss = GUICtrlCreateButton("Search", 130, 400, 73, 65) GUISetState(@SW_SHOW) Func Searchf() Global $Fname = GUICtrlRead($input) For $iNo = 0 To UBound($aFlowers[0][0]) - 1 ; if $Fname = $aFlowers[$iNo][0] then MsgBox($MB_SYSTEMMODAL, "","Flower nfo", ""& $aFlowers[$iNo][1] &"") pic() EndIf Next EndFunc While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $nMsg = $idss Searchf() EndSwitch WEnd func pic() For $iNo = 0 To UBound($aFlowers[0][0]) - 1 GUICtrlCreatePic($aFlowers[$iNo][2], 20, 30, 280, 280) Next EndFunc -
this script keeps having contradicting loop
Jcreator replied to Jcreator's topic in AutoIt General Help and Support
this last one did more then what i had in mind ^^ thank you so much i had to do some changes the line For $i = 1 To $cline #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <Array.au3> #include <File.au3> #include <StaticConstants.au3> #include <GuiListBox.au3> $sPath = 'flowers.txt' ;change to your path $sFile = FileRead($sPath) $sFile = Stringreplace($sFile,'.jpg'&@CRLF,chr(255)); row seperator placeholder Do $sFile = Stringreplace($sFile,@CRLF&@CRLF,@CRLF) Until not @extended $sFile =Stringreplace($sFile,@CRLF,'|') ;col seperator $sFile =Stringreplace($sFile,Chr(255), '.jpg'&@CRLF);row seperator restored $hFile=FileOpen($sPath&'.work',2) $sFile='|'&$sFile ;all other rows have this also FileWrite($hFile,$sFile) FileClose($hFile) Global $aFlowers _FileReadToArray($sPath&'.work',$aFlowers,$FRTA_COUNT,'|') _ArrayColDelete($aFlowers,0) ;row 0 has no data so deleting _ArrayDisplay($aFlowers) Global $idPic = -999 $hMainGui = GUICreate('JPG-Viewer', 640, 480) $idList = GUICtrlCreateList('', 490, 5, 135, 470) $cline =_FileCountLines($sPath&'.work') ; i had to add this to make it work for me For $i = 1 To $cline GUICtrlSetData($idList, $aFlowers[$i][0]) Next $idLblHeader = GUICtrlCreateLabel('Header', 5, 5, 470, 40);,$SS_LEFT) GUICtrlSetFont(-1, 14, 800) $idLblBody = GUICtrlCreateLabel('Body', 5, 395, 470, 70);,$SS_LEFT) GUICtrlSetFont(-1, 10, 400) $sFlower=_GUICtrlListBox_GetText($idList, 0) _FindFlowerByName($sFlower) _GUICtrlListBox_SelectString($idList, $sFlower) GUISetState() While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $idList $sVal = GUICtrlRead($idList) _FindFlowerByName($sVal) EndSwitch WEnd Func _FindFlowerByName($sFlower) Local $iNo = _ArraySearch($aFlowers, $sFlower) _FindFlowerByID($iNo) EndFunc ;==>_FindFlowerByName Func _FindFlowerByID($iNo) ;ConsoleWrite($iNo & ': '& $aFlowers[$iNo][1]&@CRLF) GUICtrlSetData($idLblHeader, $aFlowers[$iNo][0]) GUICtrlSetData($idLblBody, $aFlowers[$iNo][1]) If $idPic <> -999 Then GUICtrlDelete($idPic) $idPic = GUICtrlCreatePic($aFlowers[$iNo][2], 5, 55, 200, 200) EndFunc ;==>_FindFlowerByID -
this script keeps having contradicting loop
Jcreator replied to Jcreator's topic in AutoIt General Help and Support
am still not good with the autoit yet so your script will take me some time to understand especially StringStripW but i will give it my time to understand it .am sooo thankful . you are a life saver ,and the way you write scripts is so clean . i hope someday i could help you with something. for now i will give this script some time to see how can i edit it -
i used this code to take names for a text file called data and put the info of the image and it location from the data file into the gui interface but it only detect the lines with the info and it do not show the images . here is the code #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <MsgBoxConstants.au3> #include <WindowsConstants.au3> #include <AVIConstants.au3> #include <TreeViewConstants.au3> #include <GuiComboBox.au3> #include <GuiTab.au3> #include <file.au3> #include <array.au3> _Main() Func _Main() Local $idTab1 $Form1 = GUICreate("Form1", 500, 334, 240, 182) $Group1 = GUICtrlCreateGroup("Group1", 20, 12, 249, 314) $idButton6 = GUICtrlCreateButton("Info", 50, 270, 185, 49) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) Global $fileMPA = "C:\T-in\MPA\data.txt" FileOpen($fileMPA, 0) Global $line1 = FileReadLine($fileMPA , 1) $imp = 0 $idTab1 = GUICtrlCreateTab(300, -3, 180, 330) GUICtrlCreateTabItem("imglist1") GUICtrlSetTip(-1, '#Region TAB1') GUICtrlSetTip(-1, '#Region LIST') Local $imglist1 = GUICtrlCreateList("", 307, 26, 164, 304) $cline =_FileCountLines($fileMPA) While $imp < $cline $line2 = FileReadLine($fileMPA , $imp + 2) $imp = $imp + 7 if $line2 = "" then ExitLoop else GUICtrlSetData(-1, ""& $line2 &"", "") endif WEnd GUICtrlCreateTabItem("imagelist2") GUICtrlSetTip(-1, '#Region TAB2') GUICtrlCreateTabItem("imagelist3") GUICtrlSetTip(-1, '#Region TAB3') While 1 $Msg = GUIGetMsg() Select Case $Msg = $GUI_EVENT_CLOSE Exit Global $whatnow = GUICtrlRead($imglist1) Case $Msg = $idButton6 $imp2 = 0 While $imp2 < 30 $line2 = FileReadLine($fileMPA ,$imp2 + 2) $line3 = FileReadLine($fileMPA , $imp2 + 3) $line7 = FileReadLine($fileMPA , 7) $imp2 = $imp2 + 7 if $line2 = "" then ExitLoop If GUICtrlRead($imglist1) = ""& $line2 &"" Then MsgBox($MB_SYSTEMMODAL, "img info" , $line3) WEnd EndSelect $imp2 = 0 While $imp2 < 30 $line2 = FileReadLine($fileMPA ,$imp2 + 2) $line3 = FileReadLine($fileMPA , $imp2 + 3) $line7 = FileReadLine($fileMPA , 7) $imp2 = $imp2 + 7 Select Case GUICtrlRead($imglist1) = ""& $line2 &"" if $line2 = "" then ExitLoop $Pic1 = GUICtrlCreatePic(""& $line7 &"", 185, 28, 233, 230) If GUICtrlRead($imglist1) then ExitLoop EndSelect WEnd WEnd EndFunc ;==>_Main the data.txt file content is Hibiscus Hibiscus is a hardy perennial which grows in variety of colors, sizes and fragrances. Actually they are tropical flowers which require ample sunlight and moisture to grow well. These flowers start blooming in late spring and continuously bloom through July and August. C:\T-in\IMG\2.jpg Lilies There are different types of lily flowers which bloom in August including water lilies, tiger lilies and gold band lilies. Tiger lilies generate orange flowers having black spots. This lily blooms in delayed July and beginning of August. Gold band lily produce exotic white blooms. All varieties of lilies need enough space to grow and protection from summer sun. C:\T-in\IMG\1.jpg Turtlehead Growing in humid areas, turtleheads are small flowers which bloom from July to September. They mostly produce flowers of white and pink color. C:\T-in\IMG\3.jpg Hydrangea These are ever green bushes which produce flowers in different colors including white, purple, blue and pink. They are easy to grow bushes and can grow 3 to 10 feet tall. They require morning sun to grow but they should be protected from noon and afternoon sun. C:\T-in\IMG\4.jpg Dahlias August proves to be the peak blooming season for dahlias. Dahlias come in colors like white, orange, yellow, red and purple. They can tolerate all types of soil and require full sun to grow.
-
i used while to display images but it went wrong
Jcreator replied to Jcreator's topic in AutoIt General Help and Support
the data.txt file content is Hibiscus Hibiscus is a hardy perennial which grows in variety of colors, sizes and fragrances. Actually they are tropical flowers which require ample sunlight and moisture to grow well. These flowers start blooming in late spring and continuously bloom through July and August. C:\T-in\IMG\2.jpg Lilies There are different types of lily flowers which bloom in August including water lilies, tiger lilies and gold band lilies. Tiger lilies generate orange flowers having black spots. This lily blooms in delayed July and beginning of August. Gold band lily produce exotic white blooms. All varieties of lilies need enough space to grow and protection from summer sun. C:\T-in\IMG\1.jpg Turtlehead Growing in humid areas, turtleheads are small flowers which bloom from July to September. They mostly produce flowers of white and pink color. C:\T-in\IMG\3.jpg Hydrangea These are ever green bushes which produce flowers in different colors including white, purple, blue and pink. They are easy to grow bushes and can grow 3 to 10 feet tall. They require morning sun to grow but they should be protected from noon and afternoon sun. C:\T-in\IMG\4.jpg Dahlias August proves to be the peak blooming season for dahlias. Dahlias come in colors like white, orange, yellow, red and purple. They can tolerate all types of soil and require full sun to grow. thank you so much AutoBert for answering . somehow this post have few views so i was thinking that no one will notice me- 2 replies
-
- display images
- while
-
(and 1 more)
Tagged with:
-
i used this code to take names for a text file called data and put the info of the image and it location from the data file into the gui interface but it only detect the lines with the info and it do not show the images . here is the code #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <MsgBoxConstants.au3> #include <WindowsConstants.au3> #include <AVIConstants.au3> #include <TreeViewConstants.au3> #include <GuiComboBox.au3> #include <GuiTab.au3> #include <file.au3> #include <array.au3> _Main() Func _Main() Local $idTab1 $Form1 = GUICreate("Form1", 500, 334, 240, 182) $Group1 = GUICtrlCreateGroup("Group1", 20, 12, 249, 314) $idButton6 = GUICtrlCreateButton("Info", 50, 270, 185, 49) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) Global $fileMPA = "C:\T-in\MPA\data.txt" FileOpen($fileMPA, 0) Global $line1 = FileReadLine($fileMPA , 1) $imp = 0 $idTab1 = GUICtrlCreateTab(300, -3, 180, 330) GUICtrlCreateTabItem("imglist1") GUICtrlSetTip(-1, '#Region TAB1') GUICtrlSetTip(-1, '#Region LIST') Local $imglist1 = GUICtrlCreateList("", 307, 26, 164, 304) $cline =_FileCountLines($fileMPA) While $imp < $cline $line2 = FileReadLine($fileMPA , $imp + 2) $imp = $imp + 7 if $line2 = "" then ExitLoop else GUICtrlSetData(-1, ""& $line2 &"", "") endif WEnd GUICtrlCreateTabItem("imagelist2") GUICtrlSetTip(-1, '#Region TAB2') GUICtrlCreateTabItem("imagelist3") GUICtrlSetTip(-1, '#Region TAB3') While 1 $Msg = GUIGetMsg() Select Case $Msg = $GUI_EVENT_CLOSE Exit Global $whatnow = GUICtrlRead($imglist1) Case $Msg = $idButton6 $imp2 = 0 While $imp2 < 30 $line2 = FileReadLine($fileMPA ,$imp2 + 2) $line3 = FileReadLine($fileMPA , $imp2 + 3) $line7 = FileReadLine($fileMPA , 7) $imp2 = $imp2 + 7 if $line2 = "" then ExitLoop If GUICtrlRead($imglist1) = ""& $line2 &"" Then MsgBox($MB_SYSTEMMODAL, "img info" , $line3) WEnd EndSelect $imp2 = 0 While $imp2 < 30 $line2 = FileReadLine($fileMPA ,$imp2 + 2) $line3 = FileReadLine($fileMPA , $imp2 + 3) $line7 = FileReadLine($fileMPA , 7) $imp2 = $imp2 + 7 Select Case GUICtrlRead($imglist1) = ""& $line2 &"" if $line2 = "" then ExitLoop $Pic1 = GUICtrlCreatePic(""& $line7 &"", 185, 28, 233, 230) If GUICtrlRead($imglist1) then ExitLoop EndSelect WEnd WEnd EndFunc ;==>_Main i wish some one can help me fix this without having to choose the images manually and i know that the script is messy but am still new in the world of autoit some bear with me . thanks for your time
- 2 replies
-
- display images
- while
-
(and 1 more)
Tagged with:
-
is there a simple way to zip a file
Jcreator replied to Jcreator's topic in AutoIt General Help and Support
am really sorry. i will be more patient -
is there a simple way to zip a file
Jcreator replied to Jcreator's topic in AutoIt General Help and Support
-.- i tried again using rasim 7zip udf but again it didn't work please can anyone help me -
is there a simple way to zip a file
Jcreator replied to Jcreator's topic in AutoIt General Help and Support
may be the problem is with the 7Zip.au3 because i just downloaded one i found in the internet without out confirming it source so. if anyone could give me a working 7Zip.au3 that would be great ^^ -
is there a simple way to zip a file
Jcreator replied to Jcreator's topic in AutoIt General Help and Support
am sorry . what i did mean is it shows no error messages and it does not creating the ZIp file -
is there a simple way to zip a file
Jcreator replied to Jcreator's topic in AutoIt General Help and Support
https://www.autoitscript.com/forum/topic/85094-7zip/ this is the link of the post and you were right i did put 7zip.au3 in the same dir where is my script and it stopped giving errors but still not working -
is there a simple way to zip a file
Jcreator replied to Jcreator's topic in AutoIt General Help and Support
how about now #include <_Zip.au3> $ArcFile = @ScriptDir & "\myArchive.zip" $FileName = "C:\T-in\Server\data\users\timy\config.ini" If Not FileExists($FileName) Then Exit MsgBox(16, "Error", "File not exists") $retResult = _7ZipAdd(0, $ArcFile, $FileName, 1) If $retResult = 0 Then MsgBox(64, "_7ZipAdd", "Archive created successfully") Else MsgBox(64, "_7ZipAdd", "Error occurred") EndIf -
is there a simple way to zip a file
Jcreator replied to Jcreator's topic in AutoIt General Help and Support
#include <7Zip.au3> $ArcFile = @ScriptDir & "\myArchive.zip" $FileName = "c:\Program Files\AutoIt3\Examples" If Not FileExists($FileName) Then Exit MsgBox(16, "Error", "File not exists") $retResult = _7ZipAdd(0, $ArcFile, $FileName, 1) If $retResult = 0 Then MsgBox(64, "_7ZipAdd", "Archive created successfully") Else MsgBox(64, "_7ZipAdd", "Error occurred") EndIf i know but the problem is not with the dir it the #include <7Zip.au3> that gives the error -
is there a simple way to zip a file
Jcreator replied to Jcreator's topic in AutoIt General Help and Support
this code is not mine by the way i found it in the forum while searching -
is there a simple way to zip a file
Jcreator replied to Jcreator's topic in AutoIt General Help and Support
I have tried o use this script #include <7Zip.au3> $ArcFile = @ScriptDir & "\myArchive.zip" $FileName = "c:\Program Files\AutoIt3\Examples" If Not FileExists($FileName) Then Exit MsgBox(16, "Error", "File not exists") $retResult = _7ZipAdd(0, $ArcFile, $FileName, 1) If $retResult = 0 Then MsgBox(64, "_7ZipAdd", "Archive created successfully") Else MsgBox(64, "_7ZipAdd", "Error occurred") EndIf but it look like the 7zip.au3 is not working -
is there a simple way to zip a file
Jcreator replied to Jcreator's topic in AutoIt General Help and Support
No I don't mind using 7-zip to do it . but i just don't know how am still new to this -
I know there most be a way to zip a file using autoit and i looked every where but cant find a script to simply zip a file . i hope someone can tell me how to do it . and thanks for your help ^^
-
summon the name of the newest folder in this path
Jcreator replied to Jcreator's topic in AutoIt General Help and Support
i found the answer thanks to AutoBert it need to have the array inside the function #include <file.au3> #include <array.au3> Global $spath = ("C:\T-in") $checkpath = StringRegExp($spath,"^.+\\$",0) If $checkpath = 0 Then $spath = $spath & "\" Func NewestFolder() $aArray = _FileListToArray($spath,"*",$FLTAR_FOLDERS) Global $aArray2D[10][2] ReDim $aArray2D[$aArray[0]+1][2] $aArray2D[0][0] = $aArray[0] For $i=1 to $aArray[0] $aArray2D[$i][0] = $aArray[$i] $aArray2D[$i][1] = FileGetTime($spath & $aArray[$i],0,1) Next _ArraySort($aArray2D,1,1,"",1) Global $newfolder = $aArray2D[1][0] MsgBox(0, "", "a folder has been added .it name is :"& $newfolder) EndFunc While 1 While 2 $dnumX = DirGetSize($spath, 1) Sleep(500) $dnumY = DirGetSize($spath, 1) If $dnumX[2] <> $dnumY[2] Then NewestFolder() ExitLoop WEnd WEnd -
Thank you soooooo much bro it did work ^^ #include <file.au3> #include <array.au3> Global $spath = ("C:\T-in") $checkpath = StringRegExp($spath,"^.+\\$",0) If $checkpath = 0 Then $spath = $spath & "\" Func NewestFolder() $aArray = _FileListToArray($spath,"*",$FLTAR_FOLDERS) Global $aArray2D[10][2] ReDim $aArray2D[$aArray[0]+1][2] $aArray2D[0][0] = $aArray[0] For $i=1 to $aArray[0] $aArray2D[$i][0] = $aArray[$i] $aArray2D[$i][1] = FileGetTime($spath & $aArray[$i],0,1) Next _ArraySort($aArray2D,1,1,"",1) Global $newfolder = $aArray2D[1][0] MsgBox(0, "", "a folder has been added .it name is :"& $newfolder) EndFunc While 1 While 2 $dnumX = DirGetSize($spath, 1) Sleep(500) $dnumY = DirGetSize($spath, 1) If $dnumX[2] <> $dnumY[2] Then NewestFolder() ExitLoop WEnd WEnd
-
i need to have a script that when ever a folder is add in the selected path show it name but somehow it calls the Folder that was before that one and after that it keep calling it. the same folder again and again when ever a new folder is added #include <file.au3> #include <array.au3> Global $spath = ("C:\T-in") $checkpath = StringRegExp($spath,"^.+\\$",0) If $checkpath = 0 Then $spath = $spath & "\" $aArray = _FileListToArray($spath,"*",$FLTAR_FOLDERS) Func NewestFolder() Global $aArray2D[10][2] ReDim $aArray2D[$aArray[0]+1][2] $aArray2D[0][0] = $aArray[0] For $i=1 to $aArray[0] $aArray2D[$i][0] = $aArray[$i] $aArray2D[$i][1] = FileGetTime($spath & $aArray[$i],0,1) Next _ArraySort($aArray2D,1,1,"",1) Global $newfolder = $aArray2D[1][0] MsgBox(0, "", "a folder has been added .it name is :"& $newfolder) EndFunc While 1 While 2 $dnumX = DirGetSize($spath, 1) Sleep(500) $dnumY = DirGetSize($spath, 1) If $dnumX[2] <> $dnumY[2] Then NewestFolder() ExitLoop WEnd WEnd