Hallo ihr,
ich bin's mal wieder ...
Ich hab gerade so ein Problem mit Arrays. Dort habe ich mehrsprachig die Pfade, Namen und Beschreibungen auf Deutsch/Englisch gespeichert. Allerdings habe ich da so ein Problem beim Auslesen. Komischerweise zeigt sich da immer der im Array zuletzt definierte Eintrag.
Irgendwie bin ich zu dumm den Fehler zu finden, vielleicht schafft's ja wer von euch.
AutoIt
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Icon=Icons\pc.ico
#AutoIt3Wrapper_Outfile=Main.exe
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
; -- Created with ISN Form Studio 2 for ISN AutoIt Studio -- ;
#NoTrayIcon
#include <StaticConstants.au3>
#include <Array.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Include <GuiButton.au3>
; Better language support overview
Dim $Apps[6][3][2]
$Apps["CalUI"]["Description"]["de"] = "Eine einfache Kalenderoberfläche."
$Apps["CalUI"]["Description"]["en"] = "A little calendar interface."
$Apps["Fileman"]["Description"]["de"] = "Ein Dateimanager in Baumansicht (mit Öffnen-Funktion)."
$Apps["Fileman"]["Description"]["en"] = "A File-Manager in Tree-View (open-function included)."
$Apps["Timer"]["Description"]["de"] = "Ein einfaches Timer-Programm mit Countdown-Funktion."
$Apps["Timer"]["Description"]["en"] = "An easy timer with countdown function."
$Apps["Memo"]["Description"]["de"] = "Mit Memo können Sie Notizen speichern und später öffnen."
$Apps["Memo"]["Description"]["en"] = "Memo allows you to save and later open notes."
$Apps["Desktop"]["Description"]["de"] = "Erstellen Sie einen Screenshot Ihres Desktops."
$Apps["Desktop"]["Description"]["en"] = "Create a JPG snapshot of your desktop."
$Apps["Help"]["Description"]["de"] = "Informationen und Hilfe zu dieser Desktop-Workstation-Edition."
$Apps["Help"]["Description"]["en"] = "Information and help for this Desktop-WS edition."
$Apps["CalUI"]["File"]["de"] = "data\de\calui.exe"
$Apps["CalUI"]["File"]["en"] = "data\en\calui.exe"
$Apps["Fileman"]["File"]["de"] = "data\de\FileExplorer.exe"
$Apps["Fileman"]["File"]["en"] = "data\en\FileExplorer.exe"
$Apps["Timer"]["File"]["de"] = "data\de\Timer.exe"
$Apps["Timer"]["File"]["en"] = "data\en\Timer.exe"
$Apps["Memo"]["File"]["de"] = "data\de\Memo.exe"
$Apps["Memo"]["File"]["en"] = "data\en\Memo.exe"
$Apps["Desktop"]["File"]["de"] = "data\de\catchMyDesktop.exe"
$Apps["Desktop"]["File"]["en"] = "data\en\catchMyDesktop.exe"
$Apps["CalUI"]["Name"]["de"] = "Kalender"
$Apps["CalUI"]["Name"]["en"] = "Calendar"
$Apps["Fileman"]["Name"]["de"] = "Datei-Manager"
$Apps["Fileman"]["Name"]["en"] = "File Manager"
$Apps["Timer"]["Name"]["de"] = "Timer"
$Apps["Timer"]["Name"]["en"] = "Timer"
$Apps["Memo"]["Name"]["de"] = "Kurznotizen ('Memo')"
$Apps["Memo"]["Name"]["en"] = "Notes ('Memo')"
$Apps["Desktop"]["Name"]["de"] = "CatchMyDesktop"
$Apps["Desktop"]["Name"]["en"] = "CatchMyDesktop"
If @OSLang <> "0407" Then
$language = "en"
Else
$language = "de"
EndIf
Func _ShellExecute($sPath)
ShellExecute($sPath)
EndFunc
SoundPlay("start.wav")
$Main = GUICreate("Olfibits Desktop Workstation 2.0 Starter Edition",700,500,-1,-1,-1,-1)
$BGimage = GUICtrlCreatePic(@scriptdir&"\"&"Images\bg.bmp",0,0,700,500,$WS_CLIPSIBLINGS)
guictrlsetstate(-1,$GUI_DISABLE)
GUICtrlSetFont(-1,15,400,0,"MS Sans Serif")
GUICtrlSetBkColor(-1,"0xFFFFDF")
$DateTime = GUICtrlCreateLabel("--.--.--",175,485,350,15,$SS_CENTER,-1)
;$DateTime = GUICtrlCreateLabel(".",190,540,798,21,$SS_RIGHT,-1)
GUICtrlSetFont(-1,9,400,0,"MS Sans Serif")
GUICtrlSetBkColor(-1,"0xFFFFDF")
GUICtrlCreateLabel("App",520,0,180,41,$SS_CENTER,-1)
GUICtrlSetFont(-1,20,600,4,"Segoe UI Semibold")
GUICtrlSetBkColor(-1,"0xFFFFFF")
$AppName = GUICtrlCreateLabel("App:",520,41,180,15,-1,-1)
GUICtrlSetBkColor(-1,"0xFFFFFF")
$Timer = GUICtrlCreateButton("Timer",10,10,125,125,$BS_ICON,-1)
GUICtrlSetFont(-1,20,400,0,"Segoe UI")
GUICtrlSetImage(-1,@scriptdir&"\"&"Icons\timer.ico",1,1)
$Description = GUICtrlCreateLabel("Beschreibung:",520,56,180,138,-1,-1)
GUICtrlSetBkColor(-1,"0xFFFFFF")
$Run = GUICtrlCreateButton("Gewählte App starten",520,194,180,30,-1,-1)
$CalUI = GUICtrlCreateButton("Calendar",142,145,125,125,$BS_ICON,-1)
GUICtrlSetFont(-1,20,400,0,"Segoe UI")
GUICtrlSetImage(-1,@scriptdir&"\"&"Icons\cal.ico",1,1)
$FileMan = GUICtrlCreateButton("File Manager",10,145,125,125,$BS_ICON,-1)
GUICtrlSetFont(-1,20,400,0,"Segoe UI")
GUICtrlSetImage(-1,@scriptdir&"\"&"Icons\fileman.ico",1,1)
$Desktop = GUICtrlCreateButton("Snapshot",142,10,125,125,$BS_ICON,-1)
GUICtrlSetFont(-1,20,400,0,"Segoe UI")
GUICtrlSetImage(-1,@scriptdir&"\"&"Icons\desktop.ico",1,1)
$Memo = GUICtrlCreateButton("Notizen",271,10,125,125,$BS_ICON,-1)
GUICtrlSetFont(-1,20,400,0,"Segoe UI")
GUICtrlSetImage(-1,@scriptdir&"\"&"Icons\file.ico",1,1)
$Help = GUICtrlCreateButton("Informationen",271,145,125,125,$BS_ICON,-1)
GUICtrlSetFont(-1,20,400,0,"Segoe UI")
GUICtrlSetImage(-1,@scriptdir&"\"&"Icons\help.ico",1,1)
$Exit = GUICtrlCreateButton("Beenden",522,446,180,54,$BS_ICON,-1)
GUICtrlSetFont(-1,20,400,0,"Segoe UI")
GUICtrlSetImage(-1,@scriptdir&"\"&"Icons\shutdown.ico",1,1)
GUISetstate(@SW_SHOW)
AdlibRegister("_Update", 1000)
Func _Update()
If $language = "de" Then
GUICtrlSetData($dateTime, @MDAY&"."&@MON&"."&@YEAR&", "&@HOUR&":"&@MIN&":"&@SEC)
Else
$op = "th"
Switch @MDAY
Case "01"
$op = "st"
Case "02"
$op = "nd"
Case "03"
$op = "rd"
EndSwitch
Switch @MON
Case "01"
$Mon = "January"
Case "02"
$Mon = "February"
Case "03"
$Mon = "March"
Case "04"
$Mon = "April"
Case "05"
$Mon = "May"
Case "06"
$Mon = "June"
Case "07"
$Mon = "July"
Case "08"
$Mon = "August"
Case "09"
$Mon = "September"
Case "10"
$Mon = "October"
Case "11"
$Mon = "November"
Case "12"
$Mon = "December"
EndSwitch
GUICtrlSetData($dateTime, @MDAY&$op&" of "&$Mon&" "&@YEAR&", "&@HOUR&":"&@MIN&":"&@SEC)
EndIf
EndFunc
Func App($appN)
If $appN = "" Then
MsgBox(16, "Error", "Internal error. No app specified.")
Else
; MsgBox(0, "", '$Apps["'&$appN&']["Name"]["'&$language&'"]' & " = "& $Apps[$appN]["Name"][$language]) ; <== da hakt's auch schon
GUICtrlSetData($AppName, "App: "& $Apps[$appN]["Name"][$language]); <== und da erst recht
$CurrentApp = $Apps[$appN]["Name"][$language]
EndIf
EndFunc
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
SoundPlay("stop.wav")
GUIDelete()
Sleep(3000)
Exit
Case $Exit
SoundPlay("stop.wav")
GUIDelete()
Sleep(3000)
Exit
Case $CalUI
App("CalUI")
Case $Memo
App("Memo")
Case $Fileman
App("Fileman")
Case $timer
App("Timer")
case $Desktop
App("Desktop")
case $Help
If $language = "en" Then
MsgBox(64, "About Olfibits Desktop Workstation 2.0 Starter Edition", "This edition is a starter edition of Olfibits Desktop Workstation and a test version of this project. That's why not too many features and files are included. Obtain a higher edition for better features.")
Else
MsgBox(64, "Über Olfibits Desktop Workstation 2.0 Starter Edition", "Diese Variante ist eine Einsteiger-Variante von Olfibits Desktop Workstation und eine Testversion für dieses Projekt. Daher sind nur sehr wenige Funktionen eingebunden. Erwerben Sie sich eine höhere Version für bessere Programme und Funktionen.")
EndIf
EndSwitch
WEnd
Alles anzeigen
Vielen Dank im Voraus!
olfibits