; AutoIt Version: 3.3.0.0 ; Language : multilanguage ; Author : Michael Meyer (michaelm_007) ; e-Mail : email.address@gmx.de ; License : http://creativecommons.org/licenses/by-nc-sa/3.0/ ; Version : 2.3.9 ; Download : http://www.vbox.me ; Support : http://www.german-nlite.org/wbb/index.php?page=Thread&threadID=28 #include #include #include #NoTrayIcon #RequireAdmin Opt ("GUIOnEventMode", 1) Opt ("TrayAutoPause", 0) Opt ("TrayMenuMode", 1) Opt ("TrayOnEventMode", 1) TraySetClick (16) TraySetState () TraySetToolTip ("Portable-VirtualBox") Global $var1 = @ScriptDir&"\data\settings\settings.ini" Global $var2 = @ScriptDir&"\data\language\" If FileExists (@ScriptDir&"\app32\") AND FileExists (@ScriptDir&"\app64\") Then If @ProcessorArch = "x86" Then Global $arch = "app32" Else Global $arch = "app64" EndIf Else If NOT FileExists (@ScriptDir&"\app32\") AND NOT FileExists (@ScriptDir&"\app64\") Then Global $arch = "app" EndIf If FileExists (@ScriptDir&"\app32\") AND NOT FileExists (@ScriptDir&"\app64\") Then Global $arch = "app32" EndIf If NOT FileExists (@ScriptDir&"\app32\") AND FileExists (@ScriptDir&"\app64\") Then Global $arch = "app64" EndIf EndIf If FileExists (@ScriptDir&"\data\.VirtualBox\VirtualBox.xml") AND FileExists (@ScriptDir&"\data\.VirtualBox\Machines\") AND (FileExists (@ScriptDir&"\data\.VirtualBox\VDI\") OR FileExists (@ScriptDir&"\data\.VirtualBox\HardDisks\")) Then $file = FileOpen (@ScriptDir&"\data\.VirtualBox\VirtualBox.xml", 128) If $file <> -1 Then $line = FileRead ($file) $values0 = _StringBetween ($line, '', '') $values1 = _StringBetween ($values0[0], 'src="', '"') $values2 = _StringBetween ($line, '', '') $values3 = _StringBetween ($values2[0], 'filePath="', '"') $values4 = _StringBetween ($values2[0], 'location="', '"') For $i = 0 To UBound ($values1) - 1 $values5 = _StringBetween ($values1[$i], 'Machines', '.xml') If $values5 <> 0 Then $content = FileRead (FileOpen (@ScriptDir&"\data\.VirtualBox\VirtualBox.xml", 128)) $file = FileOpen (@ScriptDir&"\data\.VirtualBox\VirtualBox.xml", 2) FileWrite ($file, StringReplace ($content, $values1[$i], "Machines" & $values5[0] & ".xml")) FileClose ($file) EndIf Next For $j = 0 To UBound ($values3) - 1 $values6 = _StringBetween ($values3[$j], 'VDI', '.vdi') If $values6 <> 0 Then $content = FileRead (FileOpen (@ScriptDir&"\data\.VirtualBox\VirtualBox.xml", 128)) $file = FileOpen (@ScriptDir&"\data\.VirtualBox\VirtualBox.xml", 2) FileWrite ($file, StringReplace ($content, $values3[$j], "VDI" & $values6[0] & ".vdi")) FileClose ($file) EndIf Next For $k = 0 To UBound ($values4) - 1 $values7 = _StringBetween ($values4[$k], 'HardDisks', '.vdi') If $values7 <> 0 Then $content = FileRead (FileOpen (@ScriptDir&"\data\.VirtualBox\VirtualBox.xml", 128)) $file = FileOpen (@ScriptDir&"\data\.VirtualBox\VirtualBox.xml", 2) FileWrite ($file, StringReplace ($content, $values4[$k], "HardDisks" & $values7[0] & ".vdi")) FileClose ($file) EndIf Next For $l = 0 To UBound ($values4) - 1 $values8 = _StringBetween ($values4[$l], 'VDI', '.vdi') If $values8 <> 0 Then $content = FileRead (FileOpen (@ScriptDir&"\data\.VirtualBox\VirtualBox.xml", 128)) $file = FileOpen (@ScriptDir&"\data\.VirtualBox\VirtualBox.xml", 2) FileWrite ($file, StringReplace ($content, $values4[$l], "VDI" & $values8[0] & ".vdi")) FileClose ($file) EndIf Next For $m = 0 To UBound ($values4) - 1 $values9 = _StringBetween ($values4[$m], 'Machines', '.vdi') If $values9 <> 0 Then $content = FileRead (FileOpen (@ScriptDir&"\data\.VirtualBox\VirtualBox.xml", 128)) $file = FileOpen (@ScriptDir&"\data\.VirtualBox\VirtualBox.xml", 2) FileWrite ($file, StringReplace ($content, $values4[$m], "Machines" & $values9[0] & ".vdi")) FileClose ($file) EndIf Next For $n = 0 To UBound ($values3) - 1 $values10 = _StringBetween ($values3[$n], 'Machines', '.vdi') If $values10 <> 0 Then $content = FileRead (FileOpen (@ScriptDir&"\data\.VirtualBox\VirtualBox.xml", 128)) $file = FileOpen (@ScriptDir&"\data\.VirtualBox\VirtualBox.xml", 2) FileWrite ($file, StringReplace ($content, $values3[$n], "Machines" & $values10[0] & ".vdi")) FileClose ($file) EndIf Next FileClose ($file) EndIf EndIf If FileExists (@ScriptDir&"\"& $arch & "\VirtualBox.exe") AND FileExists (@ScriptDir&"\"& $arch & "\VirtualBox.exe") AND FileExists (@ScriptDir&"\"& $arch & "\VBoxSVC.exe") Then If NOT ProcessExists ("VirtualBox.exe") OR NOT ProcessExists ("VBoxManage.exe") Then If NOT FileExists ($var1) Then DirCreate (@ScriptDir&"\data\settings") IniWrite ($var1, "hotkeys", "key", "1") IniWrite ($var1, "hotkeys", "userkey", "0") IniWrite ($var1, "hotkeys", "01", "^") IniWrite ($var1, "hotkeys", "02", "^") IniWrite ($var1, "hotkeys", "03", "^") IniWrite ($var1, "hotkeys", "04", "^") IniWrite ($var1, "hotkeys", "05", "^") IniWrite ($var1, "hotkeys", "06", "^") IniWrite ($var1, "hotkeys", "07", "") IniWrite ($var1, "hotkeys", "08", "") IniWrite ($var1, "hotkeys", "09", "") IniWrite ($var1, "hotkeys", "10", "") IniWrite ($var1, "hotkeys", "11", "") IniWrite ($var1, "hotkeys", "12", "") IniWrite ($var1, "hotkeys", "13", "") IniWrite ($var1, "hotkeys", "14", "") IniWrite ($var1, "hotkeys", "15", "") IniWrite ($var1, "hotkeys", "16", "") IniWrite ($var1, "hotkeys", "17", "") IniWrite ($var1, "hotkeys", "18", "") IniWrite ($var1, "hotkeys", "19", "1") IniWrite ($var1, "hotkeys", "20", "2") IniWrite ($var1, "hotkeys", "21", "3") IniWrite ($var1, "hotkeys", "22", "4") IniWrite ($var1, "hotkeys", "23", "5") IniWrite ($var1, "hotkeys", "24", "6") IniWrite ($var1, "language", "key", "english") IniWrite ($var1, "userhome", "key", "%CD%\data\.VirtualBox") IniWrite ($var1, "startvm", "key", "") EndIf If FileExists (@ScriptDir&"\data\settings\SplashScreen.jpg") Then SplashImageOn ("Portable-VirtualBox", @ScriptDir&"\data\settings\SplashScreen.jpg", 480, 360, -1, -1, 1) Else SplashTextOn ("Portable-VirtualBox", "Start Portable-VirtualBox", 220, 40, -1, -1, 1, "arial", 12) EndIf Global $lng = IniRead ($var1, "language", "key", "NotFound") If IniRead ($var1, "hotkeys", "key", "NotFound") = 1 Then HotKeySet (IniRead ($var1, "hotkeys", "01", "NotFound") & IniRead ($var1, "hotkeys", "07", "NotFound") & IniRead ($var1, "hotkeys", "13", "NotFound") & IniRead ($var1, "hotkeys", "19", "NotFound"), "ShowWindows_VM") HotKeySet (IniRead ($var1, "hotkeys", "02", "NotFound") & IniRead ($var1, "hotkeys", "08", "NotFound") & IniRead ($var1, "hotkeys", "14", "NotFound") & IniRead ($var1, "hotkeys", "20", "NotFound"), "HideWindows_VM") HotKeySet (IniRead ($var1, "hotkeys", "03", "NotFound") & IniRead ($var1, "hotkeys", "09", "NotFound") & IniRead ($var1, "hotkeys", "15", "NotFound") & IniRead ($var1, "hotkeys", "21", "NotFound"), "ShowWindows") HotKeySet (IniRead ($var1, "hotkeys", "04", "NotFound") & IniRead ($var1, "hotkeys", "10", "NotFound") & IniRead ($var1, "hotkeys", "16", "NotFound") & IniRead ($var1, "hotkeys", "22", "NotFound"), "HideWindows") HotKeySet (IniRead ($var1, "hotkeys", "05", "NotFound") & IniRead ($var1, "hotkeys", "11", "NotFound") & IniRead ($var1, "hotkeys", "17", "NotFound") & IniRead ($var1, "hotkeys", "23", "NotFound"), "Settings") HotKeySet (IniRead ($var1, "hotkeys", "06", "NotFound") & IniRead ($var1, "hotkeys", "12", "NotFound") & IniRead ($var1, "hotkeys", "18", "NotFound") & IniRead ($var1, "hotkeys", "24", "NotFound"), "ExitScript") Local $ctrl1, $ctrl2, $ctrl3, $ctrl4, $ctrl5, $ctrl6 Local $alt1, $alt2, $alt3, $alt4, $alt5, $alt6 Local $shift1, $shift2, $shift3, $shift4, $shift5, $shift6 Local $plus01, $plus02, $plus03, $plus04, $plus05, $plus06, $plus07, $plus08, $plus09, $plus10, $plus11, $plus12, $plus13, $plus14, $plus15, $plus16, $plus17, $plus18 If IniRead ($var1, "hotkeys", "01", "NotFound") = "^" Then $ctrl1 = "CTRL" $plus01 = "+" EndIf If IniRead ($var1, "hotkeys", "02", "NotFound") = "^" Then $ctrl2 = "CTRL" $plus02 = "+" EndIf If IniRead ($var1, "hotkeys", "03", "NotFound") = "^" Then $ctrl3 = "CTRL" $plus03 = "+" EndIf If IniRead ($var1, "hotkeys", "04", "NotFound") = "^" Then $ctrl4 = "CTRL" $plus04 = "+" EndIf If IniRead ($var1, "hotkeys", "05", "NotFound") = "^" Then $ctrl5 = "CTRL" $plus05 = "+" EndIf If IniRead ($var1, "hotkeys", "06", "NotFound") = "^" Then $ctrl6 = "CTRL" $plus06 = "+" EndIf If IniRead ($var1, "hotkeys", "07", "NotFound") = "!" Then $alt1 = "ALT" $plus07 = "+" EndIf If IniRead ($var1, "hotkeys", "08", "NotFound") = "!" Then $alt2 = "ALT" $plus08 = "+" EndIf If IniRead ($var1, "hotkeys", "09", "NotFound") = "!" Then $alt3 = "ALT" $plus09 = "+" EndIf If IniRead ($var1, "hotkeys", "10", "NotFound") = "!" Then $alt4 = "ALT" $plus10 = "+" EndIf If IniRead ($var1, "hotkeys", "11", "NotFound") = "!" Then $alt5 = "ALT" $plus11 = "+" EndIf If IniRead ($var1, "hotkeys", "12", "NotFound") = "!" Then $alt6 = "ALT" $plus12 = "+" EndIf If IniRead ($var1, "hotkeys", "13", "NotFound") = "+" Then $shift1 = "SHIFT" $plus13 = "+" EndIf If IniRead ($var1, "hotkeys", "14", "NotFound") = "+" Then $shift2 = "SHIFT" $plus14 = "+" EndIf If IniRead ($var1, "hotkeys", "15", "NotFound") = "+" Then $shift3 = "SHIFT" $plus15 = "+" EndIf If IniRead ($var1, "hotkeys", "16", "NotFound") = "+" Then $shift4 = "SHIFT" $plus16 = "+" EndIf If IniRead ($var1, "hotkeys", "17", "NotFound") = "+" Then $shift5 = "SHIFT" $plus17 = "+" EndIf If IniRead ($var1, "hotkeys", "18", "NotFound") = "+" Then $shift6 = "SHIFT" $plus18 = "+" EndIf TrayCreateItem (IniRead ($var2 & $lng &".ini", "tray", "01", "NotFound") &" (" & $ctrl1 & $plus01 & $alt1 & $plus07 & $shift1 & $plus13 & IniRead ($var1, "hotkeys", "19", "NotFound") & ")") TrayItemSetOnEvent (-1, "ShowWindows_VM") TrayCreateItem (IniRead ($var2 & $lng &".ini", "tray", "02", "NotFound") &" (" & $ctrl2 & $plus02 & $alt2 & $plus08 & $shift2 & $plus14 & IniRead ($var1, "hotkeys", "20", "NotFound") & ")") TrayItemSetOnEvent (-1, "HideWindows_VM") TrayCreateItem ("") TrayCreateItem (IniRead ($var2 & $lng &".ini", "tray", "03", "NotFound") &" (" & $ctrl3 & $plus03 & $alt3 & $plus09 & $shift3 & $plus15 & IniRead ($var1, "hotkeys", "21", "NotFound") & ")") TrayItemSetOnEvent (-1, "ShowWindows") TrayCreateItem (IniRead ($var2 & $lng &".ini", "tray", "04", "NotFound") &" (" & $ctrl4 & $plus04 & $alt4 & $plus10 & $shift4 & $plus16 & IniRead ($var1, "hotkeys", "22", "NotFound") & ")") TrayItemSetOnEvent (-1, "HideWindows") TrayCreateItem ("") TrayCreateItem (IniRead ($var2 & $lng &".ini", "tray", "05", "NotFound") &" (" & $ctrl5 & $plus05 & $alt5 & $plus11 & $shift5 & $plus17 & IniRead ($var1, "hotkeys", "23", "NotFound") & ")") TrayItemSetOnEvent (-1, "Settings") TrayCreateItem ("") TrayCreateItem (IniRead ($var2 & $lng &".ini", "tray", "06", "NotFound") &" (" & $ctrl6 & $plus06 & $alt6 & $plus12 & $shift6 & $plus18 & IniRead ($var1, "hotkeys", "24", "NotFound") & ")") TrayItemSetOnEvent (-1, "ExitScript") TraySetState () Else TrayCreateItem (IniRead ($var2 & $lng &".ini", "tray", "01", "NotFound")) TrayItemSetOnEvent (-1, "ShowWindows_VM") TrayCreateItem (IniRead ($var2 & $lng &".ini", "tray", "02", "NotFound")) TrayItemSetOnEvent (-1, "HideWindows_VM") TrayCreateItem ("") TrayCreateItem (IniRead ($var2 & $lng &".ini", "tray", "03", "NotFound")) TrayItemSetOnEvent (-1, "ShowWindows") TrayCreateItem (IniRead ($var2 & $lng &".ini", "tray", "04", "NotFound")) TrayItemSetOnEvent (-1, "HideWindows") TrayCreateItem ("") TrayCreateItem (IniRead ($var2 & $lng &".ini", "tray", "05", "NotFound")) TrayItemSetOnEvent (-1, "Settings") TrayCreateItem ("") TrayCreateItem (IniRead ($var2 & $lng &".ini", "tray", "06", "NotFound")) TrayItemSetOnEvent (-1, "ExitScript") TraySetState () EndIf If @ProcessorArch = "x86" Then If NOT FileExists(@SystemDir&"\msvcp71.dll") OR NOT FileExists(@SystemDir&"\msvcr71.dll") OR NOT FileExists(@SystemDir&"\msvcrt.dll") Then FileCopy(@ScriptDir&"\app32\msvcp71.dll", @SystemDir, 9) FileCopy(@ScriptDir&"\app32\msvcp71.dll", @SystemDir, 9) FileCopy(@ScriptDir&"\app32\msvcp71.dll", @SystemDir, 9) Global $msv = 1 Else Global $msv = 0 EndIf EndIf If @ProcessorArch = "x64" Then If NOT FileExists(@WindowsDir&"\SysWOW64\msvcp80.dll") OR NOT FileExists(@WindowsDir&"\SysWOW64\msvcr80.dll") Then FileCopy(@ScriptDir&"\app64\msvcp80.dll", @WindowsDir&"\SysWOW64", 9) FileCopy(@ScriptDir&"\app64\msvcr80.dll", @WindowsDir&"\SysWOW64", 9) Global $msv = 2 Else Global $msv = 0 EndIf EndIf If FileExists (@ScriptDir&"\"& $arch &"\") AND FileExists (@ScriptDir&"\vboxadditions\") Then FileMove (@ScriptDir&"\vboxadditions\doc\*.*", @ScriptDir&"\"& $arch &"\doc\", 9) FileMove (@ScriptDir&"\vboxadditions\guestadditions\*.*", @ScriptDir&"\"& $arch &"\", 9) FileMove (@ScriptDir&"\vboxadditions\nls\*.*", @ScriptDir&"\"& $arch &"\nls\", 9) Endif RunWait ("cmd /c sc create PortableVBoxDRV binpath= ""%CD%\"& $arch &"\drivers\VBoxDrv\VBoxDrv.sys"" type= kernel start= auto error= normal displayname= PortableVBoxDRV", @ScriptDir, @SW_HIDE) RunWait ("cmd /c sc create PortableVBoxUSBMon binpath= ""%CD%\"& $arch &"\drivers\USB\filter\VBoxUSBMon.sys"" type= kernel start= auto error= normal displayname= PortableVBoxUSBMon", @ScriptDir, @SW_HIDE) If RegRead ("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\VBoxUSB", "DisplayName") <> "VirtualBox USB" Then RunWait ("cmd /c sc create VBoxUSB binpath= ""%CD%\"& $arch &"\drivers\USB\device\VBoxUSB.sys"" type= kernel start= auto error= normal displayname= PortableVBoxUSB", @ScriptDir, @SW_HIDE) Global $USB = 1 Else Global $USB = 0 EndIf RunWait ($arch&"\VBoxSVC.exe /reregserver", @ScriptDir, @SW_HIDE) RunWait ("regsvr32.exe /S "&$arch&"\VBoxC.dll", @ScriptDir, @SW_HIDE) DllCall ($arch&"\VBoxRT.dll", "hwnd", "RTR3Init") RunWait ("sc start PortableVBoxDRV", @ScriptDir, @SW_HIDE) RunWait ("sc start PortableVBoxUSBMon", @ScriptDir, @SW_HIDE) If $USB = 1 Then RunWait ("sc query VBoxUSB", @ScriptDir, @SW_HIDE) EndIf SplashOff () If $CmdLine[0] = 1 Then If FileExists (@ScriptDir&"\data\.VirtualBox") Then $UserHome = IniRead ($var1, "userhome", "key", "NotFound") $StartVM = $CmdLine[1] If IniRead ($var1, "userhome", "key", "NotFound") = "%CD%\data\.VirtualBox" AND (FileExists (@ScriptDir&"\data\.VirtualBox\VDI\"&$CmdLine[1]&".vdi") OR FileExists (@ScriptDir&"\data\.VirtualBox\HardDisks\"&$CmdLine[1]&".vdi")) Then RunWait ("cmd /c set VBOX_USER_HOME="& $UserHome &"& .\"& $arch &"\VBoxManage.exe startvm """& $StartVM &"""" , @ScriptDir, @SW_HIDE) Else RunWait ("cmd /c set VBOX_USER_HOME="& $UserHome &"& .\"& $arch &"\VirtualBox.exe", @ScriptDir, @SW_HIDE) EndIf Else RunWait ("cmd /c set VBOX_USER_HOME=%CD%\data\.VirtualBox & .\"& $arch &"\VirtualBox.exe", @ScriptDir, @SW_HIDE) EndIf ProcessWaitClose ("VirtualBox.exe") ProcessWaitClose ("VBoxManage.exe") Else If FileExists (@ScriptDir&"\data\.VirtualBox") Then $UserHome = IniRead ($var1, "userhome", "key", "NotFound") $StartVM = IniRead ($var1, "startvm", "key", "NotFound") If IniRead ($var1, "startvm", "key", "NotFound") = true Then RunWait ("cmd /C set VBOX_USER_HOME="& $UserHome &"& .\"& $arch &"\VBoxManage.exe startvm """& $StartVM &"""" , @ScriptDir, @SW_HIDE) Else RunWait ("cmd /c set VBOX_USER_HOME="& $UserHome &"& .\"& $arch &"\VirtualBox.exe", @ScriptDir, @SW_HIDE) EndIf Else RunWait ("cmd /c set VBOX_USER_HOME=%CD%\data\.VirtualBox & .\"& $arch &"\VirtualBox.exe", @ScriptDir, @SW_HIDE) EndIf ProcessWaitClose ("VirtualBox.exe") ProcessWaitClose ("VBoxManage.exe") EndIf SplashTextOn ("Portable-VirtualBox", "Exit Portable-VirtualBox", 220, 40, -1, -1, 1, "arial", 12) ProcessWaitClose ("VBoxSVC.exe") Sleep (4000) $PID = ProcessExists ("VBoxSVC.exe") If $PID Then ProcessClose ($PID) RunWait ("sc stop PortableVBoxDRV", @ScriptDir, @SW_HIDE) RunWait ("sc stop PortableVBoxUSBMon", @ScriptDir, @SW_HIDE) If $USB = 1 Then RunWait ("sc stop VBoxUSB", @ScriptDir, @SW_HIDE) EndIf RunWait ($arch&"\VBoxSVC.exe /unregserver", @ScriptDir, @SW_HIDE) RunWait ("regsvr32.exe /S /U "&$arch&"\VBoxC.dll", @ScriptDir, @SW_HIDE) RunWait ("sc delete PortableVBoxDRV", @ScriptDir, @SW_HIDE) RunWait ("sc delete PortableVBoxUSBMon", @ScriptDir, @SW_HIDE) If $USB = 1 Then RunWait ("sc delete VBoxUSB", @ScriptDir, @SW_HIDE) EndIf If RegRead ("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\VBoxUSB", "DisplayName") <> "VirtualBox USB" Then RunWait ("sc stop VBoxUSB", @ScriptDir, @SW_HIDE) RunWait ("sc delete VBoxUSB", @ScriptDir, @SW_HIDE) EndIf If FileExists (@ScriptDir&"\"& $arch &"\") AND FileExists (@ScriptDir&"\vboxadditions\") Then FileMove (@ScriptDir&"\"& $arch &"\doc\", @ScriptDir&"\vboxadditions\doc\", 9) FileMove (@ScriptDir&"\"& $arch &"\*.iso", @ScriptDir&"\vboxadditions\guestadditions\", 9) FileMove (@ScriptDir&"\"& $arch &"\nls\", @ScriptDir&"\vboxadditions\nls\", 9) FileDelete (@ScriptDir&"\"& $arch &"\*.iso") DirRemove (@ScriptDir&"\"& $arch &"\doc\", 1) DirRemove (@ScriptDir&"\"& $arch &"\nls\", 1) EndIf If $msv = 1 Then FileDelete(@SystemDir&"\msvcp71.dll") FileDelete(@SystemDir&"\msvcp71.dll") FileDelete(@SystemDir&"\msvcp71.dll") EndIf If $msv = 2 Then FileDelete(@WindowsDir&"\SysWOW64\msvcp80.dll") FileDelete(@WindowsDir&"\SysWOW64\msvcr80.dll") EndIf SplashOff () Else WinSetState ("Sun xVM VirtualBox", "", BitAND (@SW_SHOW, @SW_RESTORE)) WinSetState ("] - Sun xVM VirtualBox", "", BitAND (@SW_SHOW, @SW_RESTORE)) EndIf Else SplashOff () MsgBox (0, IniRead ($var2 & $lng &".ini", "messages", "01", "NotFound"), IniRead ($var2 & $lng &".ini", "start", "01", "NotFound")) EndIf Break (1) Exit Func ShowWindows_VM () Opt ("WinTitleMatchMode", 2) WinSetState ("] - Sun xVM VirtualBox", "", BitAND (@SW_SHOW, @SW_RESTORE)) EndFunc Func HideWindows_VM () Opt ("WinTitleMatchMode", 2) WinSetState ("] - Sun xVM VirtualBox", "", @SW_HIDE) EndFunc Func ShowWindows () Opt ("WinTitleMatchMode", 3) WinSetState ("Sun xVM VirtualBox", "", BitAND (@SW_SHOW, @SW_RESTORE)) EndFunc Func HideWindows () Opt ("WinTitleMatchMode", 3) WinSetState ("Sun xVM VirtualBox", "", @SW_HIDE) EndFunc Func Settings () Opt ("GUIOnEventMode", 1) Local $WS_POPUP Global $Radio1, $Radio2, $Radio3, $Radio4, $Radio5, $Radio6, $Radio7, $Radio8, $HomeRoot, $VMStart, $StartLng Global $Checkbox01, $Checkbox02, $Checkbox03, $Checkbox04, $Checkbox05, $Checkbox06, $Checkbox07, $Checkbox08, $Checkbox09 Global $Checkbox10, $Checkbox11, $Checkbox12, $Checkbox13, $Checkbox14, $Checkbox15, $Checkbox16, $Checkbox17, $Checkbox18 Global $Input1, $Input2, $Input3, $Input4, $Input5, $Input6 GUICreate (IniRead ($var2 & $lng &".ini", "settings-label", "01", "NotFound"), 578, 318, 193, 125, $WS_POPUP) GUISetFont (9, 400, 0, "Arial") GUISetBkColor (0xFFFFFF) GUICtrlSetFont (-1, 10, 800, 0, "Arial") GUICtrlCreateTab (0, 0, 577, 296) GUICtrlCreateTabItem (IniRead ($var2 & $lng &".ini", "homeroot-settings", "01", "NotFound")) GUICtrlCreateLabel (IniRead ($var2 & $lng &".ini", "homeroot-settings", "02", "NotFound"), 16, 40, 546, 105) $Radio1 = GUICtrlCreateRadio ("Radio01", 20, 153, 17, 17) If IniRead ($var1, "userhome", "key", "NotFound") = "%CD%\data\.VirtualBox" Then GUICtrlSetState (-1, $GUI_CHECKED) EndIf $Radio2 = GUICtrlCreateRadio ("Radio02", 20, 185, 17, 17) If IniRead ($var1, "userhome", "key", "NotFound") <> "%CD%\data\.VirtualBox" Then GUICtrlSetState (-1, $GUI_CHECKED) EndIf GUICtrlCreateLabel (IniRead ($var2 & $lng &".ini", "homeroot-settings", "03", "NotFound"), 36, 153, 524, 21) GUICtrlCreateLabel (IniRead ($var2 & $lng &".ini", "homeroot-settings", "04", "NotFound"), 36, 185, 180, 21) If IniRead ($var1, "userhome", "key", "NotFound") = "%CD%\data\.VirtualBox" Then $HomeRoot = GUICtrlCreateInput (IniRead ($var2 & $lng &".ini", "homeroot-settings", "05", "NotFound"), 220, 185, 249, 21) Else $User_Home = IniRead ($var1, "userhome", "key", "NotFound") $HomeRoot = GUICtrlCreateInput ($User_Home, 220, 185, 249, 21) EndIf GUICtrlCreateButton (IniRead ($var2 & $lng &".ini", "homeroot-settings", "06", "NotFound"), 476, 185, 81, 21, 0) GUICtrlSetOnEvent (-1, "SRCUserHome") GUICtrlCreateButton (IniRead ($var2 & $lng &".ini", "messages", "02", "NotFound"), 112, 240, 129, 25, 0) GUICtrlSetOnEvent (-1, "OKUserHome") GUICtrlCreateButton (IniRead ($var2 & $lng &".ini", "messages", "03", "NotFound"), 336, 240, 129, 25, 0) GUICtrlSetOnEvent (-1, "ExitGUI") GUICtrlCreateTabItem (IniRead ($var2 & $lng &".ini", "startvm-settings", "01", "NotFound")) GUICtrlCreateLabel (IniRead ($var2 & $lng &".ini", "startvm-settings", "02", "NotFound"), 16, 40, 546, 105) $Radio3 = GUICtrlCreateRadio ("Radio3", 20, 153, 17, 17) If IniRead ($var1, "startvm", "key", "NotFound") = false Then GUICtrlSetState (-1, $GUI_CHECKED) EndIf $Radio4 = GUICtrlCreateRadio ("Radio4", 20, 185, 17, 17) If IniRead ($var1, "startvm", "key", "NotFound") = true Then GUICtrlSetState (-1, $GUI_CHECKED) EndIf GUICtrlCreateLabel (IniRead ($var2 & $lng &".ini", "startvm-settings", "03", "NotFound"), 36, 153, 524, 21) GUICtrlCreateLabel (IniRead ($var2 & $lng &".ini", "startvm-settings", "04", "NotFound"), 36, 185, 180, 21) If IniRead ($var1, "startvm", "key", "NotFound") = false Then $VMStart = GUICtrlCreateInput (IniRead ($var2 & $lng &".ini", "startvm-settings", "05", "NotFound"), 220, 185, 249, 21) Else $Start_VM = IniRead ($var1, "startvm", "key", "NotFound") $VMStart = GUICtrlCreateInput ($Start_VM, 220, 185, 249, 21) EndIf GUICtrlCreateButton (IniRead ($var2 & $lng &".ini", "startvm-settings", "06", "NotFound"), 476, 185, 81, 21, 0) GUICtrlSetOnEvent (-1, "SRCStartVM") GUICtrlCreateButton (IniRead ($var2 & $lng &".ini", "messages", "02", "NotFound"), 112, 240, 129, 25, 0) GUICtrlSetOnEvent (-1, "OKStartVM") GUICtrlCreateButton (IniRead ($var2 & $lng &".ini", "messages", "03", "NotFound"), 336, 240, 129, 25, 0) GUICtrlSetOnEvent (-1, "ExitGUI") GUICtrlCreateTabItem (IniRead ($var2 & $lng &".ini", "hotkeys", "01", "NotFound")) GUICtrlCreateLabel (IniRead ($var2 & $lng &".ini", "hotkeys", "02", "NotFound"), 16, 40, 546, 105) $Radio5 = GUICtrlCreateRadio ("Radio5", 20, 153, 17, 17) If IniRead ($var1, "hotkeys", "key", "NotFound") = 1 Then GUICtrlSetState (-1, $GUI_CHECKED) EndIf $Radio6 = GUICtrlCreateRadio ("Radio6", 20, 185, 17, 17) If IniRead ($var1, "hotkeys", "key", "NotFound") = 0 Then GUICtrlSetState (-1, $GUI_CHECKED) EndIf GUICtrlCreateLabel (IniRead ($var2 & $lng &".ini", "hotkeys", "03", "NotFound"), 36, 153, 524, 21) GUICtrlCreateLabel (IniRead ($var2 & $lng &".ini", "hotkeys", "04", "NotFound"), 36, 185, 524, 21) GUICtrlCreateButton (IniRead ($var2 & $lng &".ini", "messages", "02", "NotFound"), 112, 240, 129, 25, 0) GUICtrlSetOnEvent (-1, "OKHotKeys") GUICtrlCreateButton (IniRead ($var2 & $lng &".ini", "messages", "03", "NotFound"), 336, 240, 129, 25, 0) GUICtrlSetOnEvent (-1, "ExitGUI") GUICtrlCreateTabItem (IniRead ($var2 & $lng &".ini", "hotkey-settings", "01", "NotFound")) GUICtrlCreateLabel (IniRead ($var2 & $lng &".ini", "hotkey-settings", "02", "NotFound"), 16, 40, 546, 60) $Radio7 = GUICtrlCreateRadio ("Radio7", 20, 112, 17, 17) If IniRead ($var1, "hotkeys", "userkey", "NotFound") = 0 Then GUICtrlSetState (-1, $GUI_CHECKED) EndIf $Radio8 = GUICtrlCreateRadio ("Radio8", 154, 112, 17, 17) If IniRead ($var1, "hotkeys", "userkey", "NotFound") = 1 Then GUICtrlSetState (-1, $GUI_CHECKED) EndIf GUICtrlCreateLabel (IniRead ($var2 & $lng &".ini", "hotkey-settings", "03", "NotFound"), 38, 113, 100, 122) GUICtrlCreateLabel (IniRead ($var2 & $lng &".ini", "tray", "01", "NotFound") &":", 172, 113, 120, 17) GUICtrlCreateLabel (IniRead ($var2 & $lng &".ini", "tray", "02", "NotFound") &":", 172, 133, 120, 17) GUICtrlCreateLabel (IniRead ($var2 & $lng &".ini", "tray", "03", "NotFound") &":", 172, 153, 120, 17) GUICtrlCreateLabel (IniRead ($var2 & $lng &".ini", "tray", "04", "NotFound") &":", 172, 173, 120, 17) GUICtrlCreateLabel (IniRead ($var2 & $lng &".ini", "tray", "05", "NotFound") &":", 172, 193, 120, 17) GUICtrlCreateLabel (IniRead ($var2 & $lng &".ini", "tray", "06", "NotFound") &":", 172, 213, 120, 17) GUICtrlCreateLabel ("CTRL +", 318, 113, 44, 17) GUICtrlCreateLabel ("CTRL +", 318, 133, 44, 17) GUICtrlCreateLabel ("CTRL +", 318, 153, 44, 17) GUICtrlCreateLabel ("CTRL +", 318, 173, 44, 17) GUICtrlCreateLabel ("CTRL +", 318, 193, 44, 17) GUICtrlCreateLabel ("CTRL +", 318, 213, 44, 17) GUICtrlCreateLabel ("ALT +", 395, 113, 44, 17) GUICtrlCreateLabel ("ALT +", 395, 133, 44, 17) GUICtrlCreateLabel ("ALT +", 395, 153, 44, 17) GUICtrlCreateLabel ("ALT +", 395, 173, 44, 17) GUICtrlCreateLabel ("ALT +", 395, 193, 44, 17) GUICtrlCreateLabel ("ALT +", 395, 213, 44, 17) GUICtrlCreateLabel ("SHIFT +", 460, 113, 44, 17) GUICtrlCreateLabel ("SHIFT +", 460, 133, 44, 17) GUICtrlCreateLabel ("SHIFT +", 460, 153, 44, 17) GUICtrlCreateLabel ("SHIFT +", 460, 173, 44, 17) GUICtrlCreateLabel ("SHIFT +", 460, 193, 44, 17) GUICtrlCreateLabel ("SHIFT +", 460, 213, 44, 17) $Checkbox01 = GUICtrlCreateCheckbox ("Checkbox01", 302, 112, 17, 17) If IniRead ($var1, "hotkeys", "01", "NotFound") = "^" Then GUICtrlSetState (-1, $GUI_CHECKED) EndIf $Checkbox02 = GUICtrlCreateCheckbox ("Checkbox02", 302, 132, 17, 17) If IniRead ($var1, "hotkeys", "02", "NotFound") = "^" Then GUICtrlSetState (-1, $GUI_CHECKED) EndIf $Checkbox03 = GUICtrlCreateCheckbox ("Checkbox03", 302, 152, 17, 17) If IniRead ($var1, "hotkeys", "03", "NotFound") = "^" Then GUICtrlSetState (-1, $GUI_CHECKED) EndIf $Checkbox04 = GUICtrlCreateCheckbox ("Checkbox04", 302, 172, 17, 17) If IniRead ($var1, "hotkeys", "04", "NotFound") = "^" Then GUICtrlSetState (-1, $GUI_CHECKED) EndIf $Checkbox05 = GUICtrlCreateCheckbox ("Checkbox05", 302, 192, 17, 17) If IniRead ($var1, "hotkeys", "05", "NotFound") = "^" Then GUICtrlSetState (-1, $GUI_CHECKED) EndIf $Checkbox06 = GUICtrlCreateCheckbox ("Checkbox06", 302, 212, 17, 17) If IniRead ($var1, "hotkeys", "06", "NotFound") = "^" Then GUICtrlSetState (-1, $GUI_CHECKED) EndIf $Checkbox07 = GUICtrlCreateCheckbox ("Checkbox07", 378, 112, 17, 17) If IniRead ($var1, "hotkeys", "07", "NotFound") = "!" Then GUICtrlSetState (-1, $GUI_CHECKED) EndIf $Checkbox08 = GUICtrlCreateCheckbox ("Checkbox08", 378, 132, 17, 17) If IniRead ($var1, "hotkeys", "08", "NotFound") = "!" Then GUICtrlSetState (-1, $GUI_CHECKED) EndIf $Checkbox09 = GUICtrlCreateCheckbox ("Checkbox09", 378, 152, 17, 17) If IniRead ($var1, "hotkeys", "09", "NotFound") = "!" Then GUICtrlSetState (-1, $GUI_CHECKED) EndIf $Checkbox10 = GUICtrlCreateCheckbox ("Checkbox10", 378, 172, 17, 17) If IniRead ($var1, "hotkeys", "10", "NotFound") = "!" Then GUICtrlSetState (-1, $GUI_CHECKED) EndIf $Checkbox11 = GUICtrlCreateCheckbox ("Checkbox11", 378, 192, 17, 17) If IniRead ($var1, "hotkeys", "11", "NotFound") = "!" Then GUICtrlSetState (-1, $GUI_CHECKED) EndIf $Checkbox12 = GUICtrlCreateCheckbox ("Checkbox12", 378, 212, 17, 17) If IniRead ($var1, "hotkeys", "12", "NotFound") = "!" Then GUICtrlSetState (-1, $GUI_CHECKED) EndIf $Checkbox13 = GUICtrlCreateCheckbox ("Checkbox13", 444, 112, 17, 17) If IniRead ($var1, "hotkeys", "13", "NotFound") = "+" Then GUICtrlSetState (-1, $GUI_CHECKED) EndIf $Checkbox14 = GUICtrlCreateCheckbox ("Checkbox14", 444, 132, 17, 17) If IniRead ($var1, "hotkeys", "14", "NotFound") = "+" Then GUICtrlSetState (-1, $GUI_CHECKED) EndIf $Checkbox15 = GUICtrlCreateCheckbox ("Checkbox15", 444, 152, 17, 17) If IniRead ($var1, "hotkeys", "15", "NotFound") = "+" Then GUICtrlSetState (-1, $GUI_CHECKED) EndIf $Checkbox16 = GUICtrlCreateCheckbox ("Checkbox16", 444, 172, 17, 17) If IniRead ($var1, "hotkeys", "16", "NotFound") = "+" Then GUICtrlSetState (-1, $GUI_CHECKED) EndIf $Checkbox17 = GUICtrlCreateCheckbox ("Checkbox17", 444, 192, 17, 17) If IniRead ($var1, "hotkeys", "17", "NotFound") = "+" Then GUICtrlSetState (-1, $GUI_CHECKED) EndIf $Checkbox18 = GUICtrlCreateCheckbox ("Checkbox18", 444, 212, 17, 17) If IniRead ($var1, "hotkeys", "18", "NotFound") = "+" Then GUICtrlSetState (-1, $GUI_CHECKED) EndIf $Input1 = GUICtrlCreateInput (IniRead ($var1, "hotkeys", "19", "NotFound"), 524, 111, 24, 21) $Input2 = GUICtrlCreateInput (IniRead ($var1, "hotkeys", "20", "NotFound"), 524, 131, 24, 21) $Input3 = GUICtrlCreateInput (IniRead ($var1, "hotkeys", "21", "NotFound"), 524, 151, 24, 21) $Input4 = GUICtrlCreateInput (IniRead ($var1, "hotkeys", "22", "NotFound"), 524, 171, 24, 21) $Input5 = GUICtrlCreateInput (IniRead ($var1, "hotkeys", "23", "NotFound"), 524, 191, 24, 21) $Input6 = GUICtrlCreateInput (IniRead ($var1, "hotkeys", "24", "NotFound"), 524, 211, 24, 21) GUICtrlCreateButton (IniRead ($var2 & $lng &".ini", "messages", "02", "NotFound"), 112, 240, 129, 25, 0) GUICtrlSetOnEvent (-1, "OKHotKeysSet") GUICtrlCreateButton (IniRead ($var2 & $lng &".ini", "messages", "03", "NotFound"), 336, 240, 129, 25, 0) GUICtrlSetOnEvent (-1, "ExitGUI") GUICtrlCreateTabItem (IniRead ($var2 & $lng &".ini", "language-settings", "01", "NotFound")) GUICtrlCreateLabel (IniRead ($var2 & $lng &".ini", "language-settings", "02", "NotFound"), 16, 40, 546, 105) GUICtrlCreateLabel (IniRead ($var2 & $lng &".ini", "language-settings", "03", "NotFound"), 26, 185, 180, 21) $StartLng = GUICtrlCreateInput (IniRead ($var1, "language", "key", "NotFound"), 210, 185, 259, 21) GUICtrlCreateButton (IniRead ($var2 & $lng &".ini", "language-settings", "04", "NotFound"), 476, 185, 81, 21, 0) GUICtrlSetOnEvent (-1, "SRCLanguage") GUICtrlCreateButton (IniRead ($var2 & $lng &".ini", "messages", "02", "NotFound"), 112, 240, 129, 25, 0) GUICtrlSetOnEvent (-1, "OKLanguage") GUICtrlCreateButton (IniRead ($var2 & $lng &".ini", "messages", "03", "NotFound"), 336, 240, 129, 25, 0) GUICtrlSetOnEvent (-1, "ExitGUI") GUICtrlCreateTabItem (IniRead ($var2 & $lng &".ini", "about", "01", "NotFound")) GUICtrlCreateLabel (". : Portable-VirtualBox Launcher v2.3.9 : .", 100, 40, 448, 26) GUICtrlSetFont (-1, 14, 800, 4, "Arial") GUICtrlCreateLabel("Download and Support: http://www.german-nlite.org/wbb/index.php?page=Thread&&&threadID=28", 50, 70, 471, 20) GUICtrlSetFont (-1, 8, 800, 0, "Arial") GUICtrlCreateLabel ("VirtualBox is a family of powerful x86 virtualization products for enterprise as well as home use. Not only is VirtualBox an extremely feature rich, high performance product for enterprise customers, it is also the only professional solution that is freely available as Open Source Software under the terms of the GNU General Public License (GPL).", 16, 94, 546, 55) GUICtrlSetFont (-1, 8, 400, 0, "Arial") GUICtrlCreateLabel ("Download and Support: http://www.virtualbox.org", 88, 133, 300, 14) GUICtrlSetFont (-1, 8, 800, 0, "Arial") GUICtrlCreateLabel ("Presently, VirtualBox runs on Windows, Linux, Macintosh and OpenSolaris hosts and supports a large number of guest operating systems including but not limited to Windows (NT 4.0, 2000, XP, Server 2003, Vista), DOS/Windows 3.x, Linux (2.4 and 2.6), and OpenBSD.", 16, 149, 546, 40) GUICtrlSetFont (-1, 8, 400, 0, "Arial") GUICtrlCreateLabel ("VirtualBox is being actively developed with frequent releases and has an ever growing list of features, supported guest operating systems and platforms it runs on. VirtualBox is a community effort backed by a dedicated company: everyone is encouraged to contribute while Sun ensures the product always meets professional quality criteria.", 16, 192, 546, 40) GUICtrlSetFont (-1, 8, 400, 0, "Arial") GUICtrlCreateButton (IniRead ($var2 & $lng &".ini", "messages", "03", "NotFound"), 236, 240, 129, 25, 0) GUICtrlSetOnEvent (-1, "ExitGUI") GUISetState () EndFunc Func SRCUserHome () $PathHR = FileSelectFolder (IniRead ($var2 & $lng &".ini", "srcuserhome", "01", "NotFound"), "", 1+4) If NOT @error Then GUICtrlSetState ($Radio2, $GUI_CHECKED) GUICtrlSetData ($HomeRoot, $PathHR) EndIf EndFunc Func OKUserHome () If GUICtrlRead ($Radio1) = $GUI_CHECKED Then IniWrite ($var1, "userhome", "key", "%CD%\data\.VirtualBox") MsgBox (0, IniRead ($var2 & $lng &".ini", "messages", "04", "NotFound"), IniRead ($var2 & $lng &".ini", "messages", "05", "NotFound")) Else If GUICtrlRead ($HomeRoot) = IniRead ($var2 & $lng &".ini", "okuserhome", "01", "NotFound") Then MsgBox (0, IniRead ($var2 & $lng &".ini", "messages", "01", "NotFound"), IniRead ($var2 & $lng &".ini", "okuserhome", "02", "NotFound")) Else IniWrite (@ScriptDir&"\data\settings\settings.ini", "userhome", "key", GUICtrlRead ($HomeRoot)) MsgBox (0, IniRead ($var2 & $lng &".ini", "messages", "04", "NotFound"), IniRead ($var2 & $lng &".ini", "messages", "05", "NotFound")) EndIf EndIf EndFunc Func SRCStartVM () $Start_VM = IniRead ($var1, "startvm", "key", "NotFound") If IniRead ($var1, "startvm", "key", "NotFound") Then If FileExists (@ScriptDir&"\data\.VirtualBox\VDI\") Then $PathVM = FileOpenDialog (IniRead ($var2 & $lng &".ini", "srcstartvm", "01", "NotFound"), $Start_VM&"\.VirtualBox\VDI", "VirtualBox VM (*.vdi)", 1+2) EndIf If FileExists (@ScriptDir&"\data\.VirtualBox\HardDisks\") Then $PathVM = FileOpenDialog (IniRead ($var2 & $lng &".ini", "srcstartvm", "01", "NotFound"), $Start_VM&"\.VirtualBox\HardDisks", "VirtualBox VM (*.vdi)", 1+2) EndIf Else If FileExists (@ScriptDir&"\data\.VirtualBox\VDI\") Then $PathVM = FileOpenDialog (IniRead ($var2 & $lng &".ini", "srcstartvm", "01", "NotFound"), @ScriptDir&"\data\.VirtualBox\VDI", "VirtualBox VM (*.vdi)", 1+2) EndIf If FileExists (@ScriptDir&"\data\.VirtualBox\HardDisks\") Then $PathVM = FileOpenDialog (IniRead ($var2 & $lng &".ini", "srcstartvm", "01", "NotFound"), @ScriptDir&"\data\.VirtualBox\HardDisks", "VirtualBox VM (*.vdi)", 1+2) EndIf EndIf If NOT @error Then $VM_String = StringSplit ($PathVM, "\") $String = "" For $VDI In $VM_String $String = $VDI Next $VM_Start = StringSplit ($String, ".") GUICtrlSetState ($Radio4, $GUI_CHECKED) GUICtrlSetData ($VMStart, $VM_Start[1]) EndIf EndFunc Func OKStartVM () If GUICtrlRead ($Radio3) = $GUI_CHECKED Then IniWrite ($var1, "startvm", "key", "") MsgBox (0, IniRead ($var2 & $lng &".ini", "messages", "04", "NotFound"), IniRead ($var2 & $lng &".ini", "messages", "05", "NotFound")) Else If GUICtrlRead ($VMStart) = IniRead ($var2 & $lng &".ini", "okstartvm", "01", "NotFound") Then MsgBox (0, IniRead (@ScriptDir&"\data\language\"& $lng &".ini", "messages", "01", "NotFound"), IniRead ($var2 & $lng &".ini", "okstartvm", "02", "NotFound")) Else IniWrite ($var1, "startvm", "key", GUICtrlRead ($VMStart)) MsgBox (0, IniRead ($var2 & $lng &".ini", "messages", "04", "NotFound"), IniRead ($var2 & $lng &".ini", "messages", "05", "NotFound")) EndIf EndIf EndFunc Func OKHotKeys () If GUICtrlRead ($Radio5) = $GUI_CHECKED Then IniWrite ($var1, "hotkeys", "key", "1") MsgBox (0, IniRead ($var2 & $lng &".ini", "messages", "04", "NotFound"), IniRead ($var2 & $lng &".ini", "messages", "05", "NotFound")) Else IniWrite ($var1, "hotkeys", "key", "0") MsgBox (0, IniRead ($var2 & $lng &".ini", "messages", "04", "NotFound"), IniRead ($var2 & $lng &".ini", "messages", "05", "NotFound")) EndIf EndFunc Func OKHotKeysSet () If GUICtrlRead ($Radio7) = $GUI_CHECKED Then IniWrite ($var1, "hotkeys", "userkey", "0") IniWrite ($var1, "hotkeys", "01", "^") IniWrite ($var1, "hotkeys", "02", "^") IniWrite ($var1, "hotkeys", "03", "^") IniWrite ($var1, "hotkeys", "04", "^") IniWrite ($var1, "hotkeys", "05", "^") IniWrite ($var1, "hotkeys", "06", "^") IniWrite ($var1, "hotkeys", "07", "") IniWrite ($var1, "hotkeys", "08", "") IniWrite ($var1, "hotkeys", "09", "") IniWrite ($var1, "hotkeys", "10", "") IniWrite ($var1, "hotkeys", "11", "") IniWrite ($var1, "hotkeys", "12", "") IniWrite ($var1, "hotkeys", "13", "") IniWrite ($var1, "hotkeys", "14", "") IniWrite ($var1, "hotkeys", "15", "") IniWrite ($var1, "hotkeys", "16", "") IniWrite ($var1, "hotkeys", "17", "") IniWrite ($var1, "hotkeys", "18", "") IniWrite ($var1, "hotkeys", "19", "1") IniWrite ($var1, "hotkeys", "20", "2") IniWrite ($var1, "hotkeys", "21", "3") IniWrite ($var1, "hotkeys", "22", "4") IniWrite ($var1, "hotkeys", "23", "5") IniWrite ($var1, "hotkeys", "24", "6") MsgBox (0, IniRead ($var2 & $lng &".ini", "messages", "04", "NotFound"), IniRead ($var2 & $lng &".ini", "messages", "05", "NotFound")) Else If GUICtrlRead ($Input1) = false OR GUICtrlRead ($Input2) = false OR GUICtrlRead ($Input3) = false OR GUICtrlRead ($Input4) = false OR GUICtrlRead ($Input5) = false OR GUICtrlRead ($Input6) = false Then MsgBox (0, IniRead ($var2 & $lng &".ini", "messages", "01", "NotFound"), IniRead ($var2 & $lng &".ini", "okhotkeysset", "01", "NotFound")) Else IniWrite ($var1, "hotkeys", "userkey", "1") If GUICtrlRead ($CheckBox01) = $GUI_CHECKED Then IniWrite ($var1, "hotkeys", "01", "^") Else IniWrite ($var1, "hotkeys", "01", "") EndIf If GUICtrlRead ($CheckBox02) = $GUI_CHECKED Then IniWrite ($var1, "hotkeys", "02", "^") Else IniWrite ($var1, "hotkeys", "02", "") EndIf If GUICtrlRead ($CheckBox03) = $GUI_CHECKED Then IniWrite ($var1, "hotkeys", "03", "^") Else IniWrite ($var1, "hotkeys", "03", "") EndIf If GUICtrlRead ($CheckBox04) = $GUI_CHECKED Then IniWrite ($var1, "hotkeys", "04", "^") Else IniWrite ($var1, "hotkeys", "04", "") EndIf If GUICtrlRead ($CheckBox05) = $GUI_CHECKED Then IniWrite ($var1, "hotkeys", "05", "^") Else IniWrite ($var1, "hotkeys", "05", "") EndIf If GUICtrlRead ($CheckBox06) = $GUI_CHECKED Then IniWrite ($var1, "hotkeys", "06", "^") Else IniWrite ($var1, "hotkeys", "06", "") EndIf If GUICtrlRead ($CheckBox07) = $GUI_CHECKED Then IniWrite ($var1, "hotkeys", "07", "!") Else IniWrite ($var1, "hotkeys", "07", "") EndIf If GUICtrlRead ($CheckBox08) = $GUI_CHECKED Then IniWrite ($var1, "hotkeys", "08", "!") Else IniWrite ($var1, "hotkeys", "08", "") EndIf If GUICtrlRead ($CheckBox09) = $GUI_CHECKED Then IniWrite ($var1, "hotkeys", "09", "!") Else IniWrite ($var1, "hotkeys", "09", "") EndIf If GUICtrlRead ($CheckBox10) = $GUI_CHECKED Then IniWrite ($var1, "hotkeys", "10", "!") Else IniWrite ($var1, "hotkeys", "10", "") EndIf If GUICtrlRead ($CheckBox11) = $GUI_CHECKED Then IniWrite ($var1, "hotkeys", "11", "!") Else IniWrite ($var1, "hotkeys", "11", "") EndIf If GUICtrlRead ($CheckBox12) = $GUI_CHECKED Then IniWrite ($var1, "hotkeys", "12", "!") Else IniWrite ($var1, "hotkeys", "12", "") EndIf If GUICtrlRead ($CheckBox13) = $GUI_CHECKED Then IniWrite ($var1, "hotkeys", "13", "+") Else IniWrite ($var1, "hotkeys", "13", "") EndIf If GUICtrlRead ($CheckBox14) = $GUI_CHECKED Then IniWrite ($var1, "hotkeys", "14", "+") Else IniWrite ($var1, "hotkeys", "14", "") EndIf If GUICtrlRead ($CheckBox15) = $GUI_CHECKED Then IniWrite ($var1, "hotkeys", "15", "+") Else IniWrite ($var1, "hotkeys", "15", "") EndIf If GUICtrlRead ($CheckBox16) = $GUI_CHECKED Then IniWrite ($var1, "hotkeys", "16", "+") Else IniWrite ($var1, "hotkeys", "16", "") EndIf If GUICtrlRead ($CheckBox17) = $GUI_CHECKED Then IniWrite ($var1, "hotkeys", "17", "+") Else IniWrite ($var1, "hotkeys", "17", "") EndIf If GUICtrlRead ($CheckBox18) = $GUI_CHECKED Then IniWrite ($var1, "hotkeys", "18", "+") Else IniWrite ($var1, "hotkeys", "18", "") EndIf IniWrite ($var1, "hotkeys", "19", GUICtrlRead ($Input1)) IniWrite ($var1, "hotkeys", "20", GUICtrlRead ($Input2)) IniWrite ($var1, "hotkeys", "21", GUICtrlRead ($Input3)) IniWrite ($var1, "hotkeys", "22", GUICtrlRead ($Input4)) IniWrite ($var1, "hotkeys", "23", GUICtrlRead ($Input5)) IniWrite ($var1, "hotkeys", "24", GUICtrlRead ($Input6)) MsgBox (0, IniRead ($var2 & $lng &".ini", "messages", "04", "NotFound"), IniRead ($var2 & $lng &".ini", "messages", "05", "NotFound")) EndIf EndIf EndFunc Func SRCLanguage () $PathLanguage = FileOpenDialog (IniRead ($var2 & $lng &".ini", "srcslanguage", "01", "NotFound"), @ScriptDir&"\data\language", "(*.ini)", 1+2) If NOT @error Then $Language_String = StringSplit ($PathLanguage, "\") $String = "" For $Language In $Language_String $String = $Language Next $Language_Start = StringSplit ($String, ".") GUICtrlSetData ($StartLng, $Language_Start[1]) EndIf EndFunc Func OKLanguage () If GUICtrlRead ($StartLng) = "" Then MsgBox (0, IniRead ($var2 & $lng &".ini", "messages", "01", "NotFound"), IniRead ($var2 & $lng &".ini", "oklanguage", "01", "NotFound")) Else IniWrite ($var1, "language", "key", GUICtrlRead ($StartLng)) MsgBox (0, IniRead ($var2 & $lng &".ini", "messages", "04", "NotFound"), IniRead ($var2 & $lng &".ini", "messages", "05", "NotFound")) EndIf EndFunc Func ExitGUI () GUIDelete () EndFunc Func ExitScript () Opt ("WinTitleMatchMode", 2) WinClose ("] - Sun xVM VirtualBox", "") WinWaitClose ("] - Sun xVM VirtualBox", "") WinClose ("Sun xVM VirtualBox", "") Break (1) EndFunc