FİRE BİRD Posted May 14, 2010 Share Posted May 14, 2010 WindowCapture.dll ile yaptığım bir çalışmada çekilen fotoğraflar dizine : WindowCapture.SaveImage("AutoPlay\Images\CapturedImage.png"); Şeklinde kaydediliyor.Fakat bana her seferde isim değiştirilerek kaydetmesi gerekiyor, yani üzerine kaydetmeyecek. Yardımiarınızı bekliyorum. Link to comment Share on other sites More sharing options...
KintaRo Posted May 14, 2010 Share Posted May 14, 2010 İstersen şu şekilde dosya adının sonun tarih ve saat ekleyebilirsin; tarih = System.GetDate(DATE_FMT_ISO) dakika = System.GetTime(TIME_FMT_MIN) saat = System.GetTime(TIME_FMT_HOUR) WindowCapture.SaveImage("AutoPlay\Images\CapturedImage_" .. tarih .. "_" .. saat .. "." .. dakika .. ".png");[/CODE] İstersen de bu şekilde dosya adının sonuna rastgele bir numara ekleyebilirsin; [CODE]sayi = Math.Random(10, 1000) WindowCapture.SaveImage("AutoPlay\Images\CapturedImage" .. sayi .. ".png");[/CODE] Link to comment Share on other sites More sharing options...
FİRE BİRD Posted May 14, 2010 Author Share Posted May 14, 2010 @KintaRo Fotolar 1,2,3,4,.... gibi, foto adreslerinin değişmez olması gerekiyor... Bu screen capture ler otomatik olarak FTP adresine yüklenecek ve buradaki swf uzantılı dosya içinde slayt gösterisi olacaklar.. Bir dahaki uploadda aynı isimde tekrar üzerlerine yazılması gerekiyor.. Kısaca rakam/harf lerin tekrarlanabilir olması gerekiyor.... Link to comment Share on other sites More sharing options...
KintaRo Posted May 14, 2010 Share Posted May 14, 2010 peki fotoğraf sayısı belli mi? yoksa bazen 5 bazen 10 olabilir mi? Link to comment Share on other sites More sharing options...
KintaRo Posted May 14, 2010 Share Posted May 14, 2010 Şöyle bir kod hazırladım. Bu kod Docs klasörünün içinde ki dosyası sayısı kadar 1'den o sayiya kadar teker teker numara ekleyerek dosyayi kaydediyor. Yalnız önce bi denemen lazım plugin bende olmadığı için test edemedim. local tAra = File.Find("AutoPlay\\Docs", "*.*", true, true); if tAra then local x; for x = 1, Table.Count(tAra) do WindowCapture.SaveImage("AutoPlay\Images\CapturedImage".. x ..".png"); end end[/CODE] Edit: Şu şekilde de olabilir denemeden emin olamıyorum... x+1 ..".png"); Link to comment Share on other sites More sharing options...
FİRE BİRD Posted May 14, 2010 Author Share Posted May 14, 2010 @KintaRo O şekide bir sonuç alamadım fakat her bir foto için kodları tekrarlayarak (Uzun yoldan) sorunu çözdüm. Link to comment Share on other sites More sharing options...
KintaRo Posted May 14, 2010 Share Posted May 14, 2010 @FİRE BİRD; deneyemediğim için bir şey diyemiyorum. O fonksiyonu ben tek bir dosyayı xxx1.png, xxx2.png vs vs. şeklinde File.Copy ile başka bir yere kopyalattırarak denedim çalıştı ama seninki biraz farklı bir olay. Neyse problem çözüldüyse sorun yok. Link to comment Share on other sites More sharing options...
FİRE BİRD Posted May 14, 2010 Author Share Posted May 14, 2010 @KintaRo O şekide bir sonuç alamadım fakat her bir foto için kodları tekrarlayarak (Uzun yoldan) sorunu çözdüm. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.