Hi all,
Have a little problem getting my code to work the way i want, i managed it to count the files that ends with .jpg, but it only shows 1 picture less then there is in the folder, like if i have 10 .jpg's it only shows 9 before it exits, i tried it with a foor loop with step - 1, same thing, and i tried this way like below.
#include <File.au3>
#include <Array.au3>
#Include <GUIConstantsEx.au3>
#Include <WindowsConstants.au3>
Global $pixtures
Global $filecount
Call("findthem")
Local $i = 0
Do
GUICreate('Picit', @DesktopWidth, @DesktopHeight, 0, 0, BitOR($WS_POPUP, $WS_EX_TOPMOST))
GUICtrlCreatePic(@ScriptDir & "\" & $pixtures[$filecount], 0, 0, @DesktopWidth, @DesktopHeight)
GUISetState()
Sleep(1000)
$i = $i + 1
$filecount = $filecount - 1
Until $i = $pixtures[0]
Func findthem()
$pixtures = _FileListToArray(@ScriptDir,"*.jpg")
If @error = 4 Then
MsgBox(0, "", "Hittade inga bilder.")
Exit
EndIf
_ArrayDisplay($pixtures)
$filecount = $pixtures[0]
EndFunc
Nevermind i noticed the error when i posted, , this works