ty2d Posted February 16, 2006 Share Posted February 16, 2006 (edited) Hello, i'm a newbie to autoit and right now i'm trying to make a admin tool which will help our helpdesk fullfilling their service to our customer. because we've got several settlements here in the german region (the emea hq and the german hq) i want to make the gui multilingual (english and german) so if a user works on a english machine he'll get the english gui and on german machines the german gui. my code for this looks like: $strOsLanguage = @OSLang $strLGerman = "0407" If $strOsLanguage = $strLGerman Then #include <german.au3> Else #include <english.au3> EndIf $mNetwork = GUICtrlCreateMenu ($_network_) $msPing = GUICtrlCreateMenuitem ($_ping_, $mNetwork) $msNetPerf = GUICtrlCreateMenuitem ($_netperf_, $mNetwork) $mSystem = GUICtrlCreateMenu ($_system_) $msCmdPrompt = GUICtrlCreateMenuitem ($_cmd_, $mSystem) $msComputer = GUICtrlCreateMenuitem ($_manage_, $mSystem) The vars $_xxx_ are the language variables who are defined in the files german.au3 and english.au3 as Global Const. The If Else works, but the compiler gives me the following error message: ERROR: $_network_ previously declared as a 'Const' Global Const $_network_ = "Network" $_ping_ previously declared as a 'Const' Global Const $_ping_ = "Ping" and so on any hints for me? or is my approach wrong? rgds ty2d Edited February 16, 2006 by ty2d Link to comment Share on other sites More sharing options...
Nuffilein805 Posted February 16, 2006 Share Posted February 16, 2006 you've declared those 2 variables as const seems like autoit doesn't like that very much you could do an ini-file instead of your 2 extra-scripts from where the gui gets the descriptions deine 2 variablen haste zu konstanten gemacht - scheinbar findet das autoit net so toll du könntest das ganze 2sprachige auch über ein ini-file machen dann sparst du dir die 2 extr-scripts hast allerdings ein ini-file mehr my little chatmy little encryption toolmy little hidermy unsafe clickbot Link to comment Share on other sites More sharing options...
ty2d Posted February 16, 2006 Author Share Posted February 16, 2006 you've declared those 2 variables as constseems like autoit doesn't like that very muchyou could do an ini-file instead of your 2 extra-scripts from where the gui gets the descriptionsdeine 2 variablen haste zu konstanten gemacht - scheinbar findet das autoit net so tolldu könntest das ganze 2sprachige auch über ein ini-file machen dann sparst du dir die 2 extr-scripts hast allerdings ein ini-file mehrhm, could you give me an example how to do that? Link to comment Share on other sites More sharing options...
ty2d Posted February 16, 2006 Author Share Posted February 16, 2006 ah, ok, got it by myself. thx for the help 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