#include <GUIConstantsEx.au3> #Include <File.au3> GUICreate("Photo Mosaic", 800, 600) _GenerateMosaic(800,600) GUISetState(@SW_SHOW) While 1 Sleep(10) Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func _GenerateMosaic($iW, $iH, $iX=0,$iY=0) Local $PathToPhotoDir = FileSelectFolder("Select Folder","") & "\" If @error then Exit $arPhoto = _FileListToArray($PathToPhotoDir,"*.jpg",1) If @error then MsgBox(0,"ERROR:","Replace @ScriptDir&'\Foto\' with your path to the photo directory!") Exit EndIf GUICtrlCreatePic($PathToPhotoDir&$arPhoto[1], $iX, $iY, $iW, $iH);first photo as background GUICtrlSetState(-1, $GUI_DISABLE) SplashTextOn("", "Wait!"&@LF&"generating mosaic...", 240, 60, -1, -1, 1+32, "Tahoma", 12,800) For $i=1 To 10;number of passes $n = Random(-100,100,1) For $j=1 To UBound($arPhoto)-1; be careful with the array; the bigger it is, the longer you wait! $xx = Random($iX,$iW,1) $yy = Random($iY,$iH,1) $Pic1 = GUICtrlCreatePic($PathToPhotoDir&$arPhoto[$j], $xx-$n, $yy-$n, 102.4+$n, 76.8+$n) Next Next SplashOff() EndFunc
Edited by taietel, 01 November 2010 - 07:55 PM.







