Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

need help with a FOR LOOP

$
0
0

i know this is simple but i cant seem to figure it out...

here is my code :
 

 
Plain Text         
   For $s_idx = 1 To $search_things[0]       If StringInStr(FileGetAttrib($search_root & $search_things[$s_idx]), 'D', 0, 1) Then          $href = StringEncrypt(1, 'SandelPerieanu|' & StringLeft($search_root, StringInStr($search_root, '\', 0, -1) - 1) & '|' & $search_root & $search_things[$s_idx], $pass_encrypt)          $s_dirs &= '<a class="padding1" href="folder-' & $href & '"><img align="middle" hspace="10" border=0 height="28px" width="28px" src="filefolder.png"><b>' & $search_things[$s_idx] & '</b></a><br>' & @CRLF       Else $files = $search_things[$s_idx] Local $folder2check = $search_root Local $vidType = "*.flv" Local $FileList = _FileListToArray($folder2check , $vidType, $FLTA_FILES, True) If @error Then ; display nothing Else For $i = 1 To $FileList[0]   $okFiles = GetFileName($FileList[$i])   ConsoleWrite("this is the files allowed : " & $okFiles  & @CRLF)   $href = StringEncrypt(1, 'SandelPerieanu|' & $search_root & $okFiles, $pass_encrypt)   $s_files &= '<a class="padding1" href="file-' & $href & '"><img align="middle" hspace="10" border=0 height="28px" width="28px" src="file.png"><b>' & $okFiles & '</b></a><br>' & @CRLF Next WEnd EndIf  EndIf    Next

 Just trying to only show certain files NOT all file extension, no need to show  windows files etc...

 well it works BUT because of the for loop it is showing the files more than once,  i have been stuck on this for a few hours and not sure how else to get the correct files with out a for loop inside the other loop.  any ideas?

Obvisously only want to display the files once  this code starts about line 360 
 


Viewing all articles
Browse latest Browse all 12506

Trending Articles