Advertisement
deseven

rcons-prefs

Nov 9th, 2012
529
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. OpenPreferences(RunDir + "rcons.ini")
  2.  
  3. PreferenceGroup("Main")
  4.  
  5. Select UCase(ReadPreferenceString("Hotkey","TAB"))
  6.   Case "TAB"
  7.     Hotkey = #VK_TAB
  8.   Case "0"
  9.     Hotkey = #VK_0
  10.   Case "1"
  11.     Hotkey = #VK_1
  12.   Case "2"
  13.     Hotkey = #VK_2
  14.   Case "3"
  15.     Hotkey = #VK_3
  16.   Case "4"
  17.     Hotkey = #VK_4
  18.   Case "5"
  19.     Hotkey = #VK_5
  20.   Case "6"
  21.     Hotkey = #VK_6
  22.   Case "7"
  23.     Hotkey = #VK_7
  24.   Case "8"
  25.     Hotkey = #VK_8
  26.   Case "9"
  27.     Hotkey = #VK_9
  28.   Case "A"
  29.     Hotkey = #VK_A
  30.   Case "B"
  31.     Hotkey = #VK_B
  32.   Case "C"
  33.     Hotkey = #VK_C
  34.   Case "D"
  35.     Hotkey = #VK_D
  36.   Case "E"
  37.     Hotkey = #VK_E
  38.   Case "F"
  39.     Hotkey = #VK_F
  40.   Case "G"
  41.     Hotkey = #VK_G
  42.   Case "H"
  43.     Hotkey = #VK_H
  44.   Case "I"
  45.     Hotkey = #VK_I
  46.   Case "J"
  47.     Hotkey = #VK_J
  48.   Case "K"
  49.     Hotkey = #VK_K
  50.   Case "L"
  51.     Hotkey = #VK_L
  52.   Case "M"
  53.     Hotkey = #VK_M
  54.   Case "N"
  55.     Hotkey = #VK_N
  56.   Case "O"
  57.     Hotkey = #VK_O
  58.   Case "P"
  59.     Hotkey = #VK_P
  60.   Case "Q"
  61.     Hotkey = #VK_Q
  62.   Case "R"
  63.     Hotkey = #VK_R
  64.   Case "S"
  65.     Hotkey = #VK_S
  66.   Case "T"
  67.     Hotkey = #VK_T
  68.   Case "U"
  69.     Hotkey = #VK_U
  70.   Case "V"
  71.     Hotkey = #VK_V
  72.   Case "W"
  73.     Hotkey = #VK_W
  74.   Case "X"
  75.     Hotkey = #VK_X
  76.   Case "Y"
  77.     Hotkey = #VK_Y
  78.   Case "Z"
  79.     Hotkey = #VK_Z
  80.   Case "F1"
  81.     Hotkey = #VK_F1
  82.   Case "F2"
  83.     Hotkey = #VK_F2
  84.   Case "F3"
  85.     Hotkey = #VK_F3
  86.   Case "F4"
  87.     Hotkey = #VK_F4
  88.   Case "F5"
  89.     Hotkey = #VK_F5
  90.   Case "F6"
  91.     Hotkey = #VK_F6
  92.   Case "F7"
  93.     Hotkey = #VK_F7
  94.   Case "F8"
  95.     Hotkey = #VK_F8
  96.   Case "F9"
  97.     Hotkey = #VK_F9
  98.   Case "F10"
  99.     Hotkey = #VK_F10
  100.   Case "F11"
  101.     Hotkey = #VK_F11
  102.   Case "F12"
  103.     Hotkey = #VK_F12
  104.   Case "RETURN"
  105.     Hotkey = #VK_RETURN
  106.   Case "CAPS"
  107.     Hotkey = #VK_CAPITAL
  108.   Case "TILDE"
  109.     Hotkey = #VK_OEM_3
  110.   Case "TILDE_ALT"
  111.     Hotkey = #VK_OEM_102
  112.   Default
  113.     Hotkey = #VK_TAB
  114. EndSelect
  115.  
  116. Select UCase(ReadPreferenceString("HotkeyModifier","CONTROL"))
  117.   Case "CTRL"
  118.     HotkeyModifier = #MOD_CONTROL
  119.   Case "SHIFT"
  120.     HotkeyModifier = #MOD_SHIFT
  121.   Case "ALT"
  122.     HotkeyModifier = #MOD_ALT
  123.   Case "CTRL-SHIFT"
  124.     HotkeyModifier = #MOD_CONTROL + #MOD_SHIFT
  125.   Case "CTRL-ALT"
  126.     HotkeyModifier = #MOD_CONTROL + #MOD_ALT
  127.   Case "ALT-SHIFT"
  128.     HotkeyModifier = #MOD_ALT + #MOD_SHIFT
  129.   Default
  130.     HotkeyModifier = #MOD_CONTROL
  131. EndSelect
  132.  
  133. Select LCase(ReadPreferenceString("HideOnStart","true"))
  134.   Case "true"
  135.     HideOnStart = #True
  136.   Case "yes"
  137.     HideOnStart = #True
  138.   Case "false"
  139.     HideOnStart = #False
  140.   Case "no"
  141.     HideOnStart = #False
  142.   Default
  143.     HideOnStart = #True
  144. EndSelect
  145.  
  146. Shell.s = UCase(ReadPreferenceString("Shell","%WINDIR%\system32\cmd.exe"))
  147. Shell = ReplaceString(Shell,"%WINDIR%",GetEnvironmentVariable("WINDIR"))
  148. Shell = ReplaceString(Shell,"%SYSTEMDRIVE%",GetEnvironmentVariable("SYSTEMDRIVE"))
  149. Shell = ReplaceString(Shell,"%USERNAME%",GetEnvironmentVariable("USERNAME"))
  150. Shell = ReplaceString(Shell,"%APPDATA%",GetEnvironmentVariable("APPDATA"))
  151. Shell = ReplaceString(Shell,"%TEMP%",GetEnvironmentVariable("TEMP"))
  152.  
  153. ;Shell = "%WINDIR%\system32\powershell.exe"
  154.  
  155. ShellParams.s = ReadPreferenceString("ShellParams","")
  156.  
  157. WorkDir.s = UCase(ReadPreferenceString("WorkDir","%WINDIR%"))
  158. WorkDir = ReplaceString(WorkDir,"%WINDIR%",GetEnvironmentVariable("WINDIR"))
  159. WorkDir = ReplaceString(WorkDir,"%SYSTEMDRIVE%",GetEnvironmentVariable("SYSTEMDRIVE"))
  160. WorkDir = ReplaceString(WorkDir,"%USERNAME%",GetEnvironmentVariable("USERNAME"))
  161. WorkDir = ReplaceString(WorkDir,"%APPDATA%",GetEnvironmentVariable("APPDATA"))
  162. WorkDir = ReplaceString(WorkDir,"%TEMP%",GetEnvironmentVariable("TEMP"))
  163.  
  164. PreferenceGroup("Style")
  165.  
  166. WindowH = ReadPreferenceInteger("WindowHeight",400)
  167. If WindowH < 50 Or WindowH > DesktopHeight(0)
  168.   WindowH = 400
  169. EndIf
  170.  
  171.  
  172. Select LCase(ReadPreferenceString("Transparency","true"))
  173.   Case "true"
  174.     Transparency = #True
  175.   Case "yes"
  176.     Transparency = #True
  177.   Case "false"
  178.     Transparency = #False
  179.   Case "no"
  180.     Transparency = #False
  181.   Default
  182.     Transparency = #False
  183. EndSelect
  184.  
  185. If Transparency
  186.   TransparencyValue = ReadPreferenceInteger("TransparencyValue",220)
  187.   If TransparencyValue > 254
  188.     TransparencyValue = 254
  189.   EndIf
  190.   If TransparencyValue < 20
  191.     TransparencyValue = 20
  192.   EndIf
  193. EndIf
  194.  
  195. Select LCase(ReadPreferenceString("ToolWindow","false"))
  196.   Case "true"
  197.     ToolWindow = #True
  198.   Case "yes"
  199.     ToolWindow = #True
  200.   Case "false"
  201.     ToolWindow = #False
  202.   Case "no"
  203.     ToolWindow = #False
  204.   Default
  205.     ToolWindow = #False
  206. EndSelect
  207.  
  208. Select LCase(ReadPreferenceString("RollEffects","true"))
  209.   Case "true"
  210.     RollEffects = #True
  211.   Case "yes"
  212.     RollEffects = #True
  213.   Case "false"
  214.     RollEffects = #False
  215.   Case "no"
  216.     RollEffects = #False
  217.   Default
  218.     RollEffects = #False
  219. EndSelect
  220.  
  221. Select LCase(ReadPreferenceString("HideScroll","true"))
  222.   Case "true"
  223.     HideScroll = #True
  224.   Case "yes"
  225.     HideScroll = #True
  226.   Case "false"
  227.     HideScroll = #False
  228.   Case "no"
  229.     HideScroll = #False
  230.   Default
  231.     HideScroll = #False
  232. EndSelect
  233.  
  234. Offset = ReadPreferenceInteger("Offset",2)
  235. If Offset < 0
  236.   Offset = 0
  237. EndIf
  238.  
  239. ClosePreferences()
  240.  
  241. ; IDE Options = PureBasic 5.00 (Windows - x86)
  242. ; CursorPosition = 230
  243. ; FirstLine = 193
  244. ; EnableXP
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement