wander Posted July 24, 2009 Share Posted July 24, 2009 Hello. I have create an language select menu, i want when the user selects Spanish, the spanish GUI to show up, when the English is selected the English GUI to show up. This is what i've done so far #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <IE.au3> $Form = GUICreate("Choose Your Language", 440, 96, 293, 204) GUISetBkColor(0x747474) $Language = GUICtrlCreateCombo("", 288, 32, 145, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL)) GUICtrlSetData(-1, "English|Spanish") $Label1 = GUICtrlCreateLabel("Choose Your Language//Seleccione lenguaje", 0, 32, 263, 17) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x00FFFF) $Continue = GUICtrlCreateButton("Continue", 168, 64, 83, 25, 0) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x00FFFF) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Continue EndSwitch WEnd Help me please. Link to comment Share on other sites More sharing options...
somdcomputerguy Posted July 24, 2009 Share Posted July 24, 2009 (edited) Use Switch GUICtrlRead($Language) to determine what to do for which selection has been selected Edited July 24, 2009 by snowmaker - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
wander Posted July 24, 2009 Author Share Posted July 24, 2009 How i don't understand sry? Link to comment Share on other sites More sharing options...
bogQ Posted July 24, 2009 Share Posted July 24, 2009 (edited) expandcollapse popup#include <ButtonConstants.au3> #include <ComboConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <IE.au3> $Form = GUICreate("Choose Your Language", 440, 96, 293, 204) GUISetBkColor(0x747474) $Language = GUICtrlCreateCombo("", 288, 32, 145, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL)) GUICtrlSetData(-1, "English|Spanish") $Label1 = GUICtrlCreateLabel("Choose Your Language//Seleccione lenguaje", 0, 32, 263, 17) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x00FFFF) $Continue = GUICtrlCreateButton("Continue", 168, 64, 83, 25, 0) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x00FFFF) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Select Case $nMsg = $GUI_EVENT_CLOSE Exit Case $nMsg = $Continue Case $nMsg = $Language $lg = GUICtrlRead ($Language) Select Case $lg = "English" GUICtrlSetData($Continue,"Continue") GUICtrlSetData($Label1,"Choose Your Language//Seleccione lenguaje") WinSetTitle($Form,"","Choose Your Language") Case $lg = "Spanish" GUICtrlSetData($Continue,"Continuar") GUICtrlSetData($Label1,"Seleccione lenguaje//Choose Your Language") WinSetTitle($Form,"","Elija su idioma") EndSelect EndSelect WEnd something like this Edited July 24, 2009 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
wander Posted July 25, 2009 Author Share Posted July 25, 2009 Thank you guys, you realy helped me. Can you tell me how can i make it: When i select the English Language, the form appears, but the language selection form is still there, how can i make it to close after i choose? Link to comment Share on other sites More sharing options...
bogQ Posted July 25, 2009 Share Posted July 25, 2009 Thank you guys, you realy helped me. Can you tell me how can i make it: When i select the English Language, the form appears, but the language selection form is still there, how can i make it to close after i choose? Define 'make it close' posible solutions if i understand While 1 $nMsg = GUIGetMsg() Select Case $nMsg = $GUI_EVENT_CLOSE Exit Case $nMsg = $Continue Case $nMsg = $Language $lg = GUICtrlRead ($Language) Select Case $lg = "English" GUICtrlSetData($Continue,"Continue") GUICtrlSetData($Label1,"Choose Your Language") GUICtrlSetState($Language,$GUI_HIDE) WinSetTitle($Form,"","Choose Your Language") Case $lg = "Spanish" GUICtrlSetData($Continue,"Continuar") GUICtrlSetData($Label1,"Seleccione lenguaje") GUICtrlSetState($Language,$GUI_HIDE) WinSetTitle($Form,"","Elija su idioma") EndSelect EndSelect WEnd or GUICtrlSetState($Language,$GUI_DISABLE) TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
wander Posted July 25, 2009 Author Share Posted July 25, 2009 The Language form is not closing (exiting) after i press Continu/Continuarexpandcollapse popup#include <ButtonConstants.au3> #include <ComboConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <IE.au3> Global Const $Ini = @ScriptDir & "\Settings.ini" Global Const $dir = IniReadSection($ini, "Directory") Local $SavePath $Form = GUICreate("Choose Your Language", 440, 96, 293, 204) GUISetBkColor(0x747474) $Language = GUICtrlCreateCombo("", 288, 32, 145, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL)) GUICtrlSetData(-1, "English|Spanish") $Continue = GUICtrlCreateButton("Continue", 168, 64, 83, 25, 0) $Label1 = GUICtrlCreateLabel("Choose Your Language//Seleccione lenguaje", 0, 32, 263, 17) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x00FFFF) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x00FFFF) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Select Case $nMsg = $GUI_EVENT_CLOSE Exit Case $nMsg = $Continue $check = GuiCtrlRead($Continue) Select Case $check = "Continue" English() Case $check = "Continuar" Spanish() EndSelect Case $nMsg = $Language $lg = GUICtrlRead ($Language) Select Case $lg = "English" GUICtrlSetData($Continue,"Continue") GUICtrlSetData($Label1,"Choose Your Language") GUICtrlSetState($Language,$GUI_HIDE) WinSetTitle($Form,"","Choose Your Language") Case $lg = "Spanish" GUICtrlSetData($Continue,"Continuar") GUICtrlSetData($Label1,"Seleccione lenguaje") GUICtrlSetState($Language,$GUI_HIDE) WinSetTitle($Form,"","Elija su idioma") EndSelect EndSelect WEnd Func English() $FormEnglish = GUICreate("Vitality Aion Launcher by Crowen", 798, 624, 190, 120) $Pic1 = GUICtrlCreatePic("C:\Documents and Settings\Administrator\My Documents\Моите получени файлове\Launcher Background.JPG", 0, 0, 796, 620, 0) If FileExists ($ini) Then $SavePath = GUICtrlCreateInput(IniRead($Ini, "Vitality Aion Directory", "Directory", ""), 8, 552, 201, 21) Else $SavePath = GUICtrlCreateInput("", 8, 552, 201, 21) EndIf $Browser = GUICtrlCreateButton("...", 248, 552, 43, 17, 0) GUICtrlSetBkColor(-1, 0x808080) GUICtrlSetCursor (-1, 0) $Vote = GUICtrlCreateButton("Vote", 528, 520, 75, 25, 0) GUICtrlSetFont(-1, 8, 800, 2, "MS Sans Serif") GUICtrlSetColor(-1, 0x00FFFF) GUICtrlSetBkColor(-1, 0x878787) GUICtrlSetCursor (-1, 0) $WebPage = GUICtrlCreateButton("Web Page", 528, 544, 75, 25, 0) GUICtrlSetFont(-1, 8, 800, 2, "MS Sans Serif") GUICtrlSetColor(-1, 0x00FFFF) GUICtrlSetBkColor(-1, 0x878787) GUICtrlSetCursor (-1, 0) $Forum = GUICtrlCreateButton("Forum", 528, 568, 75, 25, 0) GUICtrlSetFont(-1, 8, 800, 2, "MS Sans Serif") GUICtrlSetColor(-1, 0x00FFFF) GUICtrlSetBkColor(-1, 0x878787) GUICtrlSetCursor (-1, 0) $Launch = GUICtrlCreateButton("Launch Vitality Aion", 272, 584, 155, 25, 0) GUICtrlSetFont(-1, 10, 800, 0, "Verdana") GUICtrlSetColor(-1, 0x00FFFF) GUICtrlSetBkColor(-1, 0xBEBEBE) GUICtrlSetCursor (-1, 0) $Pic2 = GUICtrlCreatePic("C:\Documents and Settings\Administrator\Desktop\selectdir - eng.jpg", 8, 528, 292, 20, 0) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Vote VoteEng() Case $WebPage WebPage() Case $Forum Forum() Case $Launch Launch() Case $Browser $get = FileSelectFolder('Please select a directory', @DesktopDir, 5, GUICtrlRead($SavePath), $Form) If Not @error Then GUICtrlSetData($SavePath, $get) IniWrite($Ini, "Vitality Aion Directory", "Directory", GUICtrlRead($SavePath)) EndIf EndSwitch WEnd EndFunc Func Launch() EndFunc Func Spanish() $FormSpain = GUICreate("Vitality Aion Launcher por Crowen", 800, 622, 190, 120) $Pic1 = GUICtrlCreatePic("C:\Documents and Settings\Administrator\My Documents\Моите получени файлове\Launcher Background.JPG", 0, 0, 796, 620) GUICtrlCreateInput("", 8, 552, 201, 21) $Browser = GUICtrlCreateButton("...", 248, 552, 43, 17, 0) GUICtrlSetBkColor(-1, 0x808080) $Vote = GUICtrlCreateButton("Vota", 512, 520, 91, 25, 0) GUICtrlSetFont(-1, 8, 800, 2, "MS Sans Serif") GUICtrlSetColor(-1, 0x00FFFF) GUICtrlSetBkColor(-1, 0x878787) GUICtrlSetCursor (-1, 0) $WebPage = GUICtrlCreateButton("Pagina oficial", 512, 544, 91, 25, 0) GUICtrlSetFont(-1, 8, 800, 2, "MS Sans Serif") GUICtrlSetColor(-1, 0x00FFFF) GUICtrlSetBkColor(-1, 0x878787) GUICtrlSetCursor (-1, 0) $Forum = GUICtrlCreateButton("Foro", 512, 568, 91, 25, 0) GUICtrlSetFont(-1, 8, 800, 2, "MS Sans Serif") GUICtrlSetColor(-1, 0x00FFFF) GUICtrlSetBkColor(-1, 0x878787) GUICtrlSetCursor (-1, 0) $Launch = GUICtrlCreateButton("Jugar Vitality Aion", 272, 584, 155, 25, 0) GUICtrlSetFont(-1, 10, 800, 0, "Verdana") GUICtrlSetColor(-1, 0x00FFFF) GUICtrlSetBkColor(-1, 0xBEBEBE) $Pic2 = GUICtrlCreatePic("C:\Documents and Settings\Administrator\Desktop\selectdir - spanish.jpg", 8, 528, 292, 20, 0) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd EndFunc Link to comment Share on other sites More sharing options...
bogQ Posted July 25, 2009 Share Posted July 25, 2009 i see now what you need While 1 $nMsg = GUIGetMsg() Select Case $nMsg = $GUI_EVENT_CLOSE Exit Case $nMsg = $Continue $check = GuiCtrlRead($Continue) Select Case $check = "Continue" GUIDelete($Form) English() Case $check = "Continuar" GUIDelete($Form) Spanish() EndSelect Case $nMsg = $Language $lg = GUICtrlRead ($Language) Select Case $lg = "English" GUICtrlSetData($Continue,"Continue") GUICtrlSetData($Label1,"Choose Your Language") WinSetTitle($Form,"","Choose Your Language") Case $lg = "Spanish" GUICtrlSetData($Continue,"Continuar") GUICtrlSetData($Label1,"Seleccione lenguaje") WinSetTitle($Form,"","Elija su idioma") EndSelect EndSelect WEnd TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
wander Posted July 25, 2009 Author Share Posted July 25, 2009 (edited) Thank man you realy helped me. One final question. I have a vote GUI. I want to make SOMEthing like this Vote ( button, when you have clicked it, the button becomes grey, and you can vote again after 12 hours, below the button it () it will say you can vote again after 12hours,11hours etc) can you help me ? Edited July 25, 2009 by wander Link to comment Share on other sites More sharing options...
bogQ Posted July 25, 2009 Share Posted July 25, 2009 youl need _Timer_Diff for that Example #include <Timers.au3> If IniRead("test.ini", "test1", "time", "NotFound") = "" Then IniWrite("test.ini", "test1", "time", _Timer_Init()) EndIf HotKeySet("{ESC}", "_Quit") $starttime = IniRead("test.ini", "test1", "time", "NotFound") While 1 $d = StringSplit(_Timer_Diff($starttime),".") ToolTip(StringLeft($d[1],StringLen($d[1])-3)) If _Timer_Diff($starttime) > 12*1000 Then ;for 12h its If _Timer_Diff($starttime) > 12*60*60*1000 IniWrite("test.ini", "test1", "time", _Timer_Init()) $starttime = IniRead("test.ini", "test1", "time", "NotFound") EndIf WEnd Func _Quit() Exit EndFunc ;==>_Quit test.ini [test1] time= TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
wander Posted July 25, 2009 Author Share Posted July 25, 2009 i am big noob in autoit how can i apply it to this script, so the buttons to activate only per 12 hours ? expandcollapse popupFunc VoteEng() $VoteForm = GUICreate("Vitality Aion Launcher - Voting Addon by Crowen", 422, 584, 193, 122) GUISetIcon("D:\003.ico") FileInstall("C:\Documents and Settings\Administrator\My Documents\Reciver Files\votingaddon.bmp", @TempDir & "\votingaddon.bmp") FileInstall("C:\Documents and Settings\Administrator\Desktop\Vit Aion Vote Addon\Vote Pics\Top Of Games.gif", @TempDir & "\Top Of Games.gif") FileInstall("C:\Documents and Settings\Administrator\Desktop\Vit Aion Vote Addon\Vote Pics\XtremeTop100.jpg", @TempDir & "\XtremeTop100.jpg") FileInstall("C:\Documents and Settings\Administrator\Desktop\Vit Aion Vote Addon\Vote Pics\Aion Top List.bmp", @TempDir & "\Aion Top List.bmp") FileInstall("C:\Documents and Settings\Administrator\Desktop\Vit Aion Vote Addon\Vote Pics\Aion Top 200.gif", @TempDir & "\Aion Top 200.gif") FileInstall("C:\Documents and Settings\Administrator\Desktop\Vit Aion Vote Addon\Vote Pics\Aion Top.bmp", @TempDir & "\Aion Top.bmp") FileInstall("C:\Documents and Settings\Administrator\Desktop\Vit Aion Vote Addon\Vote Pics\MMO Top 250.bmp", @TempDir & "\MMO Top 250.bmp") $Pic1 = GUICtrlCreatePic(@TempDir & "\votingaddon.bmp", 0, 0, 420, 580, 0) $Pic2 = GUICtrlCreatePic(@TempDir & "\Top Of Games.gif", 152, 256, 100, 44, 0) $Pic3 = GUICtrlCreatePic(@TempDir & "\XtremeTop100.jpg", 24, 256, 100, 44, 0) $Pic4 = GUICtrlCreatePic(@TempDir & "\Aion Top List.bmp", 24, 392, 100, 44, 0) $Pic5 = GUICtrlCreatePic(@TempDir & "\Aion Top 200.gif", 152, 392, 100, 44, 0) $Pic6 = GUICtrlCreatePic(@TempDir & "\Aion Top.bmp", 280, 392, 100, 44, 0) $Pic7 = GUICtrlCreatePic(@TempDir & "\MMO Top 250.bmp", 280, 256, 100, 44, 0) $Button1 = GUICtrlCreateButton("Vote", 40, 328, 75, 25, 0) GUICtrlSetBkColor(-1, 0xB4B4B4) GUICtrlSetCursor (-1, 0) $Button2 = GUICtrlCreateButton("Vote", 168, 464, 75, 25, 0) GUICtrlSetBkColor(-1, 0x878787) GUICtrlSetCursor (-1, 0) $Button3 = GUICtrlCreateButton("Vote", 296, 328, 75, 25, 0) GUICtrlSetBkColor(-1, 0x878787) GUICtrlSetCursor (-1, 0) $Button4 = GUICtrlCreateButton("Vote", 40, 464, 75, 25, 0) GUICtrlSetBkColor(-1, 0x878787) GUICtrlSetCursor (-1, 0) $Button5 = GUICtrlCreateButton("Vote", 168, 328, 75, 25, 0) GUICtrlSetBkColor(-1, 0x878787) GUICtrlSetCursor (-1, 0) $Button6 = GUICtrlCreateButton("Vote", 296, 464, 75, 25, 0) GUICtrlSetBkColor(-1, 0x878787) GUICtrlSetCursor (-1, 0) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 Xtreme() Case $Button2 AionTop200() Case $Button3 MMOTop() Case $Button4 AionTopList() Case $Button5 TopOfGames() Case $Button6 AionTop() EndSwitch WEnd EndFunc Link to comment Share on other sites More sharing options...
wander Posted July 26, 2009 Author Share Posted July 26, 2009 >_< nobody can help me Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now