lazenes1 Posted November 16, 2011 Share Posted November 16, 2011 [center]Merhaba Arkadaşlar Ben Sizlere Bu Konu Altında Birkaç Soru Soracam İnşallah Cevap Ala bilirm Öncelikle Ben Kendi HardDisk'im deki Oyunlarımı Partlara Böldüm Ve Bu Partları Otomatik Çıkartması İçin Bur Scripth Hazırlamaya çalıştım Fakat Bir Kaç Hatavar Galiba Aşağıdaki ResimdeArşivin Konumunu Seçiyorum Fakar Progress Hareket Etiremiyorum Bir Çok Kod Denedim Fakatİşlemden Bağımsız Bir Şekide Çalışıyor yani Sorum Şu Progress Bar'ı nasıl Hareket Ettire Bilirim Acaba ? [img]http://i.minus.com/iq1wgNHAThgk4.JPG[/img] İkinci Sorum ise Şu Aşağıdaki Resimde Yazan [img]http://i.minus.com/ibl333aQ53Bdt4.JPG[/img] Proje Dosyasını Burda : http://www.mediafire.com/?kodrub7hrymsock [/center] ProjeKodlarını: [code]#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <UnRAR.au3> #Region ### START Koda GUI section ### Form= $oyunadi=IniRead("ayar.ini", "oyun", "Adi", "") $Kurulumdansonra=IniRead("ayar.ini", "oyun", "Kurulumdan_sonra_calistir", "") $sonpartadi=IniRead("ayar.ini", "oyun", "SonPartAdi", "") $Form1 = GUICreate("By LaZEnEs"&$oyunadi, 611, 451, 192, 124) $Pic1 = GUICtrlCreatePic(@ScriptDir & "\Kapak\buda.bmp", 0, 0, 620, 436) $Edit1 = GUICtrlCreateEdit("", 5, 293, 369, 130) $raryolu = IniRead("ayar.ini", "oyun", "part1", "") $ArchiveFile =@ScriptDir & "\" & $raryolu GUICtrlSetData(-1, StringFormat("Otomatik Part Çıkartıcı ")) GUICtrlSetState(-1, $GUI_DISABLE) $Progress1 = GUICtrlCreateProgress(8, 270, 150, 17) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### Global $Cancel = False HotKeySet("{Esc}", "_CancelUnpack") ;Creates a user-defined DLL Callback function to process Unrar events $hUnRAR_CallBack = DllCallbackRegister("_UnRARProc", "int", "uint;int;int;int") $OutputFolder = FileSelectFolder("Oyunun Kurulum Dosyaları Nereye Çıkartılsın?", "", 1) If $OutputFolder = "" Then Exit ;Retrieve comment from archive file $comment = _Rar_GetComment($ArchiveFile) ConsoleWrite("!> Arşiv Açıklaması: " & $comment & @LF) ;Open RAR archive and allocate memory structures $hArchive = _RAR_OpenArchive($ArchiveFile) If @error Then MsgBox(16, @error, "Arşiv Açma HATA'sı!") Exit EndIf ;Test the current archive file _Rar_TestArchive($hArchive) If @error Then MsgBox(16, "UnRAR", "Arşiv Testinde Hatamaydana Geldi") Exit Else MsgBox(64, "UnRAR", "Arşiv Başarı İle Test Edildi") EndIf ;Close RAR archive and release allocated memory _RAR_CloseArchive($hArchive) ;Set a password to decrypt files ;_RAR_SetPassword($hArchive, "MyPassword") ;Returns an integer value denoting UnRAR.dll API version ;_RAR_GetDllVersion() $hArchive = _RAR_OpenArchive($ArchiveFile) If @error Then MsgBox(16, "UnRAR", "Arşiv Açma HATA'sı!") Exit EndIf ;Set a user-defined callback function to process Unrar events _RAR_SetCallback($hArchive, $hUnRAR_CallBack) ;Read header of file in archive, performs action and moves the current position in the archive to the next file ;Also extract or test the current file from the archive _Rar_UnpackArchive($hArchive, $OutputFolder) If @error Then MsgBox(16, "UnRAR", "Arşiv Çıkartma HATA'sı!") Exit EndIf If $Cancel = True Then MsgBox(64, "UnRAR", "Çıkartma İşlemi İptal Edildi!") Else MsgBox(64, "Bitti", "Arşiv Çıkartıldı") EndIf DllCallbackFree($hUnRAR_CallBack) Func _CancelUnpack() $Cancel = True EndFunc Func _UnRARProc($Msg, $UserData, $P1, $P2) Switch $Msg Case $UCM_PROCESSDATA ;Return a positive value to continue process or -1 to cancel the archive operation If $Cancel = True Then Return -1 Case $UCM_NEEDPASSWORD ;DLL needs a password to process archive Local $iPassGet = InputBox("Şifre Girişi ßy LaZEnEs", "Lütfen Arşiv Şifresini Giriniz", "", "*", 300, 120) If $iPassGet = "" Then Return -1 ;If user cancelled password entering Local $PassBuffer = DllStructCreate("char[256]", $P1) DllStructSetData($PassBuffer, 1, $iPassGet) Return 1 Case $UCM_CHANGEVOLUME ;Process volume change If $P2 = $RAR_VOL_ASK Then ;Required volume is absent Local $iVolGet = InputBox("Bir Sonraki Part Gerekiyor.. ßy LaZEnEs", "Bir Sonraki DVD/CD'yi Takıp Sürücü Adresini Giriniz: ", @ScriptDir&$sonpartadi,"", 300, 120) If $iVolGet = "" Then Return -1 ;If user cancelled path entering Local $VolBuffer = DllStructCreate("char[256]", $P1) DllStructSetData($VolBuffer, 1, $iVolGet) Return 1 EndIf EndSwitch EndFunc Run($OutputFolder &"\"& $Kurulumdansonra) [/code] Quote Link to comment Share on other sites More sharing options...
Mehmet Posted November 16, 2011 Share Posted November 16, 2011 eğer dosyaların çok yüksek boyutta değilse fileinstall ile yapmanı tavsiye ederim hem UnRAR udf kullanmanada gerek kalmaz ozaman Quote Link to comment Share on other sites More sharing options...
blue_life Posted November 16, 2011 Share Posted November 16, 2011 Bunu niye winrarın sfx özelliği ile yapmıyorsun? O zaman parçaları otomatik çıkartacaktır zaten... Winrar sfxte pencere sitili değişitilebiliyordu galiba... Ayrıca ilgili kodların çalışması için unrar.dll dosyasına ihtiyacında bulunmakta! Quote Link to comment Share on other sites More sharing options...
Mehmet Posted November 16, 2011 Share Posted November 16, 2011 (edited) blue_life mantıklı söylüyor sfx çok başarılı bu konuda ama yok ben Unrar ile yapmak istiyorum dersende ilgili dosya ve udf belki lazım olur [b]Unrarudf ve içinde örneğiyle beraber[/b] [code]http://www.autoitscript.com/forum/index.php?app=core&module=attach§ion=attach&attach_id=21447[/code] [b]unrar.dll[/b] [code]http://www.autoitscript.com/forum/index.php?app=core&module=attach§ion=attach&attach_id=21446[/code] [b]Her ikisi Ekde[/b] Edited November 17, 2011 by MeHMeTBeN Quote Link to comment Share on other sites More sharing options...
lazenes1 Posted November 19, 2011 Author Share Posted November 19, 2011 autoIT de Cmd Komutlarını nasıl çalıştıra bilirim? Quote Link to comment Share on other sites More sharing options...
blue_life Posted November 19, 2011 Share Posted November 19, 2011 @lazenes1 Kısaca sana echo örnekleri vereyim. Bu sayede daha iyi kavrarsın! [codebox]Global $CMD_PARAM = "Echo Selam Millet && Echo Bu tün nasılsınız? && Echo. && Pause" RunWait(@ComSpec & ' /c ' & $CMD_PARAM, "", @SW_SHOW)[/codebox] Gizli çalıştırmak için, @SW_SHOW yerine @SW_HIDE kullanacaksın. Ama komutta pause olduğu için programın takılır. Bu yüzden pauseyi silmelisin. Yani; [codebox]Global $CMD_PARAM = "Echo Selam Millet && Echo Bu tün nasılsınız? && Echo." RunWait(@ComSpec & ' /c ' & $CMD_PARAM, "", @SW_HIDE)[/codebox] Eğer komutu çalıştırdıktan sonra cmd ekranının kapanmamasını istersen /c yerine /k yazmalısın. Yani; [codebox]Global $CMD_PARAM = "Echo Selam Millet && Echo Bu tün nasılsınız? && Echo. && Pause" RunWait(@ComSpec & ' /k ' & $CMD_PARAM, "", @SW_SHOW)[/codebox] Örneklerde [b]RunWait [/b]kullandığım için cmd işlemi bitene kadar bekliyoruz. Bekleme yapmak istemezsen [b]Run [/b]kullanırsın. [codebox]Global $CMD_PARAM = "Echo Selam Millet && Echo Bu tün nasılsınız? && Echo. && Pause" Run(@ComSpec & ' /c ' & $CMD_PARAM, "", @SW_SHOW) MsgBox(64,"","Alt satırlar...")[/codebox] vs. vs. gibi örnekleri çoğaltmak mümkün! Umarım açıklayıcı olmuştur... Quote Link to comment Share on other sites More sharing options...
MostWanted Posted November 19, 2011 Share Posted November 19, 2011 Fakat yapmak istediğin atıyorum cmd komutlarından ne bilim bi programı parametre ile çalıştırmaksa; Run("program.exe /s") gibi yapabilirsin. Quote Link to comment Share on other sites More sharing options...
g.a Posted November 19, 2011 Share Posted November 19, 2011 _RunDOS("komut buraya") Fakat CMD ekranı gözükmez Quote Link to comment Share on other sites More sharing options...
MostWanted Posted November 19, 2011 Share Posted November 19, 2011 _RunDos'u içinde barındıran Process.au3'te _RunDos komutunun içeriğine bakalım, ; #FUNCTION# ==================================================================================================================== ; Name...........: _RunDOS ; Description ...: Executes a DOS command in a hidden command window. ; Syntax.........: _RunDOS($sCommand) ; Parameters ....: $sCommand - Command to execute ; Return values .: Success - the exit code of the command ; Failure - 0 and sets @Error to non-zero ; Author ........: Jeremy Landes <jlandes at landeserve dot com> ; =============================================================================================================================== Func _RunDOS($sCommand) Local $nResult = RunWait(@ComSpec & " /C " & $sCommand, "", @SW_HIDE) Return SetError(@error, @extended, $nResult) EndFunc ;==>_RunDOS Ve şimdi bir üstte blue_life'ın verdiği örneğe bakıp karşılaştıralım?Hiç bi fark yok sadece @error dönüşü yapılmış.Fakat sadece bi komut için koskoca bi udf eklemek zorunda kalacaktık ki bu çok saçma olur değil mi? Quote Link to comment Share on other sites More sharing options...
lazenes1 Posted November 24, 2011 Author Share Posted November 24, 2011 Arkadaşlar Yeni Bir Sorum Var Resimdeki Div Alanını Form a nasıl çağıra Bilirim [img]http://www.tnctr.com/uploads/imgs/pre_1322139191__adsz.jpg[/img] Quote Link to comment Share on other sites More sharing options...
SimpsoN_Bart Posted November 27, 2011 Share Posted November 27, 2011 [font="Georgia"]Çalıştırılabilir program dosyaları için Run komutunu Kullanırız..Bunu yanında ShellExecute komutuda iş görür help dosyasında aratırsan ayrıntılı bilgi bulabilirsiniz.Kolay gelsin[/font] [codebox]Run(@WindowsDir & "\Notepad.exe", "", @SW_MINIMIZE) ;Min Run(@WindowsDir & "\Notepad.exe", "", @SW_HIDE) ;Hide[/codebox] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.