I am working on a program in autoit. Unfortunately, I am getting problems in the following multiple conditions phase:
Here is my full code:
My code:
#include <GUIConstantsEx.au3>
#include <MsgBoxConstants.au3>
Example()
Func Example()
; Create a GUI
Local $hGUI = GUICreate("my program", 300, 200)
; Create a combobox control.
Local $idComboBox = GUICtrlCreateCombo("", 10, 10, 185, 20)
Local $idButton = GUICtrlCreateButton("Activate", 210, 140, 85, 25)
Local $idButton_Close = GUICtrlCreateButton("Close", 210, 170, 85, 25)
; Add additional items to the combobox.
GUICtrlSetData($idComboBox, "Arabic|French|English", "Arabic")
; Display the GUI.
GUISetState(@SW_SHOW, $hGUI)
Local $sComboRead = ""
; Loop until the user exits.
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE, $idButton_Close
ExitLoop
Case $idButton
$sComboRead = GUICtrlRead($idComboBox)
; defining language codes
if $sComboRead = "Arabic" then $slktar = "ar-MA"
if $sComboRead = "French" then $slktfr = "fr-FR"
if $sComboRead = "English" then $slkten = "en-US"
local $slktlng = @ComSpec & " /K " & '"' & @ScriptDir & "\bin\prog.exe enable_language " ;main operation witout the addinional language code
case $slktar
Run($slktlng & " " & $slktar, @ScriptDir & "\bin\", @SW_HIDE) ; starting main operation + arabic language code
case $slktfr
Run($slktlng & " " & $slktfr, @ScriptDir & "\bin\", @SW_HIDE) ; starting main operation + french language code
case $slkten
Run($slktlng & " " & $slkten, @ScriptDir & "\bin\", @SW_HIDE) ; starting main operation + english language code
EndSwitch
WEnd
GUIDelete($hGUI)
EndFunc
I have no idea of it. Any help would be very much appreciated.