djonur007 Posted November 27, 2010 Share Posted November 27, 2010 Selamun aleykum arkadaşlar; Benim bir sorum var. Şimdi bir klasör altında 3-5 tane exe uzantılı program var, ama isimlerini bilmiyoruz. Bu programları [b]sırayla[/b] nasıl çalıştırabiliriz?(katılımsız olarak.) Link to comment Share on other sites More sharing options...
3yl3mci Posted November 27, 2010 Share Posted November 27, 2010 ismini bilmediğin dosya mı o zaman uzantısınıda bilmen buda oluorki birşey yapaman Link to comment Share on other sites More sharing options...
KintaRo Posted November 27, 2010 Share Posted November 27, 2010 AMS ile bu yapilabilir: [quote]tAra = File.Find("Autoplay\\Docs", "*.exe", false, false, nil, nil) for i in pairs(tAra) do File.Run(tAra[i], "", "Autoplay\\Docs", SW_SHOWNORMAL, true) end[/quote] bu kod docs klasorundeki exe dosyalarını sırayla çalıştıracaktır. Link to comment Share on other sites More sharing options...
blue_life Posted November 27, 2010 Share Posted November 27, 2010 Autoit ile kısaca; [codebox]#NoTrayIcon ;Tray iconunu saklayalım _FIND_RUN_EXE(@ScriptDir) ;Sırasıyla çalıştır Func _FIND_RUN_EXE($LOCATION) If StringRight($LOCATION,1) <> "\" Then $LOCATION &= "\" Local $search = FileFindFirstFile($LOCATION & "*.exe"),$file If $search <> -1 Then While 1 $file = FileFindNextFile($search) If @error Then ExitLoop RunWait($LOCATION & $file) WEnd EndIf FileClose($search) EndFunc[/codebox] Tabi ben satırları biraz uzattım Link to comment Share on other sites More sharing options...
KintaRo Posted November 27, 2010 Share Posted November 27, 2010 kısaca bumu? vay be, iyiki uzun bişey sormadı arkadaş Link to comment Share on other sites More sharing options...
blue_life Posted November 27, 2010 Share Posted November 27, 2010 Bana göre kısaca. Hehe Link to comment Share on other sites More sharing options...
KintaRo Posted November 27, 2010 Share Posted November 27, 2010 Bu autoite iyiki başlamamışım Link to comment Share on other sites More sharing options...
djonur007 Posted November 27, 2010 Author Share Posted November 27, 2010 [quote name='KintaRo' date='27 Kasım 2010 - 12:36 ' timestamp='1290854816' post='917727'] kısaca bumu? vay be, iyiki uzun bişey sormadı arkadaş [/quote] Hocam senin kodlara göre uzun olabilir ama boyut olarak @Blue_Life hocamınki daha küçük Herkese teşekkürler... @3yl3mci bak yapılabilirmiş. Link to comment Share on other sites More sharing options...
blue_life Posted November 27, 2010 Share Posted November 27, 2010 @KintaRo Hobi olarak başladık, ufak tefek bir şeyler yaptıkça gelişiyor... Aslında autoit ile yüklenen udf leri kullansak (library) kodlar dahada kısalır. @djonur007 Al sana cmd için kısa kod. Tabi benim için autoit daha stabil. [codebox]@Echo Off for %%U in (*.exe) DO ( Start %%U )[/codebox] Link to comment Share on other sites More sharing options...
KintaRo Posted November 27, 2010 Share Posted November 27, 2010 hah heryerde vurun yüzüme. acı ama gerçek ams'de hiç bir label koyup 1 satır kod yazsan boyut 4 mb oluyor. yapacak birşey yok.. Link to comment Share on other sites More sharing options...
blue_life Posted November 27, 2010 Share Posted November 27, 2010 @KintaRo Hım, ams nin bu yönü kötüymüş Autoitin boyutu bile benim gözümde çok büyük. Link to comment Share on other sites More sharing options...
KintaRo Posted November 27, 2010 Share Posted November 27, 2010 [quote name='blue_life' date='27 Kasım 2010 - 13:07 ' timestamp='1290856652' post='917741'] Al sana cmd için kısa kod. Tabi benim için autoit daha stabil. [codebox]@Echo Off for %%U in (*.exe) DO ( Start %%U )[/codebox] [/quote] bu kod guzelmiş yalnız [b]start /wait %%U[/b] olmayacak mı o? Link to comment Share on other sites More sharing options...
blue_life Posted November 27, 2010 Share Posted November 27, 2010 @KintaRo Şimdi baktım lakin bekleme yapınca bazen hata veriyor! Link to comment Share on other sites More sharing options...
djonur007 Posted November 27, 2010 Author Share Posted November 27, 2010 bencede /wait gelmesi gerek yoksa beklemez kırmızı ışıkta geçer haha [b]Bende hata yok.[/b] Link to comment Share on other sites More sharing options...
KintaRo Posted November 27, 2010 Share Posted November 27, 2010 o zaman ams ye devam eheh Link to comment Share on other sites More sharing options...
djonur007 Posted November 27, 2010 Author Share Posted November 27, 2010 [quote name='KintaRo' date='27 Kasım 2010 - 13:15 ' timestamp='1290857135' post='917747'] o zaman ams ye devam eheh [/quote] bunları çöpe atmayalım [php] #NoTrayIcon ;Tray iconunu saklayalım _FIND_RUN_EXE(@ScriptDir) ;Sırasıyla çalıştır Func _FIND_RUN_EXE($LOCATION) If StringRight($LOCATION,1) <> "\" Then $LOCATION &= "\" Local $search = FileFindFirstFile($LOCATION & "*.exe"),$file If $search <> -1 Then While 1 $file = FileFindNextFile($search) If @error Then ExitLoop RunWait($LOCATION & $file) WEnd EndIf FileClose($search) EndFunc [/php] Link to comment Share on other sites More sharing options...
blue_life Posted November 27, 2010 Share Posted November 27, 2010 Tabiki, en iyi yol bildiğin yoldur Bende bu yüzden autoite devam Link to comment Share on other sites More sharing options...
3yl3mci Posted November 27, 2010 Share Posted November 27, 2010 Doğru dion hiç bir şey imkansız değildir Link to comment Share on other sites More sharing options...
blackman12 Posted November 28, 2010 Share Posted November 28, 2010 vay arkadaş iki dakikada amma kaynatmışsınız. kintarocum aslında bluelife ın kodları da 5 satıra iner ama hata kontrolleri vs. yaptığı için bu kadar uzamış kod. [code]$search = FileFindFirstFile($LOCATION & "*.exe"),$file While 1 $file = FileFindNextFile($search) RunWait($LOCATION & $file) WEnd fileClose($search)[/code] diğer cmd komutuna gelince for %%U in (*.exe) DO ( %%U ) komut böyle de olabilirdi. ama eğer katılımsız kurulumda kullanıcaksanız start /wait le kullanmalısınız. @Echo Off for %%U in (*.exe) DO ( Start /wait %%U ) yoksa kurulumlar birbirini takip etmeyebilir.malum bazı kurulumlar başka bir kurulum aktifken kuruluma devam etmeyip kendini durduruyor. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.