oktay454 Posted February 27, 2013 Share Posted February 27, 2013 #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Crysis 3", 212, 77, 192, 124) $Group1 = GUICtrlCreateGroup("Language Select", 8, 8, 193, 57) $Language = GUICtrlCreateCombo("Language", 16, 32, 121, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL)) $Button1 = GUICtrlCreateButton("OK", 141, 30, 49, 25) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Selamün Aleyküm Arkadaşlar yukarıdaki GUI ekranını hazırladım ama pek beceremedim. Ben şimdi bu listeye türkçe ingilizce almanca falan ekleyip $Kur değişkenin içindeki $DilSec değişkenin yerine yazsın istiyorum. Mesela ben listeye Turkish diye seçtim ama $DilSec değişkenine tr_TR yazsın ve OK butonuna tıklayınca da $Kur değişkeni çalışsın. Olur mu böyle, bir yol gösterin lütfen. Birde RunWait komutunda çalıştırılacak uygulamaya nasıl parametre eklerim. Şimdiden teşekkürler. Allah(C.C.)'a emanet olun. Quote Link to comment Share on other sites More sharing options...
asmazh Posted February 27, 2013 Share Posted February 27, 2013 (edited) Öncelikle dil seçeneğini daha mantıklı bir standartta oturtmanı öneririm. Parametre gönderme olayını da ShellExecute fonksiyonuyla halledebilirsin. Gelen parametreleri de $CmdLine ile kontrol ederbilirsin. Kolay gelsin. Parametre Gönderme ShellExecute("Programınİsmi.exe", "Parametre", "Çalışma Dosyası") Gelen Parametreleri Kontrol Etme For $i = 1 To $CmdLine[0] MsgBox(0, $i, $CmdLine[$i]) Next Dil konusunda ne yapmak istediğini tam olarak anlamadım. Ama: #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #region ### START Koda GUI section ### Form= $Form1 = GUICreate("Crysis 3", 212, 77, 192, 124) $Group1 = GUICtrlCreateGroup("Language Select", 8, 8, 193, 57) $Language = GUICtrlCreateCombo("Dil", 16, 32, 121, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL)) GUICtrlSetData(-1, "Türkçe|İngilizce|Kürtçe") $Button1 = GUICtrlCreateButton("OK", 141, 30, 49, 25) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) #endregion ### END Koda GUI section ### Global $GlobalVariable_Language = "TR" While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Language Switch GUICtrlRead($Language) Case "Türkçe" $GlobalVariable_Language = "TR" Case "İngilizce" $GlobalVariable_Language = "EN" Case "Kürtçe" $GlobalVariable_Language = "KR" EndSwitch MsgBox(0, "", $GlobalVariable_Language) EndSwitch WEnd Edited February 27, 2013 by asmazh Quote Link to comment Share on other sites More sharing options...
oktay454 Posted February 28, 2013 Author Share Posted February 28, 2013 Öncelikle dil seçeneğini daha mantıklı bir standartta oturtmanı öneririm. Parametre gönderme olayını da ShellExecute fonksiyonuyla halledebilirsin. Gelen parametreleri de $CmdLine ile kontrol ederbilirsin. Kolay gelsin. Parametre Gönderme ShellExecute("Programınİsmi.exe", "Parametre", "Çalışma Dosyası") Gelen Parametreleri Kontrol Etme For $i = 1 To $CmdLine[0] MsgBox(0, $i, $CmdLine[$i]) Next Dil konusunda ne yapmak istediğini tam olarak anlamadım. Ama: #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #region ### START Koda GUI section ### Form= $Form1 = GUICreate("Crysis 3", 212, 77, 192, 124) $Group1 = GUICtrlCreateGroup("Language Select", 8, 8, 193, 57) $Language = GUICtrlCreateCombo("Dil", 16, 32, 121, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL)) GUICtrlSetData(-1, "Türkçe|İngilizce|Kürtçe") $Button1 = GUICtrlCreateButton("OK", 141, 30, 49, 25) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) #endregion ### END Koda GUI section ### Global $GlobalVariable_Language = "TR" While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Language Switch GUICtrlRead($Language) Case "Türkçe" $GlobalVariable_Language = "TR" Case "İngilizce" $GlobalVariable_Language = "EN" Case "Kürtçe" $GlobalVariable_Language = "KR" EndSwitch MsgBox(0, "", $GlobalVariable_Language) EndSwitch WEnd Bu mesajı yazdıktan sonra biraz kurcalayınca ShellExecute parametresini buldum. ShellExecuteWait(@ScriptDir&"\__Installer\Touchup.exe", "install -locale tr_TR -installPath "&@ScriptDir&" -autologging -startmenuIcon=1 -desktopIcon=1") Mesela kırmızı olarak belirttiğim tr_TR'yi menüden ingilizceyi seçince en_US olsun yada almancayı seçince de_DE olsun istiyorum. OK butonuna basınca da yukarıdaki ShellExecuteWait komutunu uygulasın. Bunu nasıl yapabilirim. Crysis 3 oyununu kendi arşivime atıcam fakat mevcut kurulum paketi hoşuma gitmedi. Kolay kurulumlu yapıcam ama AutoIt'i pek bilmiyorum. Kendi yaptığım GUI ise Koda FormDesigner'da yapmaya çalışmıştım. Quote Link to comment Share on other sites More sharing options...
asmazh Posted February 28, 2013 Share Posted February 28, 2013 Dostum AutoIt bilgim az diyorsun, her şeyi devletten bekliyorsun. Önce bir şeyler yap, takıldığın yerleri bize sor. Onun dışında sana yardım edemeyiz. :( Quote Link to comment Share on other sites More sharing options...
oktay454 Posted February 28, 2013 Author Share Posted February 28, 2013 Dostum AutoIt bilgim az diyorsun, her şeyi devletten bekliyorsun. Önce bir şeyler yap, takıldığın yerleri bize sor. Onun dışında sana yardım edemeyiz. :( Yardımın için teşekkürler. Sağol:) Quote Link to comment Share on other sites More sharing options...
oktay454 Posted February 28, 2013 Author Share Posted February 28, 2013 #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #region ### START Koda GUI section ### Form= $Form1 = GUICreate("Crysis 3", 212, 77, 192, 124) $Group1 = GUICtrlCreateGroup("Dil Seç", 8, 8, 193, 57) $Language = GUICtrlCreateCombo("Dil", 16, 32, 121, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL)) GUICtrlSetData(-1, "Türkçe|İngilizce|Almanca") $Button1 = GUICtrlCreateButton("OK", 141, 30, 49, 25) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) #endregion ### END Koda GUI section ### Global $GlobalVariable_Language = "TR" While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Language Switch GUICtrlRead($Language) Case "Türkçe" $Dil = "Türkçe" $GlobalVariable_Language = "tr_TR" Case "İngilizce" $Dil = "İngilizce" $GlobalVariable_Language = "en_US" Case "Almanca" $Dil = "Almanca" $GlobalVariable_Language = "de_DE" EndSwitch MsgBox(0,"Crysis 3 Kurulum", $Dil&" olarak yükleniyor...") ShellExecuteWait(@ScriptDir&"\__Installer\Touchup.exe", "install -locale "&$GlobalVariable_Language&" -installPath "&@ScriptDir&" -autologging -startmenuIcon=1 -desktopIcon=1") MsgBox(0,"Crysis 3 Kurulum", $Dil&" olarak yüklendi.") EndSwitch WEnd Kodu böyle değiştirdim. Fakat dili seçtiğimde direk komutu uyguluyor. OK'a bastığımda nasıl uygulatabilirim. Quote Link to comment Share on other sites More sharing options...
MostWanted Posted February 28, 2013 Share Posted February 28, 2013 "case $language" kısmını "case $Button1" olarak değiştir 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.