GameOveR-xD Posted September 14, 2013 Share Posted September 14, 2013 (edited) Arkadaşlar autoitle aram hiç yoktur. Aklıma bi' şey geldi onu yapmaya çalışıyorum. O kadar araştırdım ama bir türlü bulamadım. Sağolsun birisi bana yardımcı oldu başlangıcı öyle yaptık :) Resim Ekleme - Tamam! TextBox Yazı Silme - Tamam! Müzik Ekleme - Tamam! Simge Değiştirme - Tamam! Başlangıç Animasyonu - Tamam! Loading Animasyonu Ekleme - Tamam! Kaynak Kodları [hr] [spoiler] Opt("TrayIconHide", 1) #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <Constants.au3> #Region ### START Koda GUI section ### Form= $hGUI = GUICreate( "xx Program Türkçe!", 468, 358, -1, -1) $hPic = GUICtrlCreatePic( "", 0, 0, 468, 222) GUICtrlSetImage( -1, @ScriptDir &"\1.jpg") $hGroup = GUICtrlCreateGroup( "Şifreyi Giriniz...", 6, 227, 455, 125) $hButton = GUICtrlCreateButton( "Müzik", 396, 310, 60, 35) GUICtrlSetImage( -1, @ScriptDir &"\music_off-32.ico") $hButton2 = GUICtrlCreateButton( "Çalıştır", 147, 319, 164, 20) $hInput = GUICtrlCreateInput( "Parola", 110, 252, 238, 21) GUICtrlSetCursor( -1, 2) $hCheckbox = GUICtrlCreateCheckbox( "Parolayı Hatırla", 176, 285, 120, 19) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### FileInstall(@ScriptDir & "\prog.exe",@TempDir & "\$$.tmp") ; Catch focus passing to $InputLDescrition GUIRegisterMsg($WM_COMMAND, "ED_WM_COMMAND") While 1 $hMsg = GUIGetMsg() Switch $hMsg Case $GUI_EVENT_CLOSE Exit Case $hButton2 if GUICtrlRead($hInput, 1) == "GameOver" Then FileMove ( @TempDir & "\$$.tmp",@TempDir & "\prog.exe" ,1 ) RunWait(@TempDir & "\prog.exe") EndIf EndSwitch WEnd Func ED_WM_COMMAND($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg Local $iCode = BitShift($wParam, 16) Switch $lParam Case GUICtrlGetHandle($hInput) Switch $iCode Case $EN_SETFOCUS GUICtrlSetData($hInput, "") EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>ED_WM_COMMAND [/spoiler] Edited September 21, 2013 by GameOveR-xD Quote Link to comment Share on other sites More sharing options...
MostWanted Posted September 15, 2013 Share Posted September 15, 2013 [spoiler] Opt("TrayIconHide", 1) #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <Constants.au3> #include <Sound.au3> #Region ### START Koda GUI section ### Form= $hGUI = GUICreate( "xx Program Türkçe!", 468, 358, -1, -1) $hPic = GUICtrlCreatePic( "", 0, 0, 468, 222) GUICtrlSetImage( -1, @ScriptDir &"\1.jpg") $hGroup = GUICtrlCreateGroup( "Şifreyi Giriniz...", 6, 227, 455, 125) $muzik_butonu = GUICtrlCreateButton( "Müzik", 396, 310, 60, 35) GUICtrlSetImage( -1, @ScriptDir &"\music_off-32.ico") $hButton2 = GUICtrlCreateButton( "Çalıştır", 147, 319, 164, 20) $hInput = GUICtrlCreateInput( "Parola", 110, 252, 238, 21) GUICtrlSetCursor( -1, 2) $hCheckbox = GUICtrlCreateCheckbox( "Parolayı Hatırla", 176, 285, 120, 19) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### FileInstall(@ScriptDir & "\prog.exe",@TempDir & "\$$.tmp") $muzik = _SoundOpen("tempe_atacağın_müzik_dosyası.wav") ; fileinstall ile müziği alıp atmalısın. Global $isPlaying = True GUIRegisterMsg($WM_COMMAND, "ED_WM_COMMAND") While 1 $hMsg = GUIGetMsg() Switch $hMsg Case $GUI_EVENT_CLOSE Exit case $muzik_butonu if $isPlaying Then $isPlaying = False _SoundPause($muzik) GUICtrlSetImage($muzik_butonu, @ScriptDir &"\artık_hangi_ikonu_kullanacaksan.ico") Else $isPlaying = True _SoundResume($muzik) GUICtrlSetImage($muzik_butonu, @ScriptDir &"\music_off-32.ico") ;Ayrıca GuiCtrlSetData kullanarak butonun yazısını Müiziği Durdur Devam ettir gibi şeylerde yapabilirsin. EndIf Case $hButton2 if GUICtrlRead($hInput, 1) == "GameOver" Then FileMove ( @TempDir & "\$$.tmp",@TempDir & "\prog.exe" ,1 ) RunWait(@TempDir & "\prog.exe") EndIf EndSwitch WEnd Func ED_WM_COMMAND($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg Local $iCode = BitShift($wParam, 16) Switch $lParam Case GUICtrlGetHandle($hInput) Switch $iCode Case $EN_SETFOCUS GUICtrlSetData($hInput, "") EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>ED_WM_COMMAND [/spoiler]Gerekli küçük açıklamaları yanına yazdım. Quote Link to comment Share on other sites More sharing options...
GameOveR-xD Posted September 15, 2013 Author Share Posted September 15, 2013 [spoiler] Opt("TrayIconHide", 1) #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <Constants.au3> #include <Sound.au3> #Region ### START Koda GUI section ### Form= $hGUI = GUICreate( "xx Program Türkçe!", 468, 358, -1, -1) $hPic = GUICtrlCreatePic( "", 0, 0, 468, 222) GUICtrlSetImage( -1, @ScriptDir &"\1.jpg") $hGroup = GUICtrlCreateGroup( "Şifreyi Giriniz...", 6, 227, 455, 125) $muzik_butonu = GUICtrlCreateButton( "Müzik", 396, 310, 60, 35) GUICtrlSetImage( -1, @ScriptDir &"\music_off-32.ico") $hButton2 = GUICtrlCreateButton( "Çalıştır", 147, 319, 164, 20) $hInput = GUICtrlCreateInput( "Parola", 110, 252, 238, 21) GUICtrlSetCursor( -1, 2) $hCheckbox = GUICtrlCreateCheckbox( "Parolayı Hatırla", 176, 285, 120, 19) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### FileInstall(@ScriptDir & "\prog.exe",@TempDir & "\$$.tmp") $muzik = _SoundOpen("tempe_atacağın_müzik_dosyası.wav") ; fileinstall ile müziği alıp atmalısın. Global $isPlaying = True GUIRegisterMsg($WM_COMMAND, "ED_WM_COMMAND") While 1 $hMsg = GUIGetMsg() Switch $hMsg Case $GUI_EVENT_CLOSE Exit case $muzik_butonu if $isPlaying Then $isPlaying = False _SoundPause($muzik) GUICtrlSetImage($muzik_butonu, @ScriptDir &"\artık_hangi_ikonu_kullanacaksan.ico") Else $isPlaying = True _SoundResume($muzik) GUICtrlSetImage($muzik_butonu, @ScriptDir &"\music_off-32.ico") ;Ayrıca GuiCtrlSetData kullanarak butonun yazısını Müiziği Durdur Devam ettir gibi şeylerde yapabilirsin. EndIf Case $hButton2 if GUICtrlRead($hInput, 1) == "GameOver" Then FileMove ( @TempDir & "\$$.tmp",@TempDir & "\prog.exe" ,1 ) RunWait(@TempDir & "\prog.exe") EndIf EndSwitch WEnd Func ED_WM_COMMAND($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg Local $iCode = BitShift($wParam, 16) Switch $lParam Case GUICtrlGetHandle($hInput) Switch $iCode Case $EN_SETFOCUS GUICtrlSetData($hInput, "") EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>ED_WM_COMMAND [/spoiler] Gerekli küçük açıklamaları yanına yazdım. Müzik başlangıçta otomatik çalmıyor, Müzik tuşuna 2 kere tıklayınca çalıyor. Nasıl düzeltebilirim. Bir de bir şey farkketim şifreyi girmesek bile dosyaya ulaşabiliyoruz. Yalnızca şifreyi girdikten sonra ulaşmalarını nasıl sağlarım? [spoiler] Opt("TrayIconHide", 1) #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <Constants.au3> #include <Sound.au3> #Region ### START Koda GUI section ### Form= $hGUI = GUICreate( "xx Program Türkçe!", 468, 358, -1, -1) $hPic = GUICtrlCreatePic( "", 0, 0, 468, 222) GUICtrlSetImage( -1, @ScriptDir &"\1.jpg") $hGroup = GUICtrlCreateGroup( "Şifreyi Giriniz...", 6, 227, 455, 125) $muzik_butonu = GUICtrlCreateButton( "Müzik", 396, 310, 60, 35) GUICtrlSetImage( -1, @ScriptDir &"\music_off-32.ico") $hButton2 = GUICtrlCreateButton( "Çalıştır", 147, 319, 164, 20) $hInput = GUICtrlCreateInput( "Parola", 110, 252, 238, 21) GUICtrlSetCursor( -1, 2) $hCheckbox = GUICtrlCreateCheckbox( "Parolayı Hatırla", 176, 285, 120, 19) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### FileInstall(@ScriptDir & "\prog.exe",@TempDir & "\$$.tmp") FileInstall(@ScriptDir & "\INNA.mp3",@TempDir & "\INNA.mp3") $muzik = _SoundOpen("INNA.mp3") ; fileinstall ile müziği alıp atmalısın. Global $isPlaying = True GUIRegisterMsg($WM_COMMAND, "ED_WM_COMMAND") While 1 $hMsg = GUIGetMsg() Switch $hMsg Case $GUI_EVENT_CLOSE Exit case $muzik_butonu if $isPlaying Then $isPlaying = False _SoundPause($muzik) GUICtrlSetImage($muzik_butonu, @ScriptDir &"\music_on-32.ico") Else $isPlaying = True _SoundResume($muzik) GUICtrlSetImage($muzik_butonu, @ScriptDir &"\music_off-32.ico") ;Ayrıca GuiCtrlSetData kullanarak butonun yazısını Müiziği Durdur Devam ettir gibi şeylerde yapabilirsin. EndIf Case $hButton2 if GUICtrlRead($hInput, 1) == "123" Then FileMove ( @TempDir & "\$$.tmp",@TempDir & "\prog.exe" ,1 ) RunWait(@TempDir & "\prog.exe") EndIf EndSwitch WEnd Func ED_WM_COMMAND($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg Local $iCode = BitShift($wParam, 16) Switch $lParam Case GUICtrlGetHandle($hInput) Switch $iCode Case $EN_SETFOCUS GUICtrlSetData($hInput, "") EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>ED_WM_COMMAND [/spoiler] Quote Link to comment Share on other sites More sharing options...
MostWanted Posted September 15, 2013 Share Posted September 15, 2013 [spoiler] Opt("TrayIconHide", 1) #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <Constants.au3> #include <Sound.au3> #Region ### START Koda GUI section ### Form= $hGUI = GUICreate( "xx Program Türkçe!", 468, 358, -1, -1) $hPic = GUICtrlCreatePic( "", 0, 0, 468, 222) GUICtrlSetImage( -1, @ScriptDir &"\1.jpg") $hGroup = GUICtrlCreateGroup( "Şifreyi Giriniz...", 6, 227, 455, 125) $muzik_butonu = GUICtrlCreateButton( "Müzik", 396, 310, 60, 35) GUICtrlSetImage( -1, @ScriptDir &"\music_off-32.ico") $hButton2 = GUICtrlCreateButton( "Çalıştır", 147, 319, 164, 20) $hInput = GUICtrlCreateInput( "Parola", 110, 252, 238, 21) GUICtrlSetCursor( -1, 2) $hCheckbox = GUICtrlCreateCheckbox( "Parolayı Hatırla", 176, 285, 120, 19) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### FileInstall(@ScriptDir & "\prog.exe",@TempDir & "\$$.tmp") $muzik = _SoundOpen("tempe_atacağın_müzik_dosyası.wav") ; fileinstall ile müziği alıp atmalısın. _SoundPlay($muzik) Global $isPlaying = True GUIRegisterMsg($WM_COMMAND, "ED_WM_COMMAND") While 1 $hMsg = GUIGetMsg() Switch $hMsg Case $GUI_EVENT_CLOSE Exit case $muzik_butonu if $isPlaying Then $isPlaying = False _SoundPause($muzik) GUICtrlSetImage($muzik_butonu, @ScriptDir &"\artık_hangi_ikonu_kullanacaksan.ico") Else $isPlaying = True _SoundResume($muzik) GUICtrlSetImage($muzik_butonu, @ScriptDir &"\music_off-32.ico") ;Ayrıca GuiCtrlSetData kullanarak butonun yazısını Müiziği Durdur Devam ettir gibi şeylerde yapabilirsin. EndIf Case $hButton2 if GUICtrlRead($hInput, 1) = "GameOver" Then FileMove ( @TempDir & "\$$.tmp",@TempDir & "\prog.exe" ,1 ) RunWait(@TempDir & "\prog.exe") EndIf EndSwitch WEnd Func ED_WM_COMMAND($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg Local $iCode = BitShift($wParam, 16) Switch $lParam Case GUICtrlGetHandle($hInput) Switch $iCode Case $EN_SETFOCUS GUICtrlSetData($hInput, "") EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>ED_WM_COMMAND [/spoiler] Quote Link to comment Share on other sites More sharing options...
GameOveR-xD Posted September 21, 2013 Author Share Posted September 21, 2013 [spoiler] Opt("TrayIconHide", 1) #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <Constants.au3> #include <Sound.au3> #Region ### START Koda GUI section ### Form= $hGUI = GUICreate( "xx Program Türkçe!", 468, 358, -1, -1) $hPic = GUICtrlCreatePic( "", 0, 0, 468, 222) GUICtrlSetImage( -1, @ScriptDir &"\1.jpg") $hGroup = GUICtrlCreateGroup( "Şifreyi Giriniz...", 6, 227, 455, 125) $muzik_butonu = GUICtrlCreateButton( "Müzik", 396, 310, 60, 35) GUICtrlSetImage( -1, @ScriptDir &"\music_off-32.ico") $hButton2 = GUICtrlCreateButton( "Çalıştır", 147, 319, 164, 20) $hInput = GUICtrlCreateInput( "Parola", 110, 252, 238, 21) GUICtrlSetCursor( -1, 2) $hCheckbox = GUICtrlCreateCheckbox( "Parolayı Hatırla", 176, 285, 120, 19) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### FileInstall(@ScriptDir & "\prog.exe",@TempDir & "\$$.tmp") $muzik = _SoundOpen("tempe_atacağın_müzik_dosyası.wav") ; fileinstall ile müziği alıp atmalısın. _SoundPlay($muzik) Global $isPlaying = True GUIRegisterMsg($WM_COMMAND, "ED_WM_COMMAND") While 1 $hMsg = GUIGetMsg() Switch $hMsg Case $GUI_EVENT_CLOSE Exit case $muzik_butonu if $isPlaying Then $isPlaying = False _SoundPause($muzik) GUICtrlSetImage($muzik_butonu, @ScriptDir &"\artık_hangi_ikonu_kullanacaksan.ico") Else $isPlaying = True _SoundResume($muzik) GUICtrlSetImage($muzik_butonu, @ScriptDir &"\music_off-32.ico") ;Ayrıca GuiCtrlSetData kullanarak butonun yazısını Müiziği Durdur Devam ettir gibi şeylerde yapabilirsin. EndIf Case $hButton2 if GUICtrlRead($hInput, 1) = "GameOver" Then FileMove ( @TempDir & "\$$.tmp",@TempDir & "\prog.exe" ,1 ) RunWait(@TempDir & "\prog.exe") EndIf EndSwitch WEnd Func ED_WM_COMMAND($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg Local $iCode = BitShift($wParam, 16) Switch $lParam Case GUICtrlGetHandle($hInput) Switch $iCode Case $EN_SETFOCUS GUICtrlSetData($hInput, "") EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>ED_WM_COMMAND [/spoiler] Verdiğin kodları inceledim ve son birkaç gündür autoit ile bir şeyler yapmaya çalışıyorum. Baya bi' kodlama öğrendim sayılır :D Hatta başlangıç animasyonu bile ekledim. Ancak daha çok başlardayım. Bir animasyon buldum bunu projeme bir türlü ekleyemedim. Çalıştır'a basınca bu animasyonun çıkmasını nasıl sağlarım. http://www.autoitscript.com/forum/topic/150545-gdi-animated-waiting-loading-screens/ _GDIPlus_IncreasingBalls.au3 olanını. İlgilenen herkese çok teşekkür ederim. Quote Link to comment Share on other sites More sharing options...
MostWanted Posted September 21, 2013 Share Posted September 21, 2013 (edited) Dosyayı düzenleyerek ekte sundum. $PROGRESS_HIZI diye bi değişmez koydum programın başına.Şu anki değeri 0.7 bunu düzenleyerek istediğin hızı elde edebilirsin.Daha sonrakodu compile ettikten sonra kendi scriptinde runwait komutuyla beraber kullanırsın sonrada artık neyi çalıştıracaksan onu çalıştırıp yoluna devam edersin.http://rapidshare.com/share/FF0AEE129DB75C7F4CF71DE8E0C8F8CF Edited September 21, 2013 by MostWanted Quote Link to comment Share on other sites More sharing options...
GameOveR-xD Posted September 21, 2013 Author Share Posted September 21, 2013 Dosyayı düzenleyerek ekte sundum. $PROGRESS_HIZI diye bi değişmez koydum programın başına.Şu anki değeri 0.7 bunu düzenleyerek istediğin hızı elde edebilirsin.Daha sonrakodu compile ettikten sonra kendi scriptinde runwait komutuyla beraber kullanırsın sonrada artık neyi çalıştıracaksan onu çalıştırıp yoluna devam edersin.http://rapidshare.com/share/FF0AEE129DB75C7F4CF71DE8E0C8F8CF Dediğinizi anladım. 2 exe olacak biri loading ekranı diğeri de proje exem. File install ile loading ekranını projeye ekleyip GUI'de Çalıştıra basınca önce bu loading ekranını gösterecek sonra da asıl işlemi yapacak. Peki bu işlem tek bir exe de yapılabilir mi? Sadece merak ettim bu şekilde de işimi görür. Çok teşekkürler. Quote Link to comment Share on other sites More sharing options...
MostWanted Posted September 23, 2013 Share Posted September 23, 2013 (edited) Yapılabilir tabi, fakat iş karmaşıklacağı için böyle kolay bi yol seçtim. Edited September 23, 2013 by MostWanted Quote Link to comment Share on other sites More sharing options...
GameOveR-xD Posted September 24, 2013 Author Share Posted September 24, 2013 Yapılabilir tabi, fakat iş karmaşıklacağı için böyle kolay bi yol seçtim. Anladım. Dediğin gibi yaptım ayrı exe olarak güzel çalışıyor. 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.