Advertisement
Guest User

Untitled

a guest
Dec 24th, 2009
902
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 203.27 KB | None | 0 0
  1. ; <AUT2EXE VERSION: 3.2.4.9>
  2. ; ----------------------------------------------------------------------------
  3. ; <AUT2EXE INCLUDE-START: C:\Program Files\AutoIt3\Scripts\WoW\Relogger\V1\Core.au3>
  4. ; ----------------------------------------------------------------------------
  5. ; ----------------------------------------------------------------------------
  6. ; <AUT2EXE INCLUDE-START: C:\Program Files\AutoIt3\Scripts\WoW\Relogger\V1\NomadMemory.au3>
  7. ; ----------------------------------------------------------------------------
  8. #region _Memory
  9. ;==================================================================================
  10. ; AutoIt Version: 3.1.127 (beta)
  11. ; Language: English
  12. ; Platform: All Windows
  13. ; Author: Nomad
  14. ; Requirements: These functions will only work with beta.
  15. ;==================================================================================
  16. ; Credits: wOuter - These functions are based on his original _Mem() functions.
  17. ; But they are easier to comprehend and more reliable. These
  18. ; functions are in no way a direct copy of his functions. His
  19. ; functions only provided a foundation from which these evolved.
  20. ;==================================================================================
  21. ;
  22. ; Functions:
  23. ;
  24. ;==================================================================================
  25. ; Function: _MemoryOpen($iv_Pid[, $iv_DesiredAccess[, $iv_InheritHandle]])
  26. ; Description: Opens a process and enables all possible access rights to the
  27. ; process. The Process ID of the process is used to specify which
  28. ; process to open. You must call this function before calling
  29. ; _MemoryClose(), _MemoryRead(), or _MemoryWrite().
  30. ; Parameter(s): $iv_Pid - The Process ID of the program you want to open.
  31. ; $iv_DesiredAccess - (optional) Set to 0x1F0FFF by default, which
  32. ; enables all possible access rights to the
  33. ; process specified by the Process ID.
  34. ; $iv_InheritHandle - (optional) If this value is TRUE, all processes
  35. ; created by this process will inherit the access
  36. ; handle. Set to 1 (TRUE) by default. Set to 0
  37. ; if you want it FALSE.
  38. ; Requirement(s): None.
  39. ; Return Value(s): On Success - Returns an array containing the Dll handle and an
  40. ; open handle to the specified process.
  41. ; On Failure - Returns 0
  42. ; @Error - 0 = No error.
  43. ; 1 = Invalid $iv_Pid.
  44. ; 2 = Failed to open Kernel32.dll.
  45. ; 3 = Failed to open the specified process.
  46. ; Author(s): Nomad
  47. ; Note(s):
  48. ;==================================================================================
  49. Func _MemoryOpen($iv_Pid, $iv_DesiredAccess = 0x1F0FFF, $iv_InheritHandle = 1)
  50.  
  51. If Not ProcessExists($iv_Pid) Then
  52. SetError(1)
  53. Return 0
  54. EndIf
  55.  
  56. Local $ah_Handle[2] = [DllOpen('kernel32.dll')]
  57.  
  58. If @Error Then
  59. SetError(2)
  60. Return 0
  61. EndIf
  62.  
  63. Local $av_OpenProcess = DllCall($ah_Handle[0], 'int', 'OpenProcess', 'int', $iv_DesiredAccess, 'int', $iv_InheritHandle, 'int', $iv_Pid)
  64.  
  65. If @Error Then
  66. DllClose($ah_Handle[0])
  67. SetError(3)
  68. Return 0
  69. EndIf
  70.  
  71. $ah_Handle[1] = $av_OpenProcess[0]
  72.  
  73. Return $ah_Handle
  74.  
  75. EndFunc
  76.  
  77. ;==================================================================================
  78. ; Function: _MemoryRead($iv_Address, $ah_Handle[, $sv_Type])
  79. ; Description: Reads the value located in the memory address specified.
  80. ; Parameter(s): $iv_Address - The memory address you want to read from. It must
  81. ; be in hex format (0x00000000).
  82. ; $ah_Handle - An array containing the Dll handle and the handle
  83. ; of the open process as returned by _MemoryOpen().
  84. ; $sv_Type - (optional) The "Type" of value you intend to read.
  85. ; This is set to 'dword'(32bit(4byte) signed integer)
  86. ; by default. See the help file for DllStructCreate
  87. ; for all types. An example: If you want to read a
  88. ; word that is 15 characters in length, you would use
  89. ; 'char[16]' since a 'char' is 8 bits (1 byte) in size.
  90. ; Return Value(s): On Success - Returns the value located at the specified address.
  91. ; On Failure - Returns 0
  92. ; @Error - 0 = No error.
  93. ; 1 = Invalid $ah_Handle.
  94. ; 2 = $sv_Type was not a string.
  95. ; 3 = $sv_Type is an unknown data type.
  96. ; 4 = Failed to allocate the memory needed for the DllStructure.
  97. ; 5 = Error allocating memory for $sv_Type.
  98. ; 6 = Failed to read from the specified process.
  99. ; Author(s): Nomad
  100. ; Note(s): Values returned are in Decimal format, unless specified as a
  101. ; 'char' type, then they are returned in ASCII format. Also note
  102. ; that size ('char[size]') for all 'char' types should be 1
  103. ; greater than the actual size.
  104. ;==================================================================================
  105. Func _MemoryRead($iv_Address, $ah_Handle, $sv_Type = 'dword')
  106.  
  107. If Not IsArray($ah_Handle) Then
  108. SetError(1)
  109. Return 0
  110. EndIf
  111.  
  112. Local $v_Buffer = DllStructCreate($sv_Type)
  113.  
  114. If @Error Then
  115. SetError(@Error + 1)
  116. Return 0
  117. EndIf
  118.  
  119. DllCall($ah_Handle[0], 'int', 'ReadProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')
  120.  
  121. If Not @Error Then
  122. Local $v_Value = DllStructGetData($v_Buffer, 1)
  123. Return $v_Value
  124. Else
  125. SetError(6)
  126. Return 0
  127. EndIf
  128.  
  129. EndFunc
  130.  
  131. ;==================================================================================
  132. ; Function: _MemoryWrite($iv_Address, $ah_Handle, $v_Data[, $sv_Type])
  133. ; Description: Writes data to the specified memory address.
  134. ; Parameter(s): $iv_Address - The memory address which you want to write to.
  135. ; It must be in hex format (0x00000000).
  136. ; $ah_Handle - An array containing the Dll handle and the handle
  137. ; of the open process as returned by _MemoryOpen().
  138. ; $v_Data - The data to be written.
  139. ; $sv_Type - (optional) The "Type" of value you intend to write.
  140. ; This is set to 'dword'(32bit(4byte) signed integer)
  141. ; by default. See the help file for DllStructCreate
  142. ; for all types. An example: If you want to write a
  143. ; word that is 15 characters in length, you would use
  144. ; 'char[16]' since a 'char' is 8 bits (1 byte) in size.
  145. ; Return Value(s): On Success - Returns 1
  146. ; On Failure - Returns 0
  147. ; @Error - 0 = No error.
  148. ; 1 = Invalid $ah_Handle.
  149. ; 2 = $sv_Type was not a string.
  150. ; 3 = $sv_Type is an unknown data type.
  151. ; 4 = Failed to allocate the memory needed for the DllStructure.
  152. ; 5 = Error allocating memory for $sv_Type.
  153. ; 6 = $v_Data is not in the proper format to be used with the
  154. ; "Type" selected for $sv_Type, or it is out of range.
  155. ; 7 = Failed to write to the specified process.
  156. ; Author(s): Nomad
  157. ; Note(s): Values sent must be in Decimal format, unless specified as a
  158. ; 'char' type, then they must be in ASCII format. Also note
  159. ; that size ('char[size]') for all 'char' types should be 1
  160. ; greater than the actual size.
  161. ;==================================================================================
  162. Func _MemoryWrite($iv_Address, $ah_Handle, $v_Data, $sv_Type = 'dword')
  163.  
  164. If Not IsArray($ah_Handle) Then
  165. SetError(1)
  166. Return 0
  167. EndIf
  168.  
  169. Local $v_Buffer = DllStructCreate($sv_Type)
  170.  
  171. If @Error Then
  172. SetError(@Error + 1)
  173. Return 0
  174. Else
  175. DllStructSetData($v_Buffer, 1, $v_Data)
  176. If @Error Then
  177. SetError(6)
  178. Return 0
  179. EndIf
  180. EndIf
  181.  
  182. DllCall($ah_Handle[0], 'int', 'WriteProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')
  183.  
  184. If Not @Error Then
  185. Return 1
  186. Else
  187. SetError(7)
  188. Return 0
  189. EndIf
  190.  
  191. EndFunc
  192.  
  193. ;==================================================================================
  194. ; Function: _MemoryClose($ah_Handle)
  195. ; Description: Closes the process handle opened by using _MemoryOpen().
  196. ; Parameter(s): $ah_Handle - An array containing the Dll handle and the handle
  197. ; of the open process as returned by _MemoryOpen().
  198. ; Return Value(s): On Success - Returns 1
  199. ; On Failure - Returns 0
  200. ; @Error - 0 = No error.
  201. ; 1 = Invalid $ah_Handle.
  202. ; 2 = Unable to close the process handle.
  203. ; Author(s): Nomad
  204. ; Note(s):
  205. ;==================================================================================
  206. Func _MemoryClose($ah_Handle)
  207.  
  208. If Not IsArray($ah_Handle) Then
  209. SetError(1)
  210. Return 0
  211. EndIf
  212.  
  213. DllCall($ah_Handle[0], 'int', 'CloseHandle', 'int', $ah_Handle[1])
  214. If Not @Error Then
  215. DllClose($ah_Handle[0])
  216. Return 1
  217. Else
  218. DllClose($ah_Handle[0])
  219. SetError(2)
  220. Return 0
  221. EndIf
  222.  
  223. EndFunc
  224.  
  225. ;==================================================================================
  226. ; Function: SetPrivilege( $privilege, $bEnable )
  227. ; Description: Enables (or disables) the $privilege on the current process
  228. ; (Probably) requires administrator privileges to run
  229. ;
  230. ; Author(s): Larry (from autoitscript.com's Forum)
  231. ; Notes(s):
  232. ; http://www.autoitscript.com/forum/index.php?s=&showtopic=31248&view=findpost&p=223999
  233. ;==================================================================================
  234.  
  235. Func SetPrivilege( $privilege, $bEnable )
  236. Const $MY_TOKEN_ADJUST_PRIVILEGES = 0x0020
  237. Const $MY_TOKEN_QUERY = 0x0008
  238. Const $MY_SE_PRIVILEGE_ENABLED = 0x0002
  239. Local $hToken, $SP_auxret, $SP_ret, $hCurrProcess, $nTokens, $nTokenIndex, $priv
  240. $nTokens = 1
  241. $LUID = DLLStructCreate("dword;int")
  242. If IsArray($privilege) Then $nTokens = UBound($privilege)
  243. $TOKEN_PRIVILEGES = DLLStructCreate("dword;dword[" & (3 * $nTokens) & "]")
  244. $NEWTOKEN_PRIVILEGES = DLLStructCreate("dword;dword[" & (3 * $nTokens) & "]")
  245. $hCurrProcess = DLLCall("kernel32.dll","hwnd","GetCurrentProcess")
  246. $SP_auxret = DLLCall("advapi32.dll","int","OpenProcessToken","hwnd",$hCurrProcess[0], _
  247. "int",BitOR($MY_TOKEN_ADJUST_PRIVILEGES,$MY_TOKEN_QUERY),"int*",0)
  248. If $SP_auxret[0] Then
  249. $hToken = $SP_auxret[3]
  250. DLLStructSetData($TOKEN_PRIVILEGES,1,1)
  251. $nTokenIndex = 1
  252. While $nTokenIndex <= $nTokens
  253. If IsArray($privilege) Then
  254. $priv = $privilege[$nTokenIndex-1]
  255. Else
  256. $priv = $privilege
  257. EndIf
  258. $ret = DLLCall("advapi32.dll","int","LookupPrivilegeValue","str","","str",$priv, _
  259. "ptr",DLLStructGetPtr($LUID))
  260. If $ret[0] Then
  261. If $bEnable Then
  262. DLLStructSetData($TOKEN_PRIVILEGES,2,$MY_SE_PRIVILEGE_ENABLED,(3 * $nTokenIndex))
  263. Else
  264. DLLStructSetData($TOKEN_PRIVILEGES,2,0,(3 * $nTokenIndex))
  265. EndIf
  266. DLLStructSetData($TOKEN_PRIVILEGES,2,DllStructGetData($LUID,1),(3 * ($nTokenIndex-1)) + 1)
  267. DLLStructSetData($TOKEN_PRIVILEGES,2,DllStructGetData($LUID,2),(3 * ($nTokenIndex-1)) + 2)
  268. DLLStructSetData($LUID,1,0)
  269. DLLStructSetData($LUID,2,0)
  270. EndIf
  271. $nTokenIndex += 1
  272. WEnd
  273. $ret = DLLCall("advapi32.dll","int","AdjustTokenPrivileges","hwnd",$hToken,"int",0, _
  274. "ptr",DllStructGetPtr($TOKEN_PRIVILEGES),"int",DllStructGetSize($NEWTOKEN_PRIVILEGES), _
  275. "ptr",DllStructGetPtr($NEWTOKEN_PRIVILEGES),"int*",0)
  276. $f = DLLCall("kernel32.dll","int","GetLastError")
  277. EndIf
  278. $NEWTOKEN_PRIVILEGES=0
  279. $TOKEN_PRIVILEGES=0
  280. $LUID=0
  281. If $SP_auxret[0] = 0 Then Return 0
  282. $SP_auxret = DLLCall("kernel32.dll","int","CloseHandle","hwnd",$hToken)
  283. If Not $ret[0] And Not $SP_auxret[0] Then Return 0
  284. return $ret[0]
  285. EndFunc ;==>SetPrivilege
  286.  
  287. ;===================================================================================================
  288. ; Function........: _MemoryGetBaseAddress($ah_Handle, $iHD)
  289. ;
  290. ; Description.....: Reads the 'Allocation Base' from the open process.
  291. ;
  292. ; Parameter(s)....: $ah_Handle - An array containing the Dll handle and the handle of the open
  293. ; process as returned by _MemoryOpen().
  294. ; $iHD - Return type:
  295. ; |0 = Hex (Default)
  296. ; |1 = Dec
  297. ;
  298. ; Requirement(s)..: A valid process ID.
  299. ;
  300. ; Return Value(s).: On Success - Returns the 'allocation Base' address and sets @Error to 0.
  301. ; On Failure - Returns 0 and sets @Error to:
  302. ; |1 = Invalid $ah_Handle.
  303. ; |2 = Failed to find correct allocation address.
  304. ; |3 = Failed to read from the specified process.
  305. ;
  306. ; Author(s).......: Nomad. Szhlopp.
  307. ; URL.............: http://www.autoitscript.com/forum/index.php?showtopic=78834
  308. ; Note(s).........: Go to Www.CheatEngine.org for the latest version of CheatEngine.
  309. ;===================================================================================================
  310. Func _MemoryGetBaseAddress($ah_Handle, $iHexDec = 0)
  311.  
  312. Local $iv_Address = 0x00100000
  313. Local $v_Buffer = DllStructCreate('dword;dword;dword;dword;dword;dword;dword')
  314. Local $vData
  315. Local $vType
  316.  
  317. If Not IsArray($ah_Handle) Then
  318. SetError(1)
  319. Return 0
  320. EndIf
  321.  
  322.  
  323. DllCall($ah_Handle[0], 'int', 'VirtualQueryEx', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer))
  324.  
  325. If Not @Error Then
  326.  
  327. $vData = Hex(DllStructGetData($v_Buffer, 2))
  328. $vType = Hex(DllStructGetData($v_Buffer, 3))
  329.  
  330. While $vType <> "00000080"
  331. DllCall($ah_Handle[0], 'int', 'VirtualQueryEx', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer))
  332. $vData = Hex(DllStructGetData($v_Buffer, 2))
  333. $vType = Hex(DllStructGetData($v_Buffer, 3))
  334. If Hex($iv_Address) = "01000000" Then ExitLoop
  335. $iv_Address += 65536
  336.  
  337. WEnd
  338.  
  339. If $vType = "00000080" Then
  340. SetError(0)
  341. If $iHexDec = 1 Then
  342. Return Dec($vData)
  343. Else
  344. Return $vData
  345. EndIf
  346.  
  347. Else
  348. SetError(2)
  349. Return 0
  350. EndIf
  351.  
  352. Else
  353. SetError(3)
  354. Return 0
  355. EndIf
  356.  
  357. EndFunc ;==>_MemoryGetBaseAddress
  358.  
  359. #endregion
  360. ; ----------------------------------------------------------------------------
  361. ; <AUT2EXE INCLUDE-END: C:\Program Files\AutoIt3\Scripts\WoW\Relogger\V1\NomadMemory.au3>
  362. ; ----------------------------------------------------------------------------
  363. ; ----------------------------------------------------------------------------
  364. ; <AUT2EXE INCLUDE-START: C:\Program Files\AutoIt3\Scripts\WoW\Relogger\V1\MouseClick.au3>
  365. ; ----------------------------------------------------------------------------
  366. Func _MouseClickPlus($Window, $Button = "left", $X = "", $Y = "", $Clicks = 1)
  367. Local $MK_LBUTTON = 0x0001
  368. Local $WM_LBUTTONDOWN = 0x0201
  369. Local $WM_LBUTTONUP = 0x0202
  370. Local $MK_RBUTTON = 0x0002
  371. Local $WM_RBUTTONDOWN = 0x0204
  372. Local $WM_RBUTTONUP = 0x0205
  373. Local $WM_MOUSEMOVE = 0x0200
  374. Local $i = 0
  375. Select
  376. Case $Button = "left"
  377. $Button = $MK_LBUTTON
  378. $ButtonDown = $WM_LBUTTONDOWN
  379. $ButtonUp = $WM_LBUTTONUP
  380. Case $Button = "right"
  381. $Button = $MK_RBUTTON
  382. $ButtonDown = $WM_RBUTTONDOWN
  383. $ButtonUp = $WM_RBUTTONUP
  384. EndSelect
  385. If $X = "" OR $Y = "" Then
  386. $MouseCoord = MouseGetPos()
  387. $X = $MouseCoord[0]
  388. $Y = $MouseCoord[1]
  389. EndIf
  390. For $i = 1 to $Clicks
  391. DllCall("user32.dll", "int", "SendMessage", _
  392. "hwnd", WinGetHandle( $Window ), _
  393. "int", $WM_MOUSEMOVE, _
  394. "int", 0, _
  395. "long", _MakeLong($X, $Y))
  396. DllCall("user32.dll", "int", "SendMessage", _
  397. "hwnd", WinGetHandle( $Window ), _
  398. "int", $ButtonDown, _
  399. "int", $Button, _
  400. "long", _MakeLong($X, $Y))
  401. DllCall("user32.dll", "int", "SendMessage", _
  402. "hwnd", WinGetHandle( $Window ), _
  403. "int", $ButtonUp, _
  404. "int", $Button, _
  405. "long", _MakeLong($X, $Y))
  406. Next
  407. EndFunc
  408. Func _MakeLong($LoWord,$HiWord)
  409. Return BitOR($HiWord * 0x10000, BitAND($LoWord, 0xFFFF))
  410. EndFunc
  411. ; ----------------------------------------------------------------------------
  412. ; <AUT2EXE INCLUDE-END: C:\Program Files\AutoIt3\Scripts\WoW\Relogger\V1\MouseClick.au3>
  413. ; ----------------------------------------------------------------------------
  414. ; ----------------------------------------------------------------------------
  415. ; <AUT2EXE INCLUDE-START: C:\Program Files\AutoIt3\Scripts\WoW\Relogger\V1\GUI.au3>
  416. ; ----------------------------------------------------------------------------
  417. $size_diese = 20
  418. $size_name = 90
  419. $size_level = 50
  420. $size_class = 118
  421. $size_screen = 90
  422. $size_relogs = 70
  423. $size_status = 90
  424. $rand = Random(100000000000000, 999999999999999)
  425. $size_y = 195 + 19 * IniRead("settings.ini", "Global", "Lines", 6)
  426. $size_x = 45 + $size_diese + $size_name + $size_level + $size_class + $size_screen + $size_relogs + $size_status
  427. $size_group_main_y = $size_y - 142
  428. $size_group_buttons_y = 50
  429. $size_line_x = 260
  430. $size_setline_x = 210
  431. $size_setline_y = 480+90
  432. $list = 0
  433. $selected = 0
  434. $borderwidth = 0
  435. $titleheight = 0
  436. Global $gridline = 0
  437. Global $gridcolumn = 0
  438. Global $id[99] = [0]
  439. Global $handle[99] = [0]
  440. Global $attached[99] = [0]
  441. Global $started[99] = [0]
  442. Global $line[99] = [0]
  443. Global $number = 0
  444. Global $name[99] = [0]
  445. Global $level[99] = [0]
  446. Global $class[99] = [0]
  447. Global $status[99] = [0]
  448. Global $relog[99] = [0]
  449. Global $relogchar[99] = [0]
  450. Global $SetLine[99] = [0]
  451. Global $cancel[99] = [0]
  452. Global $ok[99] = [0]
  453. Global $name_input[99] = [0]
  454. Global $name_label[99] = [0]
  455. Global $accountcheck[99] = [0]
  456. Global $account_input[99] = [0]
  457. Global $account_label[99] = [0]
  458. Global $password_input[99] = [0]
  459. Global $password_label[99] = [0]
  460. Global $char_input[99] = [0]
  461. Global $char_label[99] = [0]
  462. Global $charexp_label[99] = [0]
  463. Global $relog_input[99] = [0]
  464. Global $relog_label[99] = [0]
  465. Global $time_input[99] = [0]
  466. Global $time_label[99] = [0]
  467. Global $timeexp_label[99] = [0]
  468. Global $class_label[99] = [0]
  469. Global $class_input[99] = [0]
  470. Global $previousstart_size_x[99] = [0]
  471. Global $previousstart_size_y[99] = [0]
  472. Global $previousstart_pos_x[99] = [0]
  473. Global $previousstart_pos_y[99] = [0]
  474. Global $windowmove[99] = [0]
  475. Global $windowmove_grid[99] = [0]
  476. Global $windowmove_xy[99] = [0]
  477. Global $windowmove_x[99] = [0]
  478. Global $windowmove_y[99] = [0]
  479. Global $timer[99] = [0]
  480. Global $WM_NOTIFY = 0x004E
  481. Global $dblclk = 0
  482. Func CreateGUI()
  483. LoadSettings()
  484. Global $window = GUICreate($rand, $size_x, $size_y, 200, 200)
  485. $menu_menu = GUICtrlCreateMenu($menu1_)
  486. $menu_menu_Bouton1 = GUICtrlCreateMenuItem($startall_, $menu_menu)
  487. $menu_menu_Bouton2 = GUICtrlCreateMenuItem($stopall_, $menu_menu)
  488. $menu_menu_Bouton3 = GUICtrlCreateMenuItem($exit_, $menu_menu)
  489. $menu_settings = GUICtrlCreateMenu($menu2_)
  490. $menu_settings_Bouton1 = GUICtrlCreateMenuItem($options_, $menu_settings)
  491. $menu_settings_Bouton2 = GUICtrlCreateMenuItem($credits_, $menu_settings)
  492. GUICtrlSetOnEvent($menu_settings_Bouton2, "Credits")
  493. GUICtrlSetOnEvent($menu_settings_Bouton1, "Settings")
  494. GUICtrlSetOnEvent($menu_menu_Bouton1, "Startall")
  495. GUICtrlSetOnEvent($menu_menu_Bouton2, "Stopall")
  496. SetOnEventA($menu_menu_Bouton3, "close", $paramByVal, 0, $paramByVal, 0)
  497. $group_list = GUICtrlCreateGroup("", 5, 0, $size_x - 10, $size_group_main_y)
  498. LoadList()
  499. Global $group_stats = GUICtrlCreateGroup($statistics_, 5, $size_group_main_y, $size_x - 10 - $size_line_x, $size_y - $size_group_main_y - 25)
  500. Global $group_stats_1 = GUICtrlCreateGroup('', 5+5, $size_group_main_y+10, ($size_x - 10 - $size_line_x-15)/2, $size_y - $size_group_main_y - 25-15)
  501. Global $group_stats_2 = GUICtrlCreateGroup('', 5+5+5+($size_x - 10 - $size_line_x-15)/2, $size_group_main_y+10, ($size_x - 10 - $size_line_x-15)/2, $size_y - $size_group_main_y - 25-15)
  502. $reloglogin_stats = GUICtrlCreateLabel ($reloglogin_, 15,$size_group_main_y+20, 110,17)
  503. Global $reloglogin_value_stats = GUICtrlCreateLabel ("0", 15+120,$size_group_main_y+20, 17,17)
  504. $relogchar_stats = GUICtrlCreateLabel ($relogchar_, 15,$size_group_main_y+20+20, 115,17)
  505. Global $relogchar_value_stats = GUICtrlCreateLabel ("0", 15+120,$size_group_main_y+20+20, 17,17)
  506. $group_buttons_stats = GUICtrlCreateGroup('', $size_x - $size_line_x, $size_group_main_y, $size_line_x - 5, $size_y - $size_group_main_y - $size_group_buttons_y - 25)
  507. $edit = GUICtrlCreateButton($edit_, $size_x - $size_line_x + 5 + 82, $size_group_main_y + 10, 80, 25)
  508. $del = GUICtrlCreateButton($del_, $size_x - $size_line_x + 5 + 82, $size_group_main_y + 10 + 27, 80, 25)
  509. Global $start = GUICtrlCreateButton($start_, $size_x - $size_line_x + 5 + 82 + 82, $size_group_main_y + 10, 80, 25)
  510. Global $stop = GUICtrlCreateButton($stop_, $size_x - $size_line_x + 5 + 82 + 82, $size_group_main_y + 10 + 27, 80, 25)
  511. $new = GUICtrlCreateButton($new_, $size_x - $size_line_x + 5, $size_group_main_y + 10, 80, 25)
  512. $attach = GUICtrlCreateButton($attach_, $size_x - $size_line_x + 5, $size_group_main_y + 10 + 27, 80, 25)
  513. GUICtrlSetOnEvent($del, "Delete")
  514. GUICtrlSetOnEvent($edit, "CreateGUISetline")
  515. GUICtrlSetOnEvent($attach, "Attach")
  516. GUICtrlSetOnEvent($start, "start")
  517. GUICtrlSetOnEvent($stop, "stop")
  518. GUICtrlSetState($start, $GUI_DISABLE)
  519. GUICtrlSetState($stop, $GUI_DISABLE)
  520. $group_buttons = GUICtrlCreateGroup("", $size_x - $size_line_x, $size_y - $size_group_buttons_y - 25, $size_line_x - 5, $size_group_buttons_y)
  521. $refresh = GUICtrlCreateButton($refresh_, $size_x - $size_line_x + 5, $size_y - $size_group_buttons_y - 25 + 13, 80, 30)
  522. $startall = GUICtrlCreateButton($startall_, $size_x - $size_line_x + 5 + 82 + 82, $size_y - $size_group_buttons_y - 25 + 13, 80, 30)
  523. $stopall = GUICtrlCreateButton($stopall_, $size_x - $size_line_x + 5 + 82, $size_y - $size_group_buttons_y - 25 + 13, 80, 30)
  524. GUICtrlSetOnEvent($startall, "startall")
  525. GUICtrlSetOnEvent($stopall, "stopall")
  526. SetOnEventA($new, "CreateGUISetLine", $paramByVal, 99)
  527. SetOnEventA($GUI_EVENT_CLOSE, "close", $paramByVal, 0, $paramByVal, 0)
  528. GUICtrlSetOnEvent($refresh, "LoadList")
  529. GUISetOnEvent($GUI_EVENT_MINIMIZE, "minimize")
  530. GUISetState(@SW_SHOW)
  531. EndFunc
  532. Func LoadSettings()
  533. EndFunc
  534. Func ClicOnListViewItem($i)
  535. GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY")
  536. Sleep("100")
  537. If $dblclk = 1 Then
  538. CreateGUISetLine($i)
  539. $dblclk = 0
  540. Else
  541. Global $selected = $i
  542. UpdateStats()
  543. EndIf
  544. EndFunc
  545. Func Attach($j)
  546. If Not IsDeclared("j") Then
  547. If $selected <> 0 And $selected <> IniRead("settings.ini", "Global", "Number", 0) + 1 Then
  548. $j = $selected
  549. EndIf
  550. EndIf
  551. If IsDeclared("j") Then
  552. GUISetState(@SW_DISABLE, $window)
  553. $time = TimerInit()
  554. TrayTip(IniRead("settings.ini", "Settings " & $j, "Name", ''), $clickonwow_, '', 1)
  555. While TimerDiff($time) < 10000
  556. $wow = WinList("")
  557. For $k = 1 To $wow[0][0]
  558. While WinActive ($rand)
  559. WEnd
  560. If WinActive($wow[$k][1]) Then
  561. $id[$j] = WinGetProcess($wow[$k][1])
  562. $handle[$j] = $wow[$k][1]
  563. TrayTip(IniRead("settings.ini", "Settings " & $j, "Name", ''), $wowloaded_, 1, 1)
  564. WinActivate($rand)
  565. $status[$j] = $attached_
  566. $attached[$j] = 1
  567. $started[$j] = 0
  568. LoadMemory ($j)
  569. GetChar($j)
  570. GetScreens()
  571. LoadList()
  572. UpdateStats()
  573. GUISetState(@SW_ENABLE, $window)
  574. Sleep ("200")
  575. ExitLoop (2)
  576. EndIf
  577. Next
  578. WEnd
  579. If TimerDiff($time) > 10000 Then
  580. TrayTip(IniRead("settings.ini", "Settings " & $j, "Name", ''), $failedtoload_, '', 3)
  581. GUISetState(@SW_ENABLE, $window)
  582. EndIf
  583. EndIf
  584. EndFunc
  585. Func WoWWindowSet ($j)
  586. $tmp=WinGetPos ($handle[$j])
  587. If $tmp[2]<>IniRead ("settings.ini", "Global", "Size X", 800)+2*IniRead("settings.ini", "Global", "Border Width",6) Or $previousstart_size_x[$j]='' Then
  588. $previousstart_size_x[$j] = $tmp[2]
  589. $previousstart_size_y[$j] = $tmp[3]
  590. EndIf
  591. If $tmp[0]<>IniRead ("settings.ini", "Settings "&$j, "Move X", 0) Or $previousstart_pos_x[$j]='' Then
  592. $previousstart_pos_x[$j] = $tmp[0]
  593. $previousstart_pos_y[$j] = $tmp[1]
  594. EndIf
  595. If IniRead ("settings.ini", "Global", "Rename", 4)=1 Then
  596. WinSetTitle ($handle[$j], "", IniRead("settings.ini", "Settings "&$j, "Name", "World of Warcraft"))
  597. EndIf
  598. If IniRead ("settings.ini", "Global", "Resize", 4)=1 Then
  599. $previouspos = WinGetPos ($handle[$j])
  600. WinMove ($handle[$j], '', $previouspos[0], $previouspos[1], IniRead ("settings.ini", "Global", "Size X", 800)+2*IniRead("settings.ini", "Global", "Border Width",6),IniRead ("settings.ini", "Global", "Size Y", 600)+2*IniRead("settings.ini", "Global", "Border Width",6)+IniRead("settings.ini", "Global", "Title Height",19))
  601. EndIf
  602. If IniRead ("settings.ini", "Settings "&$j, "Move", 4)=1 Then
  603. $previouspos = WinGetPos ($handle[$j])
  604. If IniRead("settings.ini", "Settings "&$j, "Move Method", 'XY') = 'XY' Then
  605. WinMove ($handle[$j], '', IniRead("settings.ini", "Settings "&$j, "Move X", 0) , IniRead("settings.ini", "Settings "&$j, "Move Y", 0), $previouspos[2], $previouspos[3])
  606. Else
  607. If IniRead ("settings.ini", "Global", "Resize", 4)=1 Then
  608. $ysize = IniRead ("settings.ini", "Global", "Size Y", 600)
  609. $xsize = IniRead ("settings.ini", "Global", "Size X", 800)
  610. Else
  611. $ysize = $previouspos[1]
  612. $xsize = $previouspos[0]
  613. EndIf
  614. If ($gridline+1)*(IniRead ("settings.ini", "Global", "Title Height", 19)+2*IniRead ("settings.ini", "Global", "Border Width", 6)+$ysize)>@DesktopHeight Then
  615. $gridline=0
  616. $gridcolumn=$gridcolumn+1
  617. Endif
  618. $calculated_x = $gridcolumn * (2*IniRead ("settings.ini", "Global", "Border Width", 6)+$xsize)
  619. $calculated_y = $gridline * (IniRead ("settings.ini", "Global", "Title Height", 19)+2*IniRead ("settings.ini", "Global", "Border Width", 6)+$ysize)
  620. WinMove ($handle[$j], '', $calculated_x , $calculated_y, $previouspos[2], $previouspos[3])
  621. $gridline=$gridline+1
  622. EndIf
  623. EndIf
  624. EndFunc
  625. Func WoWWindowSetPrevious ($j)
  626. If IniRead ("settings.ini", "Global", "Resize", 4)=1 Then
  627. $previouspos = WinGetPos ($handle[$j])
  628. WinMove ($handle[$j], '', $previouspos[0], $previouspos[1], $previousstart_size_x[$j],$previousstart_size_y[$j])
  629. EndIf
  630. If IniRead ("settings.ini", "Settings "&$j, "Move", 4)=1 Then
  631. $previouspos = WinGetPos ($handle[$j])
  632. WinMove ($handle[$j], '', $previousstart_pos_x[$j], $previousstart_pos_y[$j], $previouspos[2],$previouspos[3])
  633. EndIf
  634. $gridline=0
  635. $gridcolumn = 0
  636. EndFunc
  637. Func UpdateStats()
  638. If $attached[$selected] = 1 Then
  639. GUICtrlSetState($start, $GUI_ENABLE)
  640. GUICtrlSetState($stop, $GUI_ENABLE)
  641. Else
  642. GUICtrlSetState($start, $GUI_DISABLE)
  643. GUICtrlSetState($stop, $GUI_DISABLE)
  644. EndIf
  645. GUICtrlDelete($group_stats)
  646. $group_stats = GUICtrlCreateGroup(" " & IniRead("settings.ini", "Settings " & $selected, "Name", "Statistics") & " ", 5, $size_group_main_y, $size_x - 10 - $size_line_x, $size_y - $size_group_main_y - 25)
  647. GUICtrlDelete($reloglogin_value_stats)
  648. $reloglogin_value_stats = GUICtrlCreateLabel ($relog[$selected], 15+120,$size_group_main_y+20, 17,17)
  649. GUICtrlDelete($relogchar_value_stats)
  650. $relogchar_value_stats = GUICtrlCreateLabel ($relogchar[$selected], 15+120,$size_group_main_y+20+20, 17,17)
  651. EndFunc
  652. Func Close($i, $j)
  653. If $i = 0 Then
  654. Exit
  655. ElseIf $i = 1 Then
  656. Save($j)
  657. ElseIf $i = 2 Then
  658. GUIDelete($SetLine[$j])
  659. GUISetState(@SW_ENABLE, $window)
  660. WinActivate($rand)
  661. ElseIf $i = 3 Then
  662. SaveSettings()
  663. ElseIf $i = 4 Then
  664. GUIDelete($settings)
  665. GUISetState(@SW_ENABLE, $window)
  666. WinActivate($rand)
  667. EndIf
  668. EndFunc
  669. Func Save($i)
  670. $char_tmp = GUICtrlRead($char_input[$i])
  671. If GUICtrlRead($name_input[$i]) = '' Or GUICtrlRead($relog_input[$i]) = '' Or GUICtrlRead($time_input[$i]) = '' Or GUICtrlRead($account_input[$i]) = '' Or GUICtrlRead($password_input[$i]) = '' Or GUICtrlRead($char_input[$i]) = '' Or GUICtrlRead($class_input[$i]) = '' Then
  672. MsgBox(48, $error_, $fillsettings_)
  673. Else
  674. If $i > IniRead("settings.ini", "Global", "Number", 0) Then
  675. IniWrite("settings.ini", "Global", "Number", $i)
  676. EndIf
  677. IniWrite("settings.ini", "Settings " & $i, "Name", GUICtrlRead($name_input[$i]))
  678. IniWrite("settings.ini", "Settings " & $i, "Account", GUICtrlRead($account_input[$i]))
  679. IniWrite("settings.ini", "Settings " & $i, "Password", GUICtrlRead($password_input[$i]))
  680. IniWrite("settings.ini", "Settings " & $i, "Character", GUICtrlRead($char_input[$i]))
  681. IniWrite("settings.ini", "Settings " & $i, "Class", GUICtrlRead($class_input[$i]))
  682. $class[$i] = GUICtrlRead($class_input[$i])
  683. IniWrite("settings.ini", "Settings " & $i, "Relogs", GUICtrlRead($relog_input[$i]))
  684. IniWrite("settings.ini", "Settings " & $i, "Time", GUICtrlRead($time_input[$i]))
  685. IniWrite("settings.ini", "Settings " & $i, "AccountInput", GUICtrlRead($accountcheck[$i]))
  686. IniWrite("settings.ini", "Settings " & $i, "Move", GUICtrlRead($windowmove[$i]))
  687. If GUICtrlRead($windowmove[$i])=1 Then
  688. If GUICtrlRead($windowmove_grid[$i])=1 Then
  689. IniWrite("settings.ini", "Settings " & $i, "Move Method", 'Grid')
  690. Else
  691. IniWrite("settings.ini", "Settings " & $i, "Move Method", 'XY')
  692. If GUICtrlRead($windowmove_x[$i])<>'X' And GUICtrlRead($windowmove_y[$i])<>'Y' Then
  693. IniWrite("settings.ini", "Settings " & $i, "Move X", GUICtrlRead($windowmove_x[$i]))
  694. IniWrite("settings.ini", "Settings " & $i, "Move Y", GUICtrlRead($windowmove_y[$i]))
  695. Else
  696. IniWrite("settings.ini", "Settings " & $i, "Move X", 0)
  697. IniWrite("settings.ini", "Settings " & $i, "Move Y", 0)
  698. EndIf
  699. EndIf
  700. EndIf
  701. GUIDelete($SetLine[$i])
  702. GUISetState(@SW_ENABLE, $window)
  703. WinActivate($rand)
  704. LoadList()
  705. EndIf
  706. EndFunc
  707. Func LoadList()
  708. GUICtrlDelete($list)
  709. Global $list = GUICtrlCreateListView("#|" & $name_ & "|" & $level_ & "|" & $class_ & "|" & $screen_ & "|" & $relogslist_ & "|" & $status_, 12, 14, $size_x - 24, $size_group_main_y - 24, BitAND($LVS_SORTASCENDING, $LVS_EX_FULLROWSELECT))
  710. GUICtrlSendMsg($list, 0x101E, 0, $size_diese)
  711. GUICtrlSendMsg($list, 0x101E, 1, $size_name)
  712. GUICtrlSendMsg($list, 0x101E, 2, $size_level)
  713. GUICtrlSendMsg($list, 0x101E, 3, $size_class)
  714. GUICtrlSendMsg($list, 0x101E, 4, $size_screen)
  715. GUICtrlSendMsg($list, 0x101E, 5, $size_relogs)
  716. GUICtrlSendMsg($list, 0x101E, 6, $size_status)
  717. For $i = 1 To IniRead("settings.ini", "Global", "Number", 0)
  718. $line[$i] = GUICtrlCreateListViewItem($i & "|" & IniRead("settings.ini", "Settings " & $i, "Name", '') & "|" & $level[$i] & "|" & $class[$i] & "|" & $screen[$i] & "|" & $relog[$i] & "/" & IniRead("settings.ini", "Settings " & $i, "Relogs", 0) & "|" & $status[$i], $list)
  719. If Round($i / 2, 0) <> $i / 2 Then
  720. GUICtrlSetBkColor($line[$i], 0xD7E4F2)
  721. EndIf
  722. SetOnEventA($line[$i], "ClicOnListViewItem", $paramByVal, $i)
  723. Next
  724. $line[IniRead("settings.ini", "Global", "Number", 0) + 1] = GUICtrlCreateListViewItem(IniRead("settings.ini", "Global", "Number", 0) + 1 & "|" & $new_, $list)
  725. GUICtrlSetBkColor($line[IniRead("settings.ini", "Global", "Number", 0) + 1], 0x99B4D1)
  726. SetOnEventA($line[IniRead("settings.ini", "Global", "Number", 0) + 1], "ClicOnListViewItem", $paramByVal, IniRead("settings.ini", "Global", "Number", 0) + 1)
  727. EndFunc
  728. Func Delete()
  729. IniDelete("settings.ini", "Settings " & $selected)
  730. If $selected <> IniRead("settings.ini", "Global", "Number", 0) + 1 And $selected <> 0 Then
  731. IniWrite("settings.ini", "Global", "Number", IniRead("settings.ini", "Global", "Number", 1) - 1)
  732. EndIf
  733. Organize()
  734. LoadList()
  735. EndFunc
  736. Func Organize()
  737. For $i = 1 To IniRead("settings.ini", "Global", "Number", 1) + 1
  738. If IniRead("settings.ini", "Settings " & $i, "Name", '') = '' Then
  739. IniWrite("settings.ini", "Settings " & $i, "Name", IniRead("settings.ini", "Settings " & $i + 1, "Name", ''))
  740. IniWrite("settings.ini", "Settings " & $i, "Account", IniRead("settings.ini", "Settings " & $i + 1, "Account", ''))
  741. IniWrite("settings.ini", "Settings " & $i, "Password", IniRead("settings.ini", "Settings " & $i + 1, "Password", ''))
  742. IniWrite("settings.ini", "Settings " & $i, "Character", IniRead("settings.ini", "Settings " & $i + 1, "Character", ''))
  743. IniWrite("settings.ini", "Settings " & $i, "Relogs", IniRead("settings.ini", "Settings " & $i + 1, "Relogs", ''))
  744. IniWrite("settings.ini", "Settings " & $i, "Time", IniRead("settings.ini", "Settings " & $i + 1, "Time", ''))
  745. IniDelete("settings.ini", "Settings " & $i + 1)
  746. EndIf
  747. Next
  748. EndFunc
  749. Func Credits()
  750. MsgBox(64, $credits_, $reloggername & " v " & $version & @CR & @CR & "a_m_a_u_r_y@hotmail.com" & @CR & "www.coincoingold.com/AmauryBot")
  751. EndFunc
  752. Func Calibrate()
  753. GUISetState(@SW_DISABLE, $options_)
  754. $time_calib = TimerInit()
  755. TrayTip($calibrate_, $clickonwowcalib_, '', 1)
  756. While TimerDiff($time_calib) < 10000
  757. If WinActive('World of Warcraft') Then
  758. $wow_calib = WinList('World of Warcraft')
  759. For $k = 1 To $wow_calib[0][0]
  760. If WinActive($wow_calib[$k][1]) Then
  761. $winsize = WinGetPos($wow_calib[$k][1])
  762. $borderwidth = ($winsize[2] - 800) / 2
  763. $titleheight = $winsize[3] - 600 - (2 * $borderwidth)
  764. IniWrite("settings.ini", "Global", "Title Height", $titleheight)
  765. IniWrite("settings.ini", "Global", "Border Width", $borderwidth)
  766. ExitLoop (2)
  767. EndIf
  768. Next
  769. EndIf
  770. WEnd
  771. If TimerDiff($time_calib) > 10000 Then
  772. TrayTip($calibrate_, $failedtocalib_, '', 3)
  773. GUISetState(@SW_ENABLE, $options_)
  774. WinActivate($rand)
  775. WinActivate($options_)
  776. Else
  777. TrayTip($calibrate_, $wowcalibrated_ & " :" & @CR & $borderwidth_ & " : " & $borderwidth & @CR & $titleheight_ & " : " & $titleheight & @CR & $calibrateexp2_, 1, 1)
  778. GUISetState(@SW_ENABLE, $options_)
  779. WinActivate($rand)
  780. WinActivate($options_)
  781. EndIf
  782. EndFunc
  783. Func SaveSettings()
  784. If GUICtrlRead($linesnumber) >= 3 Then
  785. $var = GUICtrlRead($linesnumber)
  786. Else
  787. $var = 3
  788. EndIf
  789. IniWrite("settings.ini", "Global", "Lines", $var)
  790. If GUICtrlRead($fr) = 1 Then
  791. IniWrite("settings.ini", "Global", "Language", "fr")
  792. ElseIf GUICtrlRead($en) = 1 Then
  793. IniWrite("settings.ini", "Global", "Language", "en")
  794. EndIf
  795. IniWrite("settings.ini", "Global", "Resize", GUICtrlRead($windowsize))
  796. If GUICtrlRead ($x_size)<>'' Then
  797. IniWrite ("settings.ini", "Global", "Size X", GUICtrlRead ($x_size))
  798. IniWrite ("settings.ini", "Global", "Size Y", GUICtrlRead ($y_size))
  799. EndIf
  800. IniWrite("settings.ini", "Global", "Rename", GUICtrlRead($rename))
  801. If GUICtrlRead($fr) = 1 Then
  802. For $k = 1 To IniRead("settings.ini", "Global", "Number", 0)
  803. If IniRead("settings.ini", "Settings " & $k, "Class", 0) = 'Death Knight' Then
  804. IniWrite("settings.ini", "Settings " & $k, "Class", "Chevalier de la mort")
  805. EndIf
  806. If IniRead("settings.ini", "Settings " & $k, "Class", 0) = 'Druid' Then
  807. IniWrite("settings.ini", "Settings " & $k, "Class", "Druide")
  808. EndIf
  809. If IniRead("settings.ini", "Settings " & $k, "Class", 0) = 'Hunter' Then
  810. IniWrite("settings.ini", "Settings " & $k, "Class", "Chasseur")
  811. EndIf
  812. If IniRead("settings.ini", "Settings " & $k, "Class", 0) = 'Mage' Then
  813. IniWrite("settings.ini", "Settings " & $k, "Class", "Mage")
  814. EndIf
  815. If IniRead("settings.ini", "Settings " & $k, "Class", 0) = 'Paladin' Then
  816. IniWrite("settings.ini", "Settings " & $k, "Class", "Paladin")
  817. EndIf
  818. If IniRead("settings.ini", "Settings " & $k, "Class", 0) = 'Priest' Then
  819. IniWrite("settings.ini", "Settings " & $k, "Class", "Pr�tre")
  820. EndIf
  821. If IniRead("settings.ini", "Settings " & $k, "Class", 0) = 'Rogue' Then
  822. IniWrite("settings.ini", "Settings " & $k, "Class", "Voleur")
  823. EndIf
  824. If IniRead("settings.ini", "Settings " & $k, "Class", 0) = 'Shaman' Then
  825. IniWrite("settings.ini", "Settings " & $k, "Class", "Chaman")
  826. EndIf
  827. If IniRead("settings.ini", "Settings " & $k, "Class", 0) = 'Warlock' Then
  828. IniWrite("settings.ini", "Settings " & $k, "Class", "D�moniste")
  829. EndIf
  830. If IniRead("settings.ini", "Settings " & $k, "Class", 0) = 'Warrior' Then
  831. IniWrite("settings.ini", "Settings " & $k, "Class", "Guerrier")
  832. EndIf
  833. Next
  834. ElseIf GUICtrlRead($en) = 1 Then
  835. For $k = 1 To IniRead("settings.ini", "Global", "Number", 0)
  836. If IniRead("settings.ini", "Settings " & $k, "Class", 0) = 'Chevalier de la mort' Then
  837. IniWrite("settings.ini", "Settings " & $k, "Class", "Death Knight")
  838. EndIf
  839. If IniRead("settings.ini", "Settings " & $k, "Class", 0) = 'Druide' Then
  840. IniWrite("settings.ini", "Settings " & $k, "Class", "Druid")
  841. EndIf
  842. If IniRead("settings.ini", "Settings " & $k, "Class", 0) = 'Chasseur' Then
  843. IniWrite("settings.ini", "Settings " & $k, "Class", "Hunter")
  844. EndIf
  845. If IniRead("settings.ini", "Settings " & $k, "Class", 0) = 'Mage' Then
  846. IniWrite("settings.ini", "Settings " & $k, "Class", "Mage")
  847. EndIf
  848. If IniRead("settings.ini", "Settings " & $k, "Class", 0) = 'Paladin' Then
  849. IniWrite("settings.ini", "Settings " & $k, "Class", "Paladin")
  850. EndIf
  851. If IniRead("settings.ini", "Settings " & $k, "Class", 0) = 'Pr�tre' Then
  852. IniWrite("settings.ini", "Settings " & $k, "Class", "Priest")
  853. EndIf
  854. If IniRead("settings.ini", "Settings " & $k, "Class", 0) = 'Voleur' Then
  855. IniWrite("settings.ini", "Settings " & $k, "Class", "Rogue")
  856. EndIf
  857. If IniRead("settings.ini", "Settings " & $k, "Class", 0) = 'Chaman' Then
  858. IniWrite("settings.ini", "Settings " & $k, "Class", "Shaman")
  859. EndIf
  860. If IniRead("settings.ini", "Settings " & $k, "Class", 0) = 'D�moniste' Then
  861. IniWrite("settings.ini", "Settings " & $k, "Class", "Warlock")
  862. EndIf
  863. If IniRead("settings.ini", "Settings " & $k, "Class", 0) = 'Guerrier' Then
  864. IniWrite("settings.ini", "Settings " & $k, "Class", "Warrior")
  865. EndIf
  866. Next
  867. EndIf
  868. GUIDelete($settings)
  869. GUISetState(@SW_ENABLE, $window)
  870. WinActivate($rand)
  871. EndFunc
  872. Func Start()
  873. If $selected <= IniRead("settings.ini", "Global", "Number", 0) And $attached[$selected] = 1 Then
  874. $started[$selected] = 1
  875. $relog[$selected] = 0
  876. $timer[$selected] = TimerInit()
  877. $status[$selected] = $started_
  878. WoWWindowSet ($selected)
  879. $gridcolumn = 0
  880. $gridline = 0
  881. EndIf
  882. EndFunc
  883. Func StartAll()
  884. For $k = 1 To IniRead("settings.ini", "Global", "Number", 0)
  885. If $attached[$k] = 1 Then
  886. $relog[$k] = 0
  887. $started[$k] = 1
  888. $timer[$k] = TimerInit()
  889. $status[$k] = $started_
  890. WoWWindowSet ($k)
  891. EndIf
  892. Next
  893. $gridcolumn = 0
  894. $gridline = 0
  895. LoadList()
  896. EndFunc
  897. Func Stop()
  898. If $started[$selected] = 1 Then
  899. $started[$selected] = 0
  900. $status[$selected] = $notstarted_
  901. WoWWindowSetPrevious ($selected)
  902. EndIf
  903. LoadList()
  904. EndFunc
  905. Func StopAll()
  906. For $k = 1 To IniRead("settings.ini", "Global", "Number", 0)
  907. If $started[$k] = 1 Then
  908. $started[$k] = 0
  909. $status[$k] = $notstarted_
  910. WoWWindowSetPrevious ($k)
  911. EndIf
  912. Next
  913. LoadList()
  914. EndFunc
  915. Func CheckAttach()
  916. For $k = 1 To IniRead("settings.ini", "Global", "Number", 0)
  917. If Not WinExists($handle[$k]) Then
  918. $attached[$k] = 0
  919. $started[$k] = 0
  920. $status[$k] = $notattached_
  921. $screen[$k] = ''
  922. EndIf
  923. Next
  924. EndFunc
  925. Func Minimize()
  926. GUISetState(@SW_HIDE)
  927. EndFunc
  928. Func Maximize()
  929. GUISetState(@SW_SHOW)
  930. WinActivate($rand)
  931. EndFunc
  932. Func ItemExit()
  933. Exit
  934. EndFunc
  935. ; ----------------------------------------------------------------------------
  936. ; <AUT2EXE INCLUDE-END: C:\Program Files\AutoIt3\Scripts\WoW\Relogger\V1\GUI.au3>
  937. ; ----------------------------------------------------------------------------
  938. ; ----------------------------------------------------------------------------
  939. ; <AUT2EXE INCLUDE-START: C:\Program Files\AutoIt3\Scripts\WoW\Relogger\V1\GUICreate.au3>
  940. ; ----------------------------------------------------------------------------
  941. Func Settings()
  942. $pos = WinGetPos($rand)
  943. Global $settings = GUICreate($options_, 200, 440, $pos[0] + $size_x + 15, $pos[1], '')
  944. SetOnEventA($GUI_EVENT_CLOSE, "close", $paramByVal, 3, $paramByVal, 3)
  945. $cancelsettings = GUICtrlCreateButton($cancel_, 1, 300 - 52 + 50+90, 96, 25)
  946. $oksettings = GUICtrlCreateButton($ok_, 97, 300 - 52 + 50+90, 96, 25)
  947. $group_rename = GUICtrlCreateGroup(" " & $rename_ & " ", 5, 300 - 52 + 50, 185, 85)
  948. Global $rename = GUICtrlCreateCheckbox (" "&$renameexp_, 10, 300 - 52 + 50 +15, 170, 20)
  949. Global $windowsize = GUICtrlCreateCheckbox (" "&$windowsizeexp_, 10, 300 - 52 + 50 +15+25, 170, 17)
  950. Global $labelx = GUICtrlCreateLabel ("X :", 25, 300 - 52 + 50 +15+25+20, 15, 15)
  951. Global $x_size = GUICtrlCreateInput (IniRead ("settings.ini", "Global", "Size X", ''), 40, 300 - 52 + 50 +15+25+20, 50, 17)
  952. Global $labely = GUICtrlCreateLabel ("Y :", 100, 300 - 52 + 50 +15+25+20, 15, 15)
  953. Global $y_size = GUICtrlCreateInput (IniRead ("settings.ini", "Global", "Size Y", ''), 115, 300 - 52 + 50 +15+25+20, 50, 17)
  954. If IniRead("settings.ini", "Global", "Rename", 4)=1 Then
  955. GUICtrlSetState ($rename, $GUI_CHECKED)
  956. EndIf
  957. If IniRead("settings.ini", "Global", "Resize", 4)=1 Then
  958. GUICtrlSetState ($windowsize, $GUI_CHECKED)
  959. EndIf
  960. If IniRead("settings.ini", "Global", "Resize", 4)=4 Then
  961. GUICtrlSetState ($x_size, $GUI_DISABLE)
  962. GUICtrlSetState ($y_size, $GUI_DISABLE)
  963. EndIf
  964. GUICtrlSetOnEvent ($windowsize, "WindowSizePressed")
  965. GUICtrlSetOnEvent ($x_size, "XSizePressed")
  966. GUICtrlSetOnEvent ($y_size, "YSizePressed")
  967. $group_lang = GUICtrlCreateGroup(" " & $lang_ & " ", 5, 5, 185, 70)
  968. Global $fr = GUICtrlCreateRadio($fr_, 35, 20, 60, 20)
  969. Global $en = GUICtrlCreateRadio($en_, 125, 20, 60, 20)
  970. $pic_fr = GUICtrlCreatePic("fr.gif", 15, 25, 15, 11)
  971. $pic_en = GUICtrlCreatePic("gb.gif", 105, 25, 15, 11)
  972. $langexp = GUICtrlCreateLabel($langexp_, 10, 45, 170, 25, $SS_CENTER)
  973. GUICtrlSetFont(-1, 8)
  974. GUICtrlSetColor(-1, 0x808080)
  975. $group_calibrate = GUICtrlCreateGroup(" " & $calibrate_ & " ", 5, 75, 185, 140)
  976. $calibreateexp1 = GUICtrlCreateLabel($calibrateexp1_, 10, 90, 170, 70, $SS_CENTER)
  977. GUICtrlSetFont(-1, 8)
  978. $calibrateexp = GUICtrlCreateLabel($calibrateexp_, 10, 185, 170, 25, $SS_CENTER)
  979. GUICtrlSetFont(-1, 8)
  980. GUICtrlSetColor(-1, 0x808080)
  981. $calib = GUICtrlCreateButton($attach_, 50, 160, 100, 20, $SS_CENTER)
  982. GUICtrlSetOnEvent($calib, "Calibrate")
  983. $group_size = GUICtrlCreateGroup(" " & $windowsize_ & " ", 5, 215, 185, 80)
  984. $windowsizeexp1 = GUICtrlCreateLabel($windowsizeexp_, 10, 230, 170, 15, $SS_CENTER)
  985. GUICtrlSetFont(-1, 8)
  986. Global $linesnumber = GUICtrlCreateInput(IniRead("settings.ini", "Global", "Lines", ''), 60, 245, 80, 20, $SS_CENTER)
  987. $windowsizeexp = GUICtrlCreateLabel($langexp_, 10, 265, 170, 25, $SS_CENTER)
  988. GUICtrlSetFont(-1, 8)
  989. GUICtrlSetColor(-1, 0x808080)
  990. SetOnEventA($oksettings, "close", $paramByVal, 3, $paramByVal, 3)
  991. SetOnEventA($cancelsettings, "close", $paramByVal, 4, $paramByVal, 4)
  992. GUISetState(@SW_SHOW)
  993. GUISetState(@SW_DISABLE, $window)
  994. If IniRead("settings.ini", "Global", "Language", "en") = 'en' Then
  995. GUICtrlSetState($en, $GUI_CHECKED)
  996. GUICtrlSetState($fr, $GUI_UNCHECKED)
  997. Else
  998. GUICtrlSetState($en, $GUI_UNCHECKED)
  999. GUICtrlSetState($fr, $GUI_CHECKED)
  1000. EndIf
  1001. EndFunc
  1002. Func WindowSizePressed ()
  1003. If GUICtrlRead ($windowsize)=1 Then
  1004. GUICtrlSetState ($x_size, $GUI_ENABLE)
  1005. GUICtrlSetState ($y_size, $GUI_ENABLE)
  1006. Else
  1007. GUICtrlSetState ($x_size, $GUI_DISABLE)
  1008. GUICtrlSetState ($y_size, $GUI_DISABLE)
  1009. EndIf
  1010. EndFunc
  1011. Func XSizePressed ()
  1012. GUICtrlSetData ($y_size, Round(GUICtrlRead($x_size)*(6/8),0))
  1013. EndFunc
  1014. Func YSizePressed ()
  1015. GUICtrlSetData ($x_size, Round(GUICtrlRead($y_size)*(8/6),0))
  1016. EndFunc
  1017. Func CreateGUISetLine($i)
  1018. If Not IsDeclared("i") Then
  1019. If $selected <> 0 Then
  1020. $i = $selected
  1021. Else
  1022. $i = IniRead("settings.ini", "Global", "Number", '') + 1
  1023. EndIf
  1024. EndIf
  1025. If $i = 99 Then
  1026. $i = IniRead("settings.ini", "Global", "Number", 0) + 1
  1027. EndIf
  1028. If IsDeclared("i") Then
  1029. $pos = WinGetPos($rand)
  1030. $SetLine[$i] = GUICreate(IniRead("settings.ini", "Settings " & $i, "Name", $new_), $size_setline_x, $size_setline_y - 20-45, $pos[0] + $size_x + 15, $pos[1], '', '')
  1031. GUISetState()
  1032. $cancel[$i] = GUICtrlCreateButton($cancel_, 1, $size_setline_y - 52 - 20 - 45, $size_setline_x / 2 - 4, 25)
  1033. $ok[$i] = GUICtrlCreateButton($ok_, $size_setline_x / 2 - 3, $size_setline_y - 52 - 20 - 45, $size_setline_x / 2 - 4, 25)
  1034. GUICtrlCreateGroup(" " & $relog_ & " ", 5, 5, $size_setline_x - 16, ($size_setline_y - 75 + 20) / 2 - 20)
  1035. $name_input[$i] = GUICtrlCreateInput(IniRead("settings.ini", "Settings " & $i, "Name", ""), ($size_setline_x - 160) / 2, 30 + 15, 160, 20)
  1036. $name_label[$i] = GUICtrlCreateLabel($name_, ($size_setline_x - 160) / 2, 30, 160, 15, $SS_CENTER)
  1037. $relog_input[$i] = GUICtrlCreateInput(IniRead("settings.ini", "Settings " & $i, "Relogs", ""), ($size_setline_x - 80) / 2, 30 + 30 + 20 + 15, 80, 20, $SS_CENTER)
  1038. $relog_label[$i] = GUICtrlCreateLabel($relogs_, ($size_setline_x - 160) / 2, 30 + 30 + 20, 160, 15, $SS_CENTER)
  1039. $time_input[$i] = GUICtrlCreateInput(IniRead("settings.ini", "Settings " & $i, "Time", ""), ($size_setline_x - 80) / 2, 30 + 30 + 20 + 15 + 30 + 20, 80, 20, $SS_CENTER)
  1040. $time_label[$i] = GUICtrlCreateLabel($time_, ($size_setline_x - 160) / 2, 30 + 30 + 20 + 30 + 20, 160, 15, $SS_CENTER)
  1041. $timeexp_label[$i] = GUICtrlCreateLabel($timeexp_, ($size_setline_x - 100) / 2, 30 + 30 + 20 + 30 + 20 + 30 + 5, 100, 12, $SS_CENTER)
  1042. GUICtrlSetFont(-1, 8)
  1043. GUICtrlSetColor(-1, 0x808080)
  1044. $windowmove[$i] = GUICtrlCreateCheckbox ($move_ , 15, 30 + 30 + 20 + 30 + 20 + 30 + 5 + 20, 120, 15)
  1045. $windowmove_grid[$i] = GUICtrlCreateRadio ($move_grid_,20, 30 + 30 + 20 + 30 + 20 + 30 + 5 + 20+20, 110, 15)
  1046. $windowmove_xy[$i] = GUICtrlCreateRadio ($move_xy_ & " :",20, 30 + 30 + 20 + 30 + 20 + 30 + 5 + 20+20+15, 70, 15)
  1047. $windowmove_x[$i] = GUICtrlCreateInput (IniRead ("settings.ini", "Settings "&$i, "Move X", 'X'),20+40+40, 30 + 30 + 20 + 30 + 20 + 30 + 5 + 20+20+15, 30, 15)
  1048. $windowmove_y[$i] = GUICtrlCreateInput (IniRead ("settings.ini", "Settings "&$i, "Move Y", 'Y'),20+40+40+40, 30 + 30 + 20 + 30 + 20 + 30 + 5 + 20+20+15, 30, 15)
  1049. If IniRead ("settings.ini", "Settings " &$i, "Move",4)=1 Then
  1050. GUICtrlSetState($windowmove[$i], $GUI_CHECKED)
  1051. If IniRead ("settings.ini", "Settings "&$i, "Move Method", 'Grid')='Grid' Then
  1052. GUICtrlSetState ($windowmove_grid[$i], $GUI_CHECKED)
  1053. Else
  1054. GUICtrlSetState ($windowmove_xy[$i], $GUI_CHECKED)
  1055. EndIf
  1056. EndIf
  1057. If GUIctrlread($windowmove[$i])=4 Then
  1058. GUICtrlSetState ($windowmove_grid[$i], $GUI_DISABLE)
  1059. GUICtrlSetState ($windowmove_xy[$i], $GUI_DISABLE)
  1060. Else
  1061. GUICtrlSetState ($windowmove_grid[$i], $GUI_ENABLE)
  1062. GUICtrlSetState ($windowmove_xy[$i], $GUI_ENABLE)
  1063. EndIf
  1064. If GUIctrlread($windowmove_xy[$i])=4 Then
  1065. GUICtrlSetState ($windowmove_x[$i], $GUI_DISABLE)
  1066. GUICtrlSetState ($windowmove_y[$i], $GUI_DISABLE)
  1067. Else
  1068. GUICtrlSetState ($windowmove_x[$i], $GUI_ENABLE)
  1069. GUICtrlSetState ($windowmove_y[$i], $GUI_ENABLE)
  1070. EndIf
  1071. SetOnEventA ( $windowmove_grid[$i], "Windowmoveradiopressed",$paramByVal, $i)
  1072. SetOnEventA ( $windowmove_xy[$i], "Windowmoveradiopressed",$paramByVal, $i)
  1073. SetOnEventA ( $windowmove[$i], "Windowmoveclick",$paramByVal, $i)
  1074. GUICtrlCreateGroup(" " & $wow_ & " ", 5, 1 + 10 + ($size_setline_y - 75 + 20) / 2 - 20, $size_setline_x - 16, ($size_setline_y - 75) / 2 - 45)
  1075. $accountcheck[$i] = GUICtrlCreateCheckbox ("" , (($size_setline_x - 80) / 2)-55, (30 + 1 + 5 + ($size_setline_y - 75) / 2 - 17)+14, 15, 15)
  1076. $account_input[$i] = GUICtrlCreateInput(IniRead("settings.ini", "Settings " & $i, "Account", ""), ($size_setline_x - 160) / 2, 30 + 20 + 1 + ($size_setline_y - 75) / 2 - 20, 160, 20)
  1077. $account_label[$i] = GUICtrlCreateLabel($wowusername_, ($size_setline_x - 80) / 2, 30 + 1 + 5 + ($size_setline_y - 75) / 2 - 20, 80, 15, $SS_CENTER)
  1078. $password_input[$i] = GUICtrlCreateInput(IniRead("settings.ini", "Settings " & $i, "Password", ""), ($size_setline_x - 160) / 2, 30 + 30 + 20 + 20 + 1 + ($size_setline_y - 75) / 2 - 20, 160, 20)
  1079. $password_label[$i] = GUICtrlCreateLabel($wowpassword_, ($size_setline_x - 80) / 2, 30 + 1 + 5 + 30 + 20 + ($size_setline_y - 75) / 2 - 20, 80, 15, $SS_CENTER)
  1080. $char_input[$i] = GUICtrlCreateCombo(IniRead("settings.ini", "Settings " & $i, "Character", "0"), 15, 30 + 30 + 20 + 20 + 1 + 30 + 20 + ($size_setline_y - 75) / 2 - 20, 35, 20)
  1081. GUICtrlSetData($char_input[$i], "1|2|3|4|5|6|7|8|9|10")
  1082. $class_input[$i] = GUICtrlCreateCombo(IniRead("settings.ini", "Settings " & $i, "Class", ""), 60, 30 + 30 + 20 + 20 + 1 + 30 + 20 + ($size_setline_y - 75) / 2 - 20, 125, 20)
  1083. GUICtrlSetData($class_input[$i], $dk_ & "|" & $druid_ & "|" & $hunt_ & "|" & $mage_ & "|" & $paladin_ & "|" & $priest_ & "|" & $rogue_ & "|" & $shaman_ & "|" & $warlock & "|" & $war_)
  1084. $char_label[$i] = GUICtrlCreateLabel($wowchar_, 13, 30 + 1 + 5 + 30 + 20 + 30 + 20 + ($size_setline_y - 75) / 2 - 20, 80, 15)
  1085. $class_label[$i] = GUICtrlCreateLabel($wowclass_, 100, 30 + 1 + 5 + 30 + 20 + 30 + 20 + ($size_setline_y - 75) / 2 - 20, 80, 15)
  1086. $charexp_label[$i] = GUICtrlCreateLabel($wowcharexp_, ($size_setline_x - 180) / 2, 30 + 30 + 20 + 20 + 1 + 30 + 20 + 20 + 5 + ($size_setline_y - 75) / 2 - 20, 180, 30, $SS_CENTER)
  1087. GUICtrlSetFont(-1, 8)
  1088. GUICtrlSetColor(-1, 0x808080)
  1089. If IniRead ("settings.ini", "Settings " &$i, "AccountInput",1)=1 Then
  1090. GUICtrlSetState($accountcheck[$i], $GUI_CHECKED)
  1091. EndIf
  1092. If GUIctrlread($accountcheck[$i])=4 Then
  1093. GUICtrlSetState ($account_input[$i], $GUI_DISABLE)
  1094. Else
  1095. GUICtrlSetState ($account_input[$i], $GUI_ENABLE)
  1096. EndIf
  1097. SetOnEventA ( $accountcheck[$i], "accountcheckclick",$paramByVal, $i)
  1098. SetOnEventA($ok[$i], "close", $paramByVal, 1, $paramByVal, $i)
  1099. SetOnEventA($cancel[$i], "close", $paramByVal, 2, $paramByVal, $i)
  1100. GUISetState(@SW_DISABLE, $window)
  1101. EndIf
  1102. EndFunc
  1103. Func Windowmoveradiopressed ($i)
  1104. If GUIctrlread($windowmove_xy[$i])=4 Then
  1105. GUICtrlSetState ($windowmove_x[$i], $GUI_DISABLE)
  1106. GUICtrlSetState ($windowmove_y[$i], $GUI_DISABLE)
  1107. Else
  1108. GUICtrlSetState ($windowmove_x[$i], $GUI_ENABLE)
  1109. GUICtrlSetState ($windowmove_y[$i], $GUI_ENABLE)
  1110. EndIf
  1111. EndFunc
  1112. Func windowmoveclick ($i)
  1113. If GUIctrlread($windowmove[$i])=4 Then
  1114. GUICtrlSetState ($windowmove_grid[$i], $GUI_DISABLE)
  1115. GUICtrlSetState ($windowmove_xy[$i], $GUI_DISABLE)
  1116. GUICtrlSetState ($windowmove_x[$i], $GUI_DISABLE)
  1117. GUICtrlSetState ($windowmove_y[$i], $GUI_DISABLE)
  1118. Else
  1119. GUICtrlSetState ($windowmove_grid[$i], $GUI_ENABLE)
  1120. GUICtrlSetState ($windowmove_xy[$i], $GUI_ENABLE)
  1121. WindowMoveRadioPressed ($i)
  1122. EndIf
  1123. EndFunc
  1124. Func AccountCheckClick ($i)
  1125. If GUIctrlread($accountcheck[$i])=4 Then
  1126. GUICtrlSetState ($account_input[$i], $GUI_DISABLE)
  1127. Else
  1128. GUICtrlSetState ($account_input[$i], $GUI_ENABLE)
  1129. EndIf
  1130. EndFunc
  1131. ; ----------------------------------------------------------------------------
  1132. ; <AUT2EXE INCLUDE-END: C:\Program Files\AutoIt3\Scripts\WoW\Relogger\V1\GUICreate.au3>
  1133. ; ----------------------------------------------------------------------------
  1134. ; ----------------------------------------------------------------------------
  1135. ; <AUT2EXE INCLUDE-START: C:\Program Files\AutoIt3\Include\Constants.au3>
  1136. ; ----------------------------------------------------------------------------
  1137. Global Const $OPT_COORDSRELATIVE = 0
  1138. Global Const $OPT_COORDSABSOLUTE = 1
  1139. Global Const $OPT_COORDSCLIENT = 2
  1140. Global Const $OPT_ERRORSILENT = 0
  1141. Global Const $OPT_ERRORFATAL = 1
  1142. Global Const $OPT_CAPSNOSTORE = 0
  1143. Global Const $OPT_CAPSSTORE = 1
  1144. Global Const $OPT_MATCHSTART = 1
  1145. Global Const $OPT_MATCHANY = 2
  1146. Global Const $OPT_MATCHEXACT = 3
  1147. Global Const $OPT_MATCHADVANCED = 4
  1148. Global Const $FC_NOOVERWRITE = 0
  1149. Global Const $FC_OVERWRITE = 1
  1150. Global Const $FT_MODIFIED = 0
  1151. Global Const $FT_CREATED = 1
  1152. Global Const $FT_ACCESSED = 2
  1153. Global Const $FO_READ = 0
  1154. Global Const $FO_APPEND = 1
  1155. Global Const $FO_OVERWRITE = 2
  1156. Global Const $FO_BINARY = 16
  1157. Global Const $FO_UNICODE = 32
  1158. Global Const $FO_UTF16_LE = 32
  1159. Global Const $FO_UTF16_BE = 64
  1160. Global Const $FO_UTF8 = 128
  1161. Global Const $EOF = -1
  1162. Global Const $FD_FILEMUSTEXIST = 1
  1163. Global Const $FD_PATHMUSTEXIST = 2
  1164. Global Const $FD_MULTISELECT = 4
  1165. Global Const $FD_PROMPTCREATENEW = 8
  1166. Global Const $FD_PROMPTOVERWRITE = 16
  1167. Global Const $KB_SENDSPECIAL = 0
  1168. Global Const $KB_SENDRAW = 1
  1169. Global Const $KB_CAPSOFF = 0
  1170. Global Const $KB_CAPSON = 1
  1171. Global Const $MB_OK = 0
  1172. Global Const $MB_OKCANCEL = 1
  1173. Global Const $MB_ABORTRETRYIGNORE = 2
  1174. Global Const $MB_YESNOCANCEL = 3
  1175. Global Const $MB_YESNO = 4
  1176. Global Const $MB_RETRYCANCEL = 5
  1177. Global Const $MB_ICONHAND = 16
  1178. Global Const $MB_ICONQUESTION = 32
  1179. Global Const $MB_ICONEXCLAMATION = 48
  1180. Global Const $MB_ICONASTERISK = 64
  1181. Global Const $MB_DEFBUTTON1 = 0
  1182. Global Const $MB_DEFBUTTON2 = 256
  1183. Global Const $MB_DEFBUTTON3 = 512
  1184. Global Const $MB_APPLMODAL = 0
  1185. Global Const $MB_SYSTEMMODAL = 4096
  1186. Global Const $MB_TASKMODAL = 8192
  1187. Global Const $MB_TOPMOST = 262144
  1188. Global Const $MB_RIGHTJUSTIFIED = 524288
  1189. Global Const $IDTIMEOUT = -1
  1190. Global Const $IDOK = 1
  1191. Global Const $IDCANCEL = 2
  1192. Global Const $IDABORT = 3
  1193. Global Const $IDRETRY = 4
  1194. Global Const $IDIGNORE = 5
  1195. Global Const $IDYES = 6
  1196. Global Const $IDNO = 7
  1197. Global Const $IDTRYAGAIN = 10
  1198. Global Const $IDCONTINUE = 11
  1199. Global Const $DLG_NOTITLE = 1
  1200. Global Const $DLG_NOTONTOP = 2
  1201. Global Const $DLG_TEXTLEFT = 4
  1202. Global Const $DLG_TEXTRIGHT = 8
  1203. Global Const $DLG_MOVEABLE = 16
  1204. Global Const $DLG_TEXTVCENTER = 32
  1205. Global Const $TIP_ICONNONE = 0
  1206. Global Const $TIP_ICONASTERISK = 1
  1207. Global Const $TIP_ICONEXCLAMATION = 2
  1208. Global Const $TIP_ICONHAND = 3
  1209. Global Const $TIP_NOSOUND = 16
  1210. Global Const $IDC_UNKNOWN = 0
  1211. Global Const $IDC_APPSTARTING = 1
  1212. Global Const $IDC_ARROW = 2
  1213. Global Const $IDC_CROSS = 3
  1214. Global Const $IDC_HELP = 4
  1215. Global Const $IDC_IBEAM = 5
  1216. Global Const $IDC_ICON = 6
  1217. Global Const $IDC_NO = 7
  1218. Global Const $IDC_SIZE = 8
  1219. Global Const $IDC_SIZEALL = 9
  1220. Global Const $IDC_SIZENESW = 10
  1221. Global Const $IDC_SIZENS = 11
  1222. Global Const $IDC_SIZENWSE = 12
  1223. Global Const $IDC_SIZEWE = 13
  1224. Global Const $IDC_UPARROW = 14
  1225. Global Const $IDC_WAIT = 15
  1226. Global Const $SD_LOGOFF = 0
  1227. Global Const $SD_SHUTDOWN = 1
  1228. Global Const $SD_REBOOT = 2
  1229. Global Const $SD_FORCE = 4
  1230. Global Const $SD_POWERDOWN = 8
  1231. Global Const $STR_NOCASESENSE = 0
  1232. Global Const $STR_CASESENSE = 1
  1233. Global Const $STR_STRIPLEADING = 1
  1234. Global Const $STR_STRIPTRAILING = 2
  1235. Global Const $STR_STRIPSPACES = 4
  1236. Global Const $STR_STRIPALL = 8
  1237. Global Const $TRAY_ITEM_EXIT = 3
  1238. Global Const $TRAY_ITEM_PAUSE = 4
  1239. Global Const $TRAY_ITEM_FIRST = 7
  1240. Global Const $TRAY_CHECKED = 1
  1241. Global Const $TRAY_UNCHECKED = 4
  1242. Global Const $TRAY_ENABLE = 64
  1243. Global Const $TRAY_DISABLE = 128
  1244. Global Const $TRAY_FOCUS = 256
  1245. Global Const $TRAY_DEFAULT = 512
  1246. Global Const $TRAY_EVENT_SHOWICON = -3
  1247. Global Const $TRAY_EVENT_HIDEICON = -4
  1248. Global Const $TRAY_EVENT_FLASHICON = -5
  1249. Global Const $TRAY_EVENT_NOFLASHICON = -6
  1250. Global Const $TRAY_EVENT_PRIMARYDOWN = -7
  1251. Global Const $TRAY_EVENT_PRIMARYUP = -8
  1252. Global Const $TRAY_EVENT_SECONDARYDOWN = -9
  1253. Global Const $TRAY_EVENT_SECONDARYUP = -10
  1254. Global Const $TRAY_EVENT_MOUSEOVER = -11
  1255. Global Const $TRAY_EVENT_MOUSEOUT = -12
  1256. Global Const $TRAY_EVENT_PRIMARYDOUBLE = -13
  1257. Global Const $TRAY_EVENT_SECONDARYDOUBLE= -14
  1258. Global Const $STDIN_CHILD = 1
  1259. Global Const $STDOUT_CHILD = 2
  1260. Global Const $STDERR_CHILD = 4
  1261. Global Const $COLOR_BLACK = 0x000000
  1262. Global Const $COLOR_SILVER = 0xC0C0C0
  1263. Global Const $COLOR_GRAY = 0x808080
  1264. Global Const $COLOR_WHITE = 0xFFFFFF
  1265. Global Const $COLOR_MAROON = 0x800000
  1266. Global Const $COLOR_RED = 0xFF0000
  1267. Global Const $COLOR_PURPLE = 0x800080
  1268. Global Const $COLOR_FUCHSIA = 0xFF00FF
  1269. Global Const $COLOR_GREEN = 0x008000
  1270. Global Const $COLOR_LIME = 0x00FF00
  1271. Global Const $COLOR_OLIVE = 0x808000
  1272. Global Const $COLOR_YELLOW = 0xFFFF00
  1273. Global Const $COLOR_NAVY = 0x000080
  1274. Global Const $COLOR_BLUE = 0x0000FF
  1275. Global Const $COLOR_TEAL = 0x008080
  1276. Global Const $COLOR_AQUA = 0x00FFFF
  1277. Global Const $REG_NONE = 0
  1278. Global Const $REG_SZ = 1
  1279. Global Const $REG_EXPAND_SZ = 2
  1280. Global Const $REG_BINARY = 3
  1281. Global Const $REG_DWORD = 4
  1282. Global Const $REG_DWORD_BIG_ENDIAN = 5
  1283. Global Const $REG_LINK = 6
  1284. Global Const $REG_MULTI_SZ = 7
  1285. Global Const $REG_RESOURCE_LIST = 8
  1286. Global Const $REG_FULL_RESOURCE_DESCRIPTOR = 9
  1287. Global Const $REG_RESOURCE_REQUIREMENTS_LIST = 10
  1288. ; ----------------------------------------------------------------------------
  1289. ; <AUT2EXE INCLUDE-END: C:\Program Files\AutoIt3\Include\Constants.au3>
  1290. ; ----------------------------------------------------------------------------
  1291. ; ----------------------------------------------------------------------------
  1292. ; <AUT2EXE INCLUDE-START: C:\Program Files\AutoIt3\Include\GUIConstants.au3>
  1293. ; ----------------------------------------------------------------------------
  1294. ; ----------------------------------------------------------------------------
  1295. ; <AUT2EXE INCLUDE-START: C:\Program Files\AutoIt3\Include\GUIDefaultConstants.au3>
  1296. ; ----------------------------------------------------------------------------
  1297. ; ----------------------------------------------------------------------------
  1298. ; <AUT2EXE INCLUDE-START: C:\Program Files\AutoIt3\Include\WindowsConstants.au3>
  1299. ; ----------------------------------------------------------------------------
  1300. Global Const $WS_TILED = 0
  1301. Global Const $WS_OVERLAPPED = 0
  1302. Global Const $WS_MAXIMIZEBOX = 0x00010000
  1303. Global Const $WS_MINIMIZEBOX = 0x00020000
  1304. Global Const $WS_TABSTOP = 0x00010000
  1305. Global Const $WS_GROUP = 0x00020000
  1306. Global Const $WS_SIZEBOX = 0x00040000
  1307. Global Const $WS_THICKFRAME = 0x00040000
  1308. Global Const $WS_SYSMENU = 0x00080000
  1309. Global Const $WS_HSCROLL = 0x00100000
  1310. Global Const $WS_VSCROLL = 0x00200000
  1311. Global Const $WS_DLGFRAME = 0x00400000
  1312. Global Const $WS_BORDER = 0x00800000
  1313. Global Const $WS_CAPTION = 0x00C00000
  1314. Global Const $WS_OVERLAPPEDWINDOW = 0x00CF0000
  1315. Global Const $WS_TILEDWINDOW = 0x00CF0000
  1316. Global Const $WS_MAXIMIZE = 0x01000000
  1317. Global Const $WS_CLIPCHILDREN = 0x02000000
  1318. Global Const $WS_CLIPSIBLINGS = 0x04000000
  1319. Global Const $WS_DISABLED = 0x08000000
  1320. Global Const $WS_VISIBLE = 0x10000000
  1321. Global Const $WS_MINIMIZE = 0x20000000
  1322. Global Const $WS_CHILD = 0x40000000
  1323. Global Const $WS_POPUP = 0x80000000
  1324. Global Const $WS_POPUPWINDOW = 0x80880000
  1325. Global Const $DS_MODALFRAME = 0x80
  1326. Global Const $DS_SETFOREGROUND = 0x00000200
  1327. Global Const $DS_CONTEXTHELP = 0x00002000
  1328. Global Const $WS_EX_ACCEPTFILES = 0x00000010
  1329. Global Const $WS_EX_MDICHILD = 0x00000040
  1330. Global Const $WS_EX_APPWINDOW = 0x00040000
  1331. Global Const $WS_EX_CLIENTEDGE = 0x00000200
  1332. Global Const $WS_EX_CONTEXTHELP = 0x00000400
  1333. Global Const $WS_EX_DLGMODALFRAME = 0x00000001
  1334. Global Const $WS_EX_LEFTSCROLLBAR = 0x00004000
  1335. Global Const $WS_EX_OVERLAPPEDWINDOW = 0x00000300
  1336. Global Const $WS_EX_RIGHT = 0x00001000
  1337. Global Const $WS_EX_STATICEDGE = 0x00020000
  1338. Global Const $WS_EX_TOOLWINDOW = 0x00000080
  1339. Global Const $WS_EX_TOPMOST = 0x00000008
  1340. Global Const $WS_EX_TRANSPARENT = 0x00000020
  1341. Global Const $WS_EX_WINDOWEDGE = 0x00000100
  1342. Global Const $WS_EX_LAYERED = 0x00080000
  1343. Global Const $WM_SIZE = 0x05
  1344. Global Const $WM_SIZING = 0x0214
  1345. Global Const $WM_USER = 0X400
  1346. Global Const $WM_GETTEXTLENGTH = 0x000E
  1347. Global Const $WM_GETTEXT = 0x000D
  1348. ; ----------------------------------------------------------------------------
  1349. ; <AUT2EXE INCLUDE-END: C:\Program Files\AutoIt3\Include\WindowsConstants.au3>
  1350. ; ----------------------------------------------------------------------------
  1351. ; ----------------------------------------------------------------------------
  1352. ; <AUT2EXE INCLUDE-START: C:\Program Files\AutoIt3\Include\AVIConstants.au3>
  1353. ; ----------------------------------------------------------------------------
  1354. Global Const $ACS_CENTER = 1
  1355. Global Const $ACS_TRANSPARENT = 2
  1356. Global Const $ACS_AUTOPLAY = 4
  1357. Global Const $ACS_TIMER = 8
  1358. Global Const $ACS_NONTRANSPARENT = 16
  1359. ; ----------------------------------------------------------------------------
  1360. ; <AUT2EXE INCLUDE-END: C:\Program Files\AutoIt3\Include\AVIConstants.au3>
  1361. ; ----------------------------------------------------------------------------
  1362. ; ----------------------------------------------------------------------------
  1363. ; <AUT2EXE INCLUDE-START: C:\Program Files\AutoIt3\Include\ComboConstants.au3>
  1364. ; ----------------------------------------------------------------------------
  1365. Global Const $CBS_SIMPLE = 0x0001
  1366. Global Const $CBS_DROPDOWN = 0x0002
  1367. Global Const $CBS_DROPDOWNLIST = 0x0003
  1368. Global Const $CBS_AUTOHSCROLL = 0x0040
  1369. Global Const $CBS_OEMCONVERT = 0x0080
  1370. Global Const $CBS_SORT = 0x0100
  1371. Global Const $CBS_NOINTEGRALHEIGHT = 0x0400
  1372. Global Const $CBS_DISABLENOSCROLL = 0x0800
  1373. Global Const $CBS_UPPERCASE = 0x2000
  1374. Global Const $CBS_LOWERCASE = 0x4000
  1375. Global Const $CB_ERR = -1
  1376. Global Const $CB_ERRATTRIBUTE = -3
  1377. Global Const $CB_ERRREQUIRED = -4
  1378. Global Const $CB_ERRSPACE = -2
  1379. Global Const $CB_OKAY = 0
  1380. Global Const $CB_ADDSTRING = 0x143
  1381. Global Const $CB_DELETESTRING = 0x144
  1382. Global Const $CB_DIR = 0x145
  1383. Global Const $CB_FINDSTRING = 0x14C
  1384. Global Const $CB_FINDSTRINGEXACT = 0x158
  1385. Global Const $CB_GETCOUNT = 0x146
  1386. Global Const $CB_GETCURSEL = 0x147
  1387. Global Const $CB_GETDROPPEDCONTROLRECT = 0x152
  1388. Global Const $CB_GETDROPPEDSTATE = 0x157
  1389. Global Const $CB_GETDROPPEDWIDTH = 0X15f
  1390. Global Const $CB_GETEDITSEL = 0x140
  1391. Global Const $CB_GETEXTENDEDUI = 0x156
  1392. Global Const $CB_GETHORIZONTALEXTENT = 0x15d
  1393. Global Const $CB_GETITEMDATA = 0x150
  1394. Global Const $CB_GETITEMHEIGHT = 0x154
  1395. Global Const $CB_GETLBTEXT = 0x148
  1396. Global Const $CB_GETLBTEXTLEN = 0x149
  1397. Global Const $CB_GETLOCALE = 0x15A
  1398. Global Const $CB_GETMINVISIBLE = 0x1702
  1399. Global Const $CB_GETTOPINDEX = 0x15b
  1400. Global Const $CB_INITSTORAGE = 0x161
  1401. Global Const $CB_LIMITTEXT = 0x141
  1402. Global Const $CB_RESETCONTENT = 0x14B
  1403. Global Const $CB_INSERTSTRING = 0x14A
  1404. Global Const $CB_SELECTSTRING = 0x14D
  1405. Global Const $CB_SETCURSEL = 0x14E
  1406. Global Const $CB_SETDROPPEDWIDTH = 0x160
  1407. Global Const $CB_SETEDITSEL = 0x142
  1408. Global Const $CB_SETEXTENDEDUI = 0x155
  1409. Global Const $CB_SETHORIZONTALEXTENT = 0x15e
  1410. Global Const $CB_SETITEMDATA = 0x151
  1411. Global Const $CB_SETITEMHEIGHT = 0x153
  1412. Global Const $CB_SETLOCALE = 0x15
  1413. Global Const $CB_SETMINVISIBLE = 0x1701
  1414. Global Const $CB_SETTOPINDEX = 0x15c
  1415. Global Const $CB_SHOWDROPDOWN = 0x14F
  1416. Global Const $CB_DDL_ARCHIVE = 0x20
  1417. Global Const $CB_DDL_DIRECTORY = 0x10
  1418. Global Const $CB_DDL_DRIVES = 0x4000
  1419. Global Const $CB_DDL_EXCLUSIVE = 0x8000
  1420. Global Const $CB_DDL_HIDDEN = 0x2
  1421. Global Const $CB_DDL_READONLY = 0x1
  1422. Global Const $CB_DDL_READWRITE = 0x0
  1423. Global Const $CB_DDL_SYSTEM = 0x4
  1424. ; ----------------------------------------------------------------------------
  1425. ; <AUT2EXE INCLUDE-END: C:\Program Files\AutoIt3\Include\ComboConstants.au3>
  1426. ; ----------------------------------------------------------------------------
  1427. ; ----------------------------------------------------------------------------
  1428. ; <AUT2EXE INCLUDE-START: C:\Program Files\AutoIt3\Include\DateTimeConstants.au3>
  1429. ; ----------------------------------------------------------------------------
  1430. Global Const $DTS_SHORTDATEFORMAT = 0
  1431. Global Const $DTS_UPDOWN = 1
  1432. Global Const $DTS_SHOWNONE = 2
  1433. Global Const $DTS_LONGDATEFORMAT = 4
  1434. Global Const $DTS_TIMEFORMAT = 9
  1435. Global Const $DTS_RIGHTALIGN = 32
  1436. Global Const $MCS_NOTODAY = 16
  1437. Global Const $MCS_NOTODAYCIRCLE = 8
  1438. Global Const $MCS_WEEKNUMBERS = 4
  1439. Global Const $MCM_FIRST = 0x1000
  1440. Global Const $MCM_GETCOLOR = ($MCM_FIRST + 11)
  1441. Global Const $MCM_GETFIRSTDAYOFWEEK = ($MCM_FIRST + 16)
  1442. Global Const $MCM_GETMAXSELCOUNT = ($MCM_FIRST + 3)
  1443. Global Const $MCM_GETMAXTODAYWIDTH = ($MCM_FIRST + 21)
  1444. Global Const $MCM_GETMINREQRECT = ($MCM_FIRST + 9)
  1445. Global Const $MCM_GETMONTHDELTA = ($MCM_FIRST + 19)
  1446. Global Const $MCS_MULTISELECT = 0x2
  1447. Global Const $MCM_SETCOLOR = ($MCM_FIRST + 10)
  1448. Global Const $MCM_SETFIRSTDAYOFWEEK = ($MCM_FIRST + 15)
  1449. Global Const $MCM_SETMAXSELCOUNT = ($MCM_FIRST + 4)
  1450. Global Const $MCM_SETMONTHDELTA = ($MCM_FIRST + 20)
  1451. Global Const $MCSC_BACKGROUND = 0
  1452. Global Const $MCSC_MONTHBK = 4
  1453. Global Const $MCSC_TEXT = 1
  1454. Global Const $MCSC_TITLEBK = 2
  1455. Global Const $MCSC_TITLETEXT = 3
  1456. Global Const $MCSC_TRAILINGTEXT = 5
  1457. ; ----------------------------------------------------------------------------
  1458. ; <AUT2EXE INCLUDE-END: C:\Program Files\AutoIt3\Include\DateTimeConstants.au3>
  1459. ; ----------------------------------------------------------------------------
  1460. ; ----------------------------------------------------------------------------
  1461. ; <AUT2EXE INCLUDE-START: C:\Program Files\AutoIt3\Include\EditConstants.au3>
  1462. ; ----------------------------------------------------------------------------
  1463. Global Const $ES_LEFT = 0
  1464. Global Const $ES_CENTER = 1
  1465. Global Const $ES_RIGHT = 2
  1466. Global Const $ES_MULTILINE = 4
  1467. Global Const $ES_UPPERCASE = 8
  1468. Global Const $ES_LOWERCASE = 16
  1469. Global Const $ES_PASSWORD = 32
  1470. Global Const $ES_AUTOVSCROLL = 64
  1471. Global Const $ES_AUTOHSCROLL = 128
  1472. Global Const $ES_NOHIDESEL = 256
  1473. Global Const $ES_OEMCONVERT = 1024
  1474. Global Const $ES_READONLY = 2048
  1475. Global Const $ES_WANTRETURN = 4096
  1476. Global Const $ES_NUMBER = 8192
  1477. Global Const $EC_ERR = -1
  1478. Global Const $ECM_FIRST = 0X1500
  1479. Global Const $EM_CANUNDO = 0xC6
  1480. Global Const $EM_EMPTYUNDOBUFFER = 0xCD
  1481. Global Const $EM_GETFIRSTVISIBLELINE = 0xCE
  1482. Global Const $EM_GETLINE = 0xC4
  1483. Global Const $EM_GETLINECOUNT = 0xBA
  1484. Global Const $EM_GETMODIFY = 0xB8
  1485. Global Const $EM_GETRECT = 0xB2
  1486. Global Const $EM_GETSEL = 0xB0
  1487. Global Const $EM_LINEFROMCHAR = 0xC9
  1488. Global Const $EM_LINEINDEX = 0xBB
  1489. Global Const $EM_LINELENGTH = 0xC1
  1490. Global Const $EM_LINESCROLL = 0xB6
  1491. Global Const $EM_REPLACESEL = 0xC2
  1492. Global Const $EM_SCROLL = 0xB5
  1493. Global Const $EM_SCROLLCARET = 0x00B7
  1494. Global Const $EM_SETMODIFY = 0xB9
  1495. Global Const $EM_SETSEL = 0xB1
  1496. Global Const $EM_UNDO = 0xC7
  1497. Global Const $EM_SETREADONLY = 0x00CF
  1498. Global Const $EM_SETTABSTOPS = 0x00CB
  1499. ; ----------------------------------------------------------------------------
  1500. ; <AUT2EXE INCLUDE-END: C:\Program Files\AutoIt3\Include\EditConstants.au3>
  1501. ; ----------------------------------------------------------------------------
  1502. ; ----------------------------------------------------------------------------
  1503. ; <AUT2EXE INCLUDE-START: C:\Program Files\AutoIt3\Include\StaticConstants.au3>
  1504. ; ----------------------------------------------------------------------------
  1505. Global Const $SS_LEFT = 0
  1506. Global Const $SS_CENTER = 1
  1507. Global Const $SS_RIGHT = 2
  1508. Global Const $SS_ICON = 3
  1509. Global Const $SS_BLACKRECT = 4
  1510. Global Const $SS_GRAYRECT = 5
  1511. Global Const $SS_WHITERECT = 6
  1512. Global Const $SS_BLACKFRAME = 7
  1513. Global Const $SS_GRAYFRAME = 8
  1514. Global Const $SS_WHITEFRAME = 9
  1515. Global Const $SS_SIMPLE = 11
  1516. Global Const $SS_LEFTNOWORDWRAP = 12
  1517. Global Const $SS_BITMAP = 15
  1518. Global Const $SS_ETCHEDHORZ = 16
  1519. Global Const $SS_ETCHEDVERT = 17
  1520. Global Const $SS_ETCHEDFRAME = 18
  1521. Global Const $SS_NOPREFIX = 0x0080
  1522. Global Const $SS_NOTIFY = 0x0100
  1523. Global Const $SS_CENTERIMAGE = 0x0200
  1524. Global Const $SS_RIGHTJUST = 0x0400
  1525. Global Const $SS_SUNKEN = 0x1000
  1526. ; ----------------------------------------------------------------------------
  1527. ; <AUT2EXE INCLUDE-END: C:\Program Files\AutoIt3\Include\StaticConstants.au3>
  1528. ; ----------------------------------------------------------------------------
  1529. ; ----------------------------------------------------------------------------
  1530. ; <AUT2EXE INCLUDE-START: C:\Program Files\AutoIt3\Include\ListBoxConstants.au3>
  1531. ; ----------------------------------------------------------------------------
  1532. Global Const $LBS_NOTIFY = 0x0001
  1533. Global Const $LBS_SORT = 0x0002
  1534. Global Const $LBS_USETABSTOPS = 0x0080
  1535. Global Const $LBS_NOINTEGRALHEIGHT = 0x0100
  1536. Global Const $LBS_DISABLENOSCROLL = 0x1000
  1537. Global Const $LBS_NOSEL = 0x4000
  1538. Global Const $LBS_STANDARD = 0xA00003
  1539. Global Const $LB_ERR = -1
  1540. Global Const $LB_ERRATTRIBUTE = -3
  1541. Global Const $LB_ERRREQUIRED = -4
  1542. Global Const $LB_ERRSPACE = -2
  1543. Global Const $LB_ADDSTRING = 0x180
  1544. Global Const $LB_DELETESTRING = 0x182
  1545. Global Const $LB_DIR = 0x18D
  1546. Global Const $LB_FINDSTRING = 0x18F
  1547. Global Const $LB_FINDSTRINGEXACT = 0x1A2
  1548. Global Const $LB_GETANCHORINDEX = 0x019D
  1549. Global Const $LB_GETCARETINDEX = 0x019F
  1550. Global Const $LB_GETCOUNT = 0x18B
  1551. Global Const $LB_GETCURSEL = 0x188
  1552. Global Const $LB_GETHORIZONTALEXTENT = 0x193
  1553. Global Const $LB_GETITEMRECT = 0x198
  1554. Global Const $LB_GETLISTBOXINFO = 0x01B2
  1555. Global Const $LB_GETLOCALE = 0x1A6
  1556. Global Const $LB_GETSEL = 0x0187
  1557. Global Const $LB_GETSELCOUNT = 0x0190
  1558. Global Const $LB_GETSELITEMS = 0X191
  1559. Global Const $LB_GETTEXT = 0x0189
  1560. Global Const $LB_GETTEXTLEN = 0x018A
  1561. Global Const $LB_GETTOPINDEX = 0x018E
  1562. Global Const $LB_INSERTSTRING = 0x181
  1563. Global Const $LB_RESETCONTENT = 0x184
  1564. Global Const $LB_SELECTSTRING = 0x18C
  1565. Global Const $LB_SETITEMHEIGHT = 0x1A0
  1566. Global Const $LB_SELITEMRANGE = 0x19B
  1567. Global Const $LB_SELITEMRANGEEX = 0x0183
  1568. Global Const $LB_SETANCHORINDEX = 0x19C
  1569. Global Const $LB_SETCARETINDEX = 0x19E
  1570. Global Const $LB_SETCURSEL = 0x186
  1571. Global Const $LB_SETHORIZONTALEXTENT = 0x194
  1572. Global Const $LB_SETLOCALE = 0x1A5
  1573. Global Const $LB_SETSEL = 0x0185
  1574. Global Const $LB_SETTOPINDEX = 0x197
  1575. Global Const $LBS_MULTIPLESEL = 0x8
  1576. Global Const $DDL_ARCHIVE = 0x20
  1577. Global Const $DDL_DIRECTORY = 0x10
  1578. Global Const $DDL_DRIVES = 0x4000
  1579. Global Const $DDL_EXCLUSIVE = 0x8000
  1580. Global Const $DDL_HIDDEN = 0x2
  1581. Global Const $DDL_READONLY = 0x1
  1582. Global Const $DDL_READWRITE = 0x0
  1583. Global Const $DDL_SYSTEM = 0x4
  1584. ; ----------------------------------------------------------------------------
  1585. ; <AUT2EXE INCLUDE-END: C:\Program Files\AutoIt3\Include\ListBoxConstants.au3>
  1586. ; ----------------------------------------------------------------------------
  1587. ; ----------------------------------------------------------------------------
  1588. ; <AUT2EXE INCLUDE-START: C:\Program Files\AutoIt3\Include\ListViewConstants.au3>
  1589. ; ----------------------------------------------------------------------------
  1590. Global Const $LVS_ICON = 0x0000
  1591. Global Const $LVS_REPORT = 0x0001
  1592. Global Const $LVS_SMALLICON = 0x0002
  1593. Global Const $LVS_LIST = 0x0003
  1594. Global Const $LVS_EDITLABELS = 0x0200
  1595. Global Const $LVS_NOCOLUMNHEADER = 0x4000
  1596. Global Const $LVS_NOSORTHEADER = 0x8000
  1597. Global Const $LVS_SINGLESEL = 0x0004
  1598. Global Const $LVS_SHOWSELALWAYS = 0x0008
  1599. Global Const $LVS_SORTASCENDING = 0X0010
  1600. Global Const $LVS_SORTDESCENDING = 0x0020
  1601. Global Const $LVS_NOLABELWRAP = 0x0080
  1602. Global Const $LVS_EX_FULLROWSELECT = 0x00000020
  1603. Global Const $LVS_EX_GRIDLINES = 0x00000001
  1604. Global Const $LVS_EX_SUBITEMIMAGES = 0x00000002
  1605. Global Const $LVS_EX_CHECKBOXES = 0x00000004
  1606. Global Const $LVS_EX_TRACKSELECT = 0x00000008
  1607. Global Const $LVS_EX_HEADERDRAGDROP = 0x00000010
  1608. Global Const $LVS_EX_FLATSB = 0x00000100
  1609. Global Const $LVS_EX_BORDERSELECT = 0x00008000
  1610. Global Const $LVS_EX_HIDELABELS = 0x20000
  1611. Global Const $LVS_EX_INFOTIP = 0x400
  1612. Global Const $LVS_EX_LABELTIP = 0x4000
  1613. Global Const $LVS_EX_ONECLICKACTIVATE = 0x40
  1614. Global Const $LVS_EX_REGIONAL = 0x200
  1615. Global Const $LVS_EX_SINGLEROW = 0x40000
  1616. Global Const $LVS_EX_TWOCLICKACTIVATE = 0x80
  1617. Global Const $LVS_EX_UNDERLINEHOT = 0x800
  1618. Global Const $LVS_EX_UNDERLINECOLD = 0x1000
  1619. Global Const $LV_ERR = -1
  1620. Global Const $CCM_FIRST = 0x2000
  1621. Global Const $CCM_GETUNICODEFORMAT = ($CCM_FIRST + 6)
  1622. Global Const $CCM_SETUNICODEFORMAT = ($CCM_FIRST + 5)
  1623. Global Const $CLR_NONE = 0xFFFFFFFF
  1624. Global Const $LVM_FIRST = 0x1000
  1625. Global Const $LV_VIEW_DETAILS = 0x1
  1626. Global Const $LV_VIEW_ICON = 0x0
  1627. Global Const $LV_VIEW_LIST = 0x3
  1628. Global Const $LV_VIEW_SMALLICON = 0x2
  1629. Global Const $LV_VIEW_TILE = 0x4
  1630. Global Const $LVCF_FMT = 0x1
  1631. Global Const $LVCF_WIDTH = 0x2
  1632. Global Const $LVCF_TEXT = 0x4
  1633. Global Const $LVCFMT_CENTER = 0x2
  1634. Global Const $LVCFMT_LEFT = 0x0
  1635. Global Const $LVCFMT_RIGHT = 0x1
  1636. Global Const $LVA_ALIGNLEFT = 0x1
  1637. Global Const $LVA_ALIGNTOP = 0x2
  1638. Global Const $LVA_DEFAULT = 0x0
  1639. Global Const $LVA_SNAPTOGRID = 0x5
  1640. Global Const $LVIF_STATE = 0x8
  1641. Global Const $LVIF_TEXT = 0x1
  1642. Global Const $LVFI_PARAM = 0x1
  1643. Global Const $LVFI_PARTIAL = 0x8
  1644. Global Const $LVFI_STRING = 0x2
  1645. Global Const $LVFI_WRAP = 0x20
  1646. Global Const $VK_LEFT = 0x25
  1647. Global Const $VK_RIGHT = 0x27
  1648. Global Const $VK_UP = 0x26
  1649. Global Const $VK_DOWN = 0x28
  1650. Global Const $VK_END = 0x23
  1651. Global Const $VK_PRIOR = 0x21
  1652. Global Const $VK_NEXT = 0x22
  1653. Global Const $LVIR_BOUNDS = 0
  1654. Global Const $LVIS_CUT = 0x4
  1655. Global Const $LVIS_DROPHILITED = 0x8
  1656. Global Const $LVIS_FOCUSED = 0x1
  1657. Global Const $LVIS_OVERLAYMASK = 0xF00
  1658. Global Const $LVIS_SELECTED = 0x2
  1659. Global Const $LVIS_STATEIMAGEMASK = 0xF000
  1660. Global Const $LVM_ARRANGE = ($LVM_FIRST + 22)
  1661. Global Const $LVM_CANCELEDITLABEL = ($LVM_FIRST + 179)
  1662. Global Const $LVM_DELETECOLUMN = 0x101C
  1663. Global Const $LVM_DELETEITEM = 0x1008
  1664. Global Const $LVM_DELETEALLITEMS = 0x1009
  1665. Global Const $LVM_EDITLABELA = ($LVM_FIRST + 23)
  1666. Global Const $LVM_EDITLABEL = $LVM_EDITLABELA
  1667. Global Const $LVM_ENABLEGROUPVIEW = ($LVM_FIRST + 157)
  1668. Global Const $LVM_ENSUREVISIBLE = ($LVM_FIRST + 19)
  1669. Global Const $LVM_FINDITEM = ($LVM_FIRST + 13)
  1670. Global Const $LVM_GETBKCOLOR = ($LVM_FIRST + 0)
  1671. Global Const $LVM_GETCALLBACKMASK = ($LVM_FIRST + 10)
  1672. Global Const $LVM_GETCOLUMNORDERARRAY = ($LVM_FIRST + 59)
  1673. Global Const $LVM_GETCOLUMNWIDTH = ($LVM_FIRST + 29)
  1674. Global Const $LVM_GETCOUNTPERPAGE = ($LVM_FIRST + 40)
  1675. Global Const $LVM_GETEDITCONTROL = ($LVM_FIRST + 24)
  1676. Global Const $LVM_GETEXTENDEDLISTVIEWSTYLE = ($LVM_FIRST + 55)
  1677. Global Const $LVM_GETHEADER = ($LVM_FIRST + 31)
  1678. Global Const $LVM_GETHOTCURSOR = ($LVM_FIRST + 63)
  1679. Global Const $LVM_GETHOTITEM = ($LVM_FIRST + 61)
  1680. Global Const $LVM_GETHOVERTIME = ($LVM_FIRST + 72)
  1681. Global Const $LVM_GETIMAGELIST = ($LVM_FIRST + 2)
  1682. Global Const $LVM_GETITEMA = ($LVM_FIRST + 5)
  1683. Global Const $LVM_GETITEMCOUNT = 0x1004
  1684. Global Const $LVM_GETITEMSTATE = ($LVM_FIRST + 44)
  1685. Global Const $LVM_GETITEMTEXTA = ($LVM_FIRST + 45)
  1686. Global Const $LVM_GETNEXTITEM = 0x100c
  1687. Global Const $LVM_GETSELECTEDCOLUMN = ($LVM_FIRST + 174)
  1688. Global Const $LVM_GETSELECTEDCOUNT = ($LVM_FIRST + 50)
  1689. Global Const $LVM_GETSUBITEMRECT = ($LVM_FIRST + 56)
  1690. Global Const $LVM_GETTOPINDEX = ($LVM_FIRST + 39)
  1691. Global Const $LVM_GETUNICODEFORMAT = $CCM_GETUNICODEFORMAT
  1692. Global Const $LVM_GETVIEW = ($LVM_FIRST + 143)
  1693. Global Const $LVM_GETVIEWRECT = ($LVM_FIRST + 34)
  1694. Global Const $LVM_INSERTCOLUMNA = ($LVM_FIRST + 27)
  1695. Global Const $LVM_INSERTITEMA = ($LVM_FIRST + 7)
  1696. Global Const $LVM_REDRAWITEMS = ($LVM_FIRST + 21)
  1697. Global Const $LVM_SETUNICODEFORMAT = $CCM_SETUNICODEFORMAT
  1698. Global Const $LVM_SCROLL = ($LVM_FIRST + 20)
  1699. Global Const $LVM_SETBKCOLOR = 0x1001
  1700. Global Const $LVM_SETCALLBACKMASK = ($LVM_FIRST + 11)
  1701. Global Const $LVM_SETCOLUMNA = ($LVM_FIRST + 26)
  1702. Global Const $LVM_SETCOLUMNORDERARRAY = ($LVM_FIRST + 58)
  1703. Global Const $LVM_SETCOLUMNWIDTH = 0x101E
  1704. Global Const $LVM_SETEXTENDEDLISTVIEWSTYLE = 0x1036
  1705. Global Const $LVM_SETHOTITEM = ($LVM_FIRST + 60)
  1706. Global Const $LVM_SETHOVERTIME = ($LVM_FIRST + 71)
  1707. Global Const $LVM_SETICONSPACING = ($LVM_FIRST + 53)
  1708. Global Const $LVM_SETITEMCOUNT = ($LVM_FIRST + 47)
  1709. Global Const $LVM_SETITEMPOSITION = ($LVM_FIRST + 15)
  1710. Global Const $LVM_SETITEMSTATE = ($LVM_FIRST + 43)
  1711. Global Const $LVM_SETITEMTEXTA = ($LVM_FIRST + 46)
  1712. Global Const $LVM_SETSELECTEDCOLUMN = ($LVM_FIRST + 140)
  1713. Global Const $LVM_SETTEXTCOLOR = ($LVM_FIRST + 36)
  1714. Global Const $LVM_SETTEXTBKCOLOR = ($LVM_FIRST + 38)
  1715. Global Const $LVM_SETVIEW = ($LVM_FIRST + 142)
  1716. Global Const $LVM_UPDATE = ($LVM_FIRST + 42)
  1717. Global Const $LVNI_ABOVE = 0x100
  1718. Global Const $LVNI_BELOW = 0x200
  1719. Global Const $LVNI_TOLEFT = 0x400
  1720. Global Const $LVNI_TORIGHT = 0x800
  1721. Global Const $LVNI_ALL = 0x0
  1722. Global Const $LVNI_CUT = 0x4
  1723. Global Const $LVNI_DROPHILITED = 0x8
  1724. Global Const $LVNI_FOCUSED = 0x1
  1725. Global Const $LVNI_SELECTED = 0x2
  1726. Global Const $LVSCW_AUTOSIZE = -1
  1727. Global Const $LVSCW_AUTOSIZE_USEHEADER = -2
  1728. Global Const $LVSICF_NOINVALIDATEALL = 0x1
  1729. Global Const $LVSICF_NOSCROLL = 0x2
  1730. Global Const $LVSIL_NORMAL = 0
  1731. Global Const $LVSIL_SMALL = 1
  1732. Global Const $LVSIL_STATE = 2
  1733. ; ----------------------------------------------------------------------------
  1734. ; <AUT2EXE INCLUDE-END: C:\Program Files\AutoIt3\Include\ListViewConstants.au3>
  1735. ; ----------------------------------------------------------------------------
  1736. ; ----------------------------------------------------------------------------
  1737. ; <AUT2EXE INCLUDE-START: C:\Program Files\AutoIt3\Include\SliderConstants.au3>
  1738. ; ----------------------------------------------------------------------------
  1739. Global Const $TBS_AUTOTICKS = 0x0001
  1740. Global Const $TBS_VERT = 0x0002
  1741. Global Const $TBS_HORZ = 0x0000
  1742. Global Const $TBS_TOP = 0x0004
  1743. Global Const $TBS_BOTTOM = 0x0000
  1744. Global Const $TBS_LEFT = 0x0004
  1745. Global Const $TBS_RIGHT = 0x0000
  1746. Global Const $TBS_BOTH = 0x0008
  1747. Global Const $TBS_NOTICKS = 0x0010
  1748. Global Const $TBS_NOTHUMB = 0x0080
  1749. Global Const $TWM_USER = 0x400
  1750. Global Const $TBM_CLEARTICS = ($TWM_USER + 9)
  1751. Global Const $TBM_GETLINESIZE = ($TWM_USER + 24)
  1752. Global Const $TBM_GETPAGESIZE = ($TWM_USER + 22)
  1753. Global Const $TBM_GETNUMTICS = ($TWM_USER + 16)
  1754. Global Const $TBM_GETPOS = $TWM_USER
  1755. Global Const $TBM_GETRANGEMAX = ($TWM_USER + 2)
  1756. Global Const $TBM_GETRANGEMIN = ($TWM_USER + 1)
  1757. Global Const $TBM_SETLINESIZE = ($TWM_USER + 23)
  1758. Global Const $TBM_SETPAGESIZE = ($TWM_USER + 21)
  1759. Global Const $TBM_SETPOS = ($TWM_USER + 5)
  1760. Global Const $TBM_SETTICFREQ = ($TWM_USER + 20)
  1761. ; ----------------------------------------------------------------------------
  1762. ; <AUT2EXE INCLUDE-END: C:\Program Files\AutoIt3\Include\SliderConstants.au3>
  1763. ; ----------------------------------------------------------------------------
  1764. ; ----------------------------------------------------------------------------
  1765. ; <AUT2EXE INCLUDE-START: C:\Program Files\AutoIt3\Include\TreeViewConstants.au3>
  1766. ; ----------------------------------------------------------------------------
  1767. Global Const $TVS_HASBUTTONS = 0x0001
  1768. Global Const $TVS_HASLINES = 0x0002
  1769. Global Const $TVS_LINESATROOT = 0x0004
  1770. Global Const $TVS_DISABLEDRAGDROP = 0x0010
  1771. Global Const $TVS_SHOWSELALWAYS = 0x0020
  1772. Global Const $TVS_NOTOOLTIPS = 0x0080
  1773. Global Const $TVS_CHECKBOXES = 0x0100
  1774. Global Const $TVS_TRACKSELECT = 0x0200
  1775. Global Const $TVS_SINGLEEXPAND = 0x0400
  1776. Global Const $TVS_FULLROWSELECT = 0x1000
  1777. Global Const $TVS_NOSCROLL = 0x2000
  1778. Global Const $TVS_NONEVENHEIGHT = 0x4000
  1779. Global Const $TVE_COLLAPSE = 0x0001
  1780. Global Const $TVE_EXPAND = 0x0002
  1781. Global Const $TVE_TOGGLE = 0x0003
  1782. Global Const $TVE_EXPANDPARTIAL = 0x4000
  1783. Global Const $TVE_COLLAPSERESET = 0x8000
  1784. Global Const $TVGN_ROOT = 0x0000
  1785. Global Const $TVGN_NEXT = 0x0001
  1786. Global Const $TVGN_PARENT = 0x0003
  1787. Global Const $TVGN_CHILD = 0x0004
  1788. Global Const $TVGN_CARET = 0x0009
  1789. Global Const $TVI_ROOT = 0xFFFF0000
  1790. Global Const $TVI_FIRST = 0xFFFF0001
  1791. Global Const $TVI_LAST = 0xFFFF0002
  1792. Global Const $TVI_SORT = 0xFFFF0003
  1793. Global Const $TVIF_TEXT = 0x0001
  1794. Global Const $TVIF_IMAGE = 0x0002
  1795. Global Const $TVIF_PARAM = 0x0004
  1796. Global Const $TVIF_STATE = 0x0008
  1797. Global Const $TVIF_HANDLE = 0x0010
  1798. Global Const $TVIF_SELECTEDIMAGE = 0x0020
  1799. Global Const $TVIF_CHILDREN = 0x0040
  1800. Global Const $TVIS_SELECTED = 0x0002
  1801. Global Const $TVIS_CUT = 0x0004
  1802. Global Const $TVIS_DROPHILITED = 0x0008
  1803. Global Const $TVIS_BOLD = 0x0010
  1804. Global Const $TVIS_EXPANDED = 0x0020
  1805. Global Const $TVIS_EXPANDEDONCE = 0x0040
  1806. Global Const $TVIS_EXPANDPARTIAL = 0x0080
  1807. Global Const $TVIS_OVERLAYMASK = 0x0F00
  1808. Global Const $TVIS_STATEIMAGEMASK = 0xF000
  1809. Global Const $TV_FIRST = 0x1100
  1810. Global Const $TVM_INSERTITEM = $TV_FIRST + 0
  1811. Global Const $TVM_DELETEITEM = $TV_FIRST + 1
  1812. Global Const $TVM_EXPAND = $TV_FIRST + 2
  1813. Global Const $TVM_GETCOUNT = $TV_FIRST + 5
  1814. Global Const $TVM_GETINDENT = $TV_FIRST + 6
  1815. Global Const $TVM_SETINDENT = $TV_FIRST + 7
  1816. Global Const $TVM_GETIMAGELIST = $TV_FIRST + 8
  1817. Global Const $TVM_SETIMAGELIST = $TV_FIRST + 9
  1818. Global Const $TVM_GETNEXTITEM = $TV_FIRST + 10
  1819. Global Const $TVM_SELECTITEM = $TV_FIRST + 11
  1820. Global Const $TVM_GETITEM = $TV_FIRST + 12
  1821. Global Const $TVM_SETITEM = $TV_FIRST + 13
  1822. Global Const $TVM_SORTCHILDREN = $TV_FIRST + 19
  1823. Global Const $TVM_ENSUREVISIBLE = $TV_FIRST + 20
  1824. Global Const $TVM_SETBKCOLOR = $TV_FIRST + 29
  1825. Global Const $TVM_SETTEXTCOLOR = $TV_FIRST + 30
  1826. Global Const $TVM_GETBKCOLOR = $TV_FIRST + 31
  1827. Global Const $TVM_GETTEXTCOLOR = $TV_FIRST + 32
  1828. Global Const $TVM_SETLINECOLOR = $TV_FIRST + 40
  1829. Global Const $TVM_GETLINECOLOR = $TV_FIRST + 41
  1830. ; ----------------------------------------------------------------------------
  1831. ; <AUT2EXE INCLUDE-END: C:\Program Files\AutoIt3\Include\TreeViewConstants.au3>
  1832. ; ----------------------------------------------------------------------------
  1833. ; ----------------------------------------------------------------------------
  1834. ; <AUT2EXE INCLUDE-START: C:\Program Files\AutoIt3\Include\UpDownConstants.au3>
  1835. ; ----------------------------------------------------------------------------
  1836. Global Const $UDS_WRAP = 0x0001
  1837. Global Const $UDS_SETBUDDYINT = 0x0002
  1838. Global Const $UDS_ALIGNRIGHT = 0x0004
  1839. Global Const $UDS_ALIGNLEFT = 0x0008
  1840. Global Const $UDS_ARROWKEYS = 0x0020
  1841. Global Const $UDS_HORZ = 0x0040
  1842. Global Const $UDS_NOTHOUSANDS = 0x0080
  1843. ; ----------------------------------------------------------------------------
  1844. ; <AUT2EXE INCLUDE-END: C:\Program Files\AutoIt3\Include\UpDownConstants.au3>
  1845. ; ----------------------------------------------------------------------------
  1846. Global Const $GUI_SS_DEFAULT_AVI = $ACS_TRANSPARENT
  1847. Global Const $GUI_SS_DEFAULT_BUTTON = 0
  1848. Global Const $GUI_SS_DEFAULT_CHECKBOX = 0
  1849. Global Const $GUI_SS_DEFAULT_COMBO = BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL, $WS_VSCROLL)
  1850. Global Const $GUI_SS_DEFAULT_DATE = $DTS_LONGDATEFORMAT
  1851. Global Const $GUI_SS_DEFAULT_EDIT = BitOR($ES_WANTRETURN, $WS_VSCROLL, $WS_HSCROLL, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL)
  1852. Global Const $GUI_SS_DEFAULT_GRAPHIC = 0
  1853. Global Const $GUI_SS_DEFAULT_GROUP = 0
  1854. Global Const $GUI_SS_DEFAULT_ICON = $SS_NOTIFY
  1855. Global Const $GUI_SS_DEFAULT_INPUT = BitOR($ES_LEFT, $ES_AUTOHSCROLL)
  1856. Global Const $GUI_SS_DEFAULT_LABEL = 0
  1857. Global Const $GUI_SS_DEFAULT_LIST = BitOR($LBS_SORT, $WS_BORDER, $WS_VSCROLL, $LBS_NOTIFY)
  1858. Global Const $GUI_SS_DEFAULT_LISTVIEW = BitOR($LVS_SHOWSELALWAYS, $LVS_SINGLESEL)
  1859. Global Const $GUI_SS_DEFAULT_MONTHCAL = 0
  1860. Global Const $GUI_SS_DEFAULT_PIC = $SS_NOTIFY
  1861. Global Const $GUI_SS_DEFAULT_PROGRESS = 0
  1862. Global Const $GUI_SS_DEFAULT_RADIO = 0
  1863. Global Const $GUI_SS_DEFAULT_SLIDER = $TBS_AUTOTICKS
  1864. Global Const $GUI_SS_DEFAULT_TAB = 0
  1865. Global Const $GUI_SS_DEFAULT_TREEVIEW = BitOR($TVS_HASBUTTONS, $TVS_HASLINES, $TVS_LINESATROOT, $TVS_DISABLEDRAGDROP, $TVS_SHOWSELALWAYS)
  1866. Global Const $GUI_SS_DEFAULT_UPDOWN = $UDS_ALIGNRIGHT
  1867. Global Const $GUI_SS_DEFAULT_GUI = BitOR($WS_MINIMIZEBOX, $WS_CAPTION, $WS_POPUP, $WS_SYSMENU)
  1868. ; ----------------------------------------------------------------------------
  1869. ; <AUT2EXE INCLUDE-END: C:\Program Files\AutoIt3\Include\GUIDefaultConstants.au3>
  1870. ; ----------------------------------------------------------------------------
  1871. ; ----------------------------------------------------------------------------
  1872. ; <AUT2EXE INCLUDE-START: C:\Program Files\AutoIt3\Include\GUIConstantsEx.au3>
  1873. ; ----------------------------------------------------------------------------
  1874. Global Const $GUI_EVENT_CLOSE = -3
  1875. Global Const $GUI_EVENT_MINIMIZE = -4
  1876. Global Const $GUI_EVENT_RESTORE = -5
  1877. Global Const $GUI_EVENT_MAXIMIZE = -6
  1878. Global Const $GUI_EVENT_PRIMARYDOWN = -7
  1879. Global Const $GUI_EVENT_PRIMARYUP = -8
  1880. Global Const $GUI_EVENT_SECONDARYDOWN = -9
  1881. Global Const $GUI_EVENT_SECONDARYUP = -10
  1882. Global Const $GUI_EVENT_MOUSEMOVE = -11
  1883. Global Const $GUI_EVENT_RESIZED = -12
  1884. Global Const $GUI_EVENT_DROPPED = -13
  1885. Global Const $GUI_RUNDEFMSG = 'GUI_RUNDEFMSG'
  1886. Global Const $GUI_AVISTOP = 0
  1887. Global Const $GUI_AVISTART = 1
  1888. Global Const $GUI_AVICLOSE = 2
  1889. Global Const $GUI_CHECKED = 1
  1890. Global Const $GUI_INDETERMINATE = 2
  1891. Global Const $GUI_UNCHECKED = 4
  1892. Global Const $GUI_DROPACCEPTED = 8
  1893. Global Const $GUI_NODROPACCEPTED = 4096
  1894. Global Const $GUI_ACCEPTFILES = $GUI_DROPACCEPTED
  1895. Global Const $GUI_SHOW = 16
  1896. Global Const $GUI_HIDE = 32
  1897. Global Const $GUI_ENABLE = 64
  1898. Global Const $GUI_DISABLE = 128
  1899. Global Const $GUI_FOCUS = 256
  1900. Global Const $GUI_NOFOCUS = 8192
  1901. Global Const $GUI_DEFBUTTON = 512
  1902. Global Const $GUI_EXPAND = 1024
  1903. Global Const $GUI_ONTOP = 2048
  1904. Global Const $GUI_FONTITALIC = 2
  1905. Global Const $GUI_FONTUNDER = 4
  1906. Global Const $GUI_FONTSTRIKE = 8
  1907. Global Const $GUI_DOCKAUTO = 0x0001
  1908. Global Const $GUI_DOCKLEFT = 0x0002
  1909. Global Const $GUI_DOCKRIGHT = 0x0004
  1910. Global Const $GUI_DOCKHCENTER = 0x0008
  1911. Global Const $GUI_DOCKTOP = 0x0020
  1912. Global Const $GUI_DOCKBOTTOM = 0x0040
  1913. Global Const $GUI_DOCKVCENTER = 0x0080
  1914. Global Const $GUI_DOCKWIDTH = 0x0100
  1915. Global Const $GUI_DOCKHEIGHT = 0x0200
  1916. Global Const $GUI_DOCKSIZE = 0x0300
  1917. Global Const $GUI_DOCKMENUBAR = 0x0220
  1918. Global Const $GUI_DOCKSTATEBAR = 0x0240
  1919. Global Const $GUI_DOCKALL = 0x0322
  1920. Global Const $GUI_DOCKBORDERS = 0x0066
  1921. Global Const $GUI_GR_CLOSE = 1
  1922. Global Const $GUI_GR_LINE = 2
  1923. Global Const $GUI_GR_BEZIER = 4
  1924. Global Const $GUI_GR_MOVE = 6
  1925. Global Const $GUI_GR_COLOR = 8
  1926. Global Const $GUI_GR_RECT = 10
  1927. Global Const $GUI_GR_ELLIPSE = 12
  1928. Global Const $GUI_GR_PIE = 14
  1929. Global Const $GUI_GR_DOT = 16
  1930. Global Const $GUI_GR_PIXEL = 18
  1931. Global Const $GUI_GR_HINT = 20
  1932. Global Const $GUI_GR_REFRESH = 22
  1933. Global Const $GUI_GR_PENSIZE = 24
  1934. Global Const $GUI_GR_NOBKCOLOR = -2
  1935. Global Const $GUI_BKCOLOR_DEFAULT = -1
  1936. Global Const $GUI_BKCOLOR_TRANSPARENT = -2
  1937. Global Const $GUI_BKCOLOR_LV_ALTERNATE = 0xFE000000
  1938. Global Const $GUI_WS_EX_PARENTDRAG = 0x00100000
  1939. ; ----------------------------------------------------------------------------
  1940. ; <AUT2EXE INCLUDE-END: C:\Program Files\AutoIt3\Include\GUIConstantsEx.au3>
  1941. ; ----------------------------------------------------------------------------
  1942. ; ----------------------------------------------------------------------------
  1943. ; <AUT2EXE INCLUDE-START: C:\Program Files\AutoIt3\Include\WindowsConstants.au3>
  1944. ; ----------------------------------------------------------------------------
  1945. ; ----------------------------------------------------------------------------
  1946. ; <AUT2EXE INCLUDE-END: C:\Program Files\AutoIt3\Include\WindowsConstants.au3>
  1947. ; ----------------------------------------------------------------------------
  1948. ; ----------------------------------------------------------------------------
  1949. ; <AUT2EXE INCLUDE-START: C:\Program Files\AutoIt3\Include\ComboConstants.au3>
  1950. ; ----------------------------------------------------------------------------
  1951. ; ----------------------------------------------------------------------------
  1952. ; <AUT2EXE INCLUDE-END: C:\Program Files\AutoIt3\Include\ComboConstants.au3>
  1953. ; ----------------------------------------------------------------------------
  1954. ; ----------------------------------------------------------------------------
  1955. ; <AUT2EXE INCLUDE-START: C:\Program Files\AutoIt3\Include\ListViewConstants.au3>
  1956. ; ----------------------------------------------------------------------------
  1957. ; ----------------------------------------------------------------------------
  1958. ; <AUT2EXE INCLUDE-END: C:\Program Files\AutoIt3\Include\ListViewConstants.au3>
  1959. ; ----------------------------------------------------------------------------
  1960. ; ----------------------------------------------------------------------------
  1961. ; <AUT2EXE INCLUDE-START: C:\Program Files\AutoIt3\Include\StaticConstants.au3>
  1962. ; ----------------------------------------------------------------------------
  1963. ; ----------------------------------------------------------------------------
  1964. ; <AUT2EXE INCLUDE-END: C:\Program Files\AutoIt3\Include\StaticConstants.au3>
  1965. ; ----------------------------------------------------------------------------
  1966. ; ----------------------------------------------------------------------------
  1967. ; <AUT2EXE INCLUDE-START: C:\Program Files\AutoIt3\Include\ButtonConstants.au3>
  1968. ; ----------------------------------------------------------------------------
  1969. Global Const $BS_GROUPBOX = 0x0007
  1970. Global Const $BS_BOTTOM = 0x0800
  1971. Global Const $BS_CENTER = 0x0300
  1972. Global Const $BS_DEFPUSHBUTTON = 0x0001
  1973. Global Const $BS_LEFT = 0x0100
  1974. Global Const $BS_MULTILINE = 0x2000
  1975. Global Const $BS_PUSHBOX = 0x000A
  1976. Global Const $BS_PUSHLIKE = 0x1000
  1977. Global Const $BS_RIGHT = 0x0200
  1978. Global Const $BS_RIGHTBUTTON = 0x0020
  1979. Global Const $BS_TOP = 0x0400
  1980. Global Const $BS_VCENTER = 0x0C00
  1981. Global Const $BS_FLAT = 0x8000
  1982. Global Const $BS_ICON = 0x0040
  1983. Global Const $BS_BITMAP = 0x0080
  1984. Global Const $BS_NOTIFY = 0x4000
  1985. Global Const $BS_3STATE = 0x0005
  1986. Global Const $BS_AUTO3STATE = 0x0006
  1987. Global Const $BS_AUTOCHECKBOX = 0x0003
  1988. Global Const $BS_CHECKBOX = 0x0002
  1989. Global Const $BS_AUTORADIOBUTTON = 0x0009
  1990. ; ----------------------------------------------------------------------------
  1991. ; <AUT2EXE INCLUDE-END: C:\Program Files\AutoIt3\Include\ButtonConstants.au3>
  1992. ; ----------------------------------------------------------------------------
  1993. ; ----------------------------------------------------------------------------
  1994. ; <AUT2EXE INCLUDE-START: C:\Program Files\AutoIt3\Include\ListBoxConstants.au3>
  1995. ; ----------------------------------------------------------------------------
  1996. ; ----------------------------------------------------------------------------
  1997. ; <AUT2EXE INCLUDE-END: C:\Program Files\AutoIt3\Include\ListBoxConstants.au3>
  1998. ; ----------------------------------------------------------------------------
  1999. ; ----------------------------------------------------------------------------
  2000. ; <AUT2EXE INCLUDE-START: C:\Program Files\AutoIt3\Include\TabConstants.au3>
  2001. ; ----------------------------------------------------------------------------
  2002. Global Const $TCS_SCROLLOPPOSITE = 0x0001
  2003. Global Const $TCS_BOTTOM = 0x0002
  2004. Global Const $TCS_RIGHT = 0x0002
  2005. Global Const $TCS_MULTISELECT = 0x0004
  2006. Global Const $TCS_FLATBUTTONS = 0x0008
  2007. Global Const $TCS_FORCEICONLEFT = 0x0010
  2008. Global Const $TCS_FORCELABELLEFT = 0x0020
  2009. Global Const $TCS_HOTTRACK = 0x0040
  2010. Global Const $TCS_VERTICAL = 0x0080
  2011. Global Const $TCS_TABS = 0x0000
  2012. Global Const $TCS_BUTTONS = 0x0100
  2013. Global Const $TCS_SINGLELINE = 0x0000
  2014. Global Const $TCS_MULTILINE = 0x0200
  2015. Global Const $TCS_RIGHTJUSTIFY = 0x0000
  2016. Global Const $TCS_FIXEDWIDTH = 0x0400
  2017. Global Const $TCS_RAGGEDRIGHT = 0x0800
  2018. Global Const $TCS_FOCUSONBUTTONDOWN = 0x1000
  2019. Global Const $TCS_OWNERDRAWFIXED = 0x2000
  2020. Global Const $TCS_TOOLTIPS = 0x4000
  2021. Global Const $TCS_FOCUSNEVER = 0x8000
  2022. Global Const $TCS_EX_FLATSEPARATORS = 0x1
  2023. Global Const $TC_ERR = -1
  2024. Global Const $TCIS_BUTTONPRESSED = 0x1
  2025. Global Const $TCS_EX_REGISTERDROP = 0x2
  2026. Global Const $TCM_FIRST = 0x1300
  2027. Global Const $TCM_DELETEALLITEMS = ($TCM_FIRST + 9)
  2028. Global Const $TCM_DELETEITEM = ($TCM_FIRST + 8)
  2029. Global Const $TCM_DESELECTALL = ($TCM_FIRST + 50)
  2030. Global Const $TCM_GETCURFOCUS = ($TCM_FIRST + 47)
  2031. Global Const $TCM_GETCURSEL = ($TCM_FIRST + 11)
  2032. Global Const $TCM_GETEXTENDEDSTYLE = ($TCM_FIRST + 53)
  2033. Global Const $TCM_GETITEMCOUNT = ($TCM_FIRST + 4)
  2034. Global Const $TCM_GETITEMRECT = ($TCM_FIRST + 10)
  2035. Global Const $TCM_GETROWCOUNT = ($TCM_FIRST + 44)
  2036. Global Const $TCM_SETITEMSIZE = $TCM_FIRST + 41
  2037. Global Const $TCCM_FIRST = 0X2000
  2038. Global Const $TCCM_GETUNICODEFORMAT = ($TCCM_FIRST + 6)
  2039. Global Const $TCM_GETUNICODEFORMAT = $TCCM_GETUNICODEFORMAT
  2040. Global Const $TCM_HIGHLIGHTITEM = ($TCM_FIRST + 51)
  2041. Global Const $TCM_SETCURFOCUS = ($TCM_FIRST + 48)
  2042. Global Const $TCM_SETCURSEL = ($TCM_FIRST + 12)
  2043. Global Const $TCM_SETMINTABWIDTH = ($TCM_FIRST + 49)
  2044. Global Const $TCM_SETPADDING = ($TCM_FIRST + 43)
  2045. Global Const $TCCM_SETUNICODEFORMAT = ($TCCM_FIRST + 5)
  2046. Global Const $TCM_SETUNICODEFORMAT = $TCCM_SETUNICODEFORMAT
  2047. Global Const $TCN_FIRST = -550
  2048. Global Const $TCN_SELCHANGE = ($TCN_FIRST - 1)
  2049. Global Const $TCN_SELCHANGING = ($TCN_FIRST - 2)
  2050. ; ----------------------------------------------------------------------------
  2051. ; <AUT2EXE INCLUDE-END: C:\Program Files\AutoIt3\Include\TabConstants.au3>
  2052. ; ----------------------------------------------------------------------------
  2053. ; ----------------------------------------------------------------------------
  2054. ; <AUT2EXE INCLUDE-START: C:\Program Files\AutoIt3\Include\EditConstants.au3>
  2055. ; ----------------------------------------------------------------------------
  2056. ; ----------------------------------------------------------------------------
  2057. ; <AUT2EXE INCLUDE-END: C:\Program Files\AutoIt3\Include\EditConstants.au3>
  2058. ; ----------------------------------------------------------------------------
  2059. ; ----------------------------------------------------------------------------
  2060. ; <AUT2EXE INCLUDE-START: C:\Program Files\AutoIt3\Include\DateTimeConstants.au3>
  2061. ; ----------------------------------------------------------------------------
  2062. ; ----------------------------------------------------------------------------
  2063. ; <AUT2EXE INCLUDE-END: C:\Program Files\AutoIt3\Include\DateTimeConstants.au3>
  2064. ; ----------------------------------------------------------------------------
  2065. ; ----------------------------------------------------------------------------
  2066. ; <AUT2EXE INCLUDE-START: C:\Program Files\AutoIt3\Include\SliderConstants.au3>
  2067. ; ----------------------------------------------------------------------------
  2068. ; ----------------------------------------------------------------------------
  2069. ; <AUT2EXE INCLUDE-END: C:\Program Files\AutoIt3\Include\SliderConstants.au3>
  2070. ; ----------------------------------------------------------------------------
  2071. ; ----------------------------------------------------------------------------
  2072. ; <AUT2EXE INCLUDE-START: C:\Program Files\AutoIt3\Include\TreeViewConstants.au3>
  2073. ; ----------------------------------------------------------------------------
  2074. ; ----------------------------------------------------------------------------
  2075. ; <AUT2EXE INCLUDE-END: C:\Program Files\AutoIt3\Include\TreeViewConstants.au3>
  2076. ; ----------------------------------------------------------------------------
  2077. ; ----------------------------------------------------------------------------
  2078. ; <AUT2EXE INCLUDE-START: C:\Program Files\AutoIt3\Include\ProgressConstants.au3>
  2079. ; ----------------------------------------------------------------------------
  2080. Global Const $PBS_SMOOTH = 1
  2081. Global Const $PBS_VERTICAL = 4
  2082. ; ----------------------------------------------------------------------------
  2083. ; <AUT2EXE INCLUDE-END: C:\Program Files\AutoIt3\Include\ProgressConstants.au3>
  2084. ; ----------------------------------------------------------------------------
  2085. ; ----------------------------------------------------------------------------
  2086. ; <AUT2EXE INCLUDE-START: C:\Program Files\AutoIt3\Include\AVIConstants.au3>
  2087. ; ----------------------------------------------------------------------------
  2088. ; ----------------------------------------------------------------------------
  2089. ; <AUT2EXE INCLUDE-END: C:\Program Files\AutoIt3\Include\AVIConstants.au3>
  2090. ; ----------------------------------------------------------------------------
  2091. ; ----------------------------------------------------------------------------
  2092. ; <AUT2EXE INCLUDE-START: C:\Program Files\AutoIt3\Include\UpDownConstants.au3>
  2093. ; ----------------------------------------------------------------------------
  2094. ; ----------------------------------------------------------------------------
  2095. ; <AUT2EXE INCLUDE-END: C:\Program Files\AutoIt3\Include\UpDownConstants.au3>
  2096. ; ----------------------------------------------------------------------------
  2097. ; ----------------------------------------------------------------------------
  2098. ; <AUT2EXE INCLUDE-END: C:\Program Files\AutoIt3\Include\GUIConstants.au3>
  2099. ; ----------------------------------------------------------------------------
  2100. ; ----------------------------------------------------------------------------
  2101. ; <AUT2EXE INCLUDE-START: C:\Program Files\AutoIt3\Scripts\WoW\Relogger\V1\onEventFunc.au3>
  2102. ; ----------------------------------------------------------------------------
  2103. #AutoIt3Wrapper_Add_Constants=n
  2104. ; ----------------------------------------------------------------------------
  2105. ; <AUT2EXE INCLUDE-START: C:\Program Files\AutoIt3\Include\array.au3>
  2106. ; ----------------------------------------------------------------------------
  2107. ; ----------------------------------------------------------------------------
  2108. ; <AUT2EXE INCLUDE-START: C:\Program Files\AutoIt3\Include\GuiConstants.au3>
  2109. ; ----------------------------------------------------------------------------
  2110. ; ----------------------------------------------------------------------------
  2111. ; <AUT2EXE INCLUDE-END: C:\Program Files\AutoIt3\Include\GuiConstants.au3>
  2112. ; ----------------------------------------------------------------------------
  2113. ; ----------------------------------------------------------------------------
  2114. ; <AUT2EXE INCLUDE-START: C:\Program Files\AutoIt3\Include\GuiListView.au3>
  2115. ; ----------------------------------------------------------------------------
  2116. ; ----------------------------------------------------------------------------
  2117. ; <AUT2EXE INCLUDE-START: C:\Program Files\AutoIt3\Include\ListViewConstants.au3>
  2118. ; ----------------------------------------------------------------------------
  2119. ; ----------------------------------------------------------------------------
  2120. ; <AUT2EXE INCLUDE-END: C:\Program Files\AutoIt3\Include\ListViewConstants.au3>
  2121. ; ----------------------------------------------------------------------------
  2122. ; ----------------------------------------------------------------------------
  2123. ; <AUT2EXE INCLUDE-START: C:\Program Files\AutoIt3\Include\Array.au3>
  2124. ; ----------------------------------------------------------------------------
  2125. ; ----------------------------------------------------------------------------
  2126. ; <AUT2EXE INCLUDE-END: C:\Program Files\AutoIt3\Include\Array.au3>
  2127. ; ----------------------------------------------------------------------------
  2128. ; ----------------------------------------------------------------------------
  2129. ; <AUT2EXE INCLUDE-START: C:\Program Files\AutoIt3\Include\Misc.au3>
  2130. ; ----------------------------------------------------------------------------
  2131. Global Const $CC_ANYCOLOR = 0x100
  2132. Global Const $CC_FULLOPEN = 0x2
  2133. Global Const $CC_RGBINIT = 0x1
  2134. Global Const $CF_EFFECTS = 0x100
  2135. Global Const $CF_PRINTERFONTS = 0x2
  2136. Global Const $CF_SCREENFONTS = 0x1
  2137. Global Const $CF_NOSCRIPTSEL = 0x800000
  2138. Global Const $CF_INITTOLOGFONTSTRUCT = 0x40
  2139. Global Const $DEFAULT_PITCH = 0
  2140. Global Const $FF_DONTCARE = 0
  2141. Global Const $LOGPIXELSX = 88
  2142. Func _ChooseColor($i_ReturnType = 0, $i_colorref = 0, $i_refType = 0)
  2143. Local $custcolors = "int[16]"
  2144. Local $struct = "dword;int;int;int;ptr;dword;int;ptr;ptr"
  2145. Local $p = DllStructCreate($struct)
  2146. If @error Then
  2147. SetError(-1)
  2148. Return -1
  2149. EndIf
  2150. Local $cc = DllStructCreate($custcolors)
  2151. If @error Then
  2152. SetError(-2)
  2153. Return -1
  2154. EndIf
  2155. If ($i_refType == 1) Then
  2156. $i_colorref = Int($i_colorref)
  2157. ElseIf ($i_refType == 2) Then
  2158. $i_colorref = Hex(String($i_colorref), 6)
  2159. $i_colorref = '0x' & StringMid($i_colorref, 5, 2) & StringMid($i_colorref, 3, 2) & StringMid($i_colorref, 1, 2)
  2160. EndIf
  2161. DllStructSetData($p, 1, DllStructGetSize($p))
  2162. DllStructSetData($p, 2, 0)
  2163. DllStructSetData($p, 4, $i_colorref)
  2164. DllStructSetData($p, 5, DllStructGetPtr($cc))
  2165. DllStructSetData($p, 6, BitOR($CC_ANYCOLOR, $CC_FULLOPEN, $CC_RGBINIT))
  2166. Local $ret = DllCall("comdlg32.dll", "long", "ChooseColor", "ptr", DllStructGetPtr($p))
  2167. If ($ret[0] == 0) Then
  2168. SetError(-3)
  2169. Return -1
  2170. EndIf
  2171. Local $color_picked = DllStructGetData($p, 4)
  2172. If ($i_ReturnType == 1) Then
  2173. Return '0x' & Hex(String($color_picked), 6)
  2174. ElseIf ($i_ReturnType == 2) Then
  2175. $color_picked = Hex(String($color_picked), 6)
  2176. Return '0x' & StringMid($color_picked, 5, 2) & StringMid($color_picked, 3, 2) & StringMid($color_picked, 1, 2)
  2177. ElseIf ($i_ReturnType == 0) Then
  2178. Return $color_picked
  2179. Else
  2180. SetError(-4)
  2181. Return -1
  2182. EndIf
  2183. EndFunc
  2184. Func _ChooseFont($s_FontName = "Courier New", $i_size = 10, $i_colorref = 0, $i_FontWeight = 0, $i_Italic = 0, $i_Underline = 0, $i_Strikethru = 0)
  2185. Local $ret = DllCall("gdi32.dll", "long", "GetDeviceCaps", "long", 0, "long", $LOGPIXELSX)
  2186. If ($ret[0] == -1) Then
  2187. SetError(-3)
  2188. Return -1
  2189. EndIf
  2190. Local $lfHeight = Round(($i_size * $ret[2]) / 72, 0)
  2191. Local $logfont = "int;int;int;int;int;byte;byte;byte;byte;byte;byte;byte;byte;char[32]"
  2192. Local $struct = "dword;int;int;ptr;int;dword;int;int;ptr;ptr;int;ptr;dword;int;int"
  2193. Local $p = DllStructCreate($struct)
  2194. If @error Then
  2195. SetError(-1)
  2196. Return -1
  2197. EndIf
  2198. Local $lf = DllStructCreate($logfont)
  2199. If @error Then
  2200. SetError(-2)
  2201. Return -1
  2202. EndIf
  2203. DllStructSetData($p, 1, DllStructGetSize($p))
  2204. DllStructSetData($p, 2, 0)
  2205. DllStructSetData($p, 4, DllStructGetPtr($lf))
  2206. DllStructSetData($p, 5, $i_size)
  2207. DllStructSetData($p, 6, BitOR($CF_SCREENFONTS, $CF_PRINTERFONTS, $CF_EFFECTS, $CF_INITTOLOGFONTSTRUCT, $CF_NOSCRIPTSEL))
  2208. DllStructSetData($p, 7, $i_colorref)
  2209. DllStructSetData($p, 13, 0)
  2210. DllStructSetData($lf, 1, $lfHeight + 1)
  2211. DllStructSetData($lf, 5, $i_FontWeight)
  2212. DllStructSetData($lf, 6, $i_Italic)
  2213. DllStructSetData($lf, 7, $i_Underline)
  2214. DllStructSetData($lf, 8, $i_Strikethru)
  2215. DllStructSetData($lf, 14, $s_FontName)
  2216. $ret = DllCall("comdlg32.dll", "long", "ChooseFont", "ptr", DllStructGetPtr($p))
  2217. If ($ret[0] == 0) Then
  2218. SetError(-3)
  2219. Return -1
  2220. EndIf
  2221. Local $fontname = DllStructGetData($lf, 14)
  2222. If (StringLen($fontname) == 0 And StringLen($s_FontName) > 0) Then
  2223. $fontname = $s_FontName
  2224. EndIf
  2225. Local $italic = 0
  2226. Local $underline = 0
  2227. Local $strikeout = 0
  2228. If (DllStructGetData($lf, 6)) Then
  2229. $italic = 2
  2230. EndIf
  2231. If (DllStructGetData($lf, 7)) Then
  2232. $underline = 4
  2233. EndIf
  2234. If (DllStructGetData($lf, 8)) Then
  2235. $strikeout = 8
  2236. EndIf
  2237. Local $attributes = BitOR($italic, $underline, $strikeout)
  2238. Local $size = DllStructGetData($p, 5) / 10
  2239. Local $weight = DllStructGetData($lf, 5)
  2240. Local $colorref = DllStructGetData($p, 7)
  2241. Local $color_picked = Hex(String($colorref), 6)
  2242. Return StringSplit($attributes & "," & $fontname & "," & $size & "," & $weight & "," & $colorref & "," & '0x' & $color_picked & "," & '0x' & StringMid($color_picked, 5, 2) & StringMid($color_picked, 3, 2) & StringMid($color_picked, 1, 2), ",")
  2243. EndFunc
  2244. Func _ClipPutFile($sFile, $sSeperator = "|")
  2245. Local $vDllCallTmp, $nGlobMemSize, $hGlobal, $DROPFILES, $i, $hLock
  2246. Local $GMEM_MOVEABLE = 0x0002, $CF_HDROP = 15
  2247. $sFile = $sFile & $sSeperator & $sSeperator
  2248. $nGlobMemSize = StringLen($sFile) + 20
  2249. $vDllCallTmp = DllCall("user32.dll", "int", "OpenClipboard", "hwnd", 0)
  2250. If @error Or $vDllCallTmp[0] = 0 Then
  2251. SetError(1)
  2252. Return False
  2253. EndIf
  2254. $vDllCallTmp = DllCall("user32.dll", "int", "EmptyClipboard")
  2255. If @error Or $vDllCallTmp[0] = 0 Then
  2256. SetError(2)
  2257. Return False
  2258. EndIf
  2259. $vDllCallTmp = DllCall("kernel32.dll", "long", "GlobalAlloc", "int", $GMEM_MOVEABLE, "int", $nGlobMemSize)
  2260. If @error Or $vDllCallTmp[0] < 1 Then
  2261. SetError(3)
  2262. Return False
  2263. EndIf
  2264. $hGlobal = $vDllCallTmp[0]
  2265. $vDllCallTmp = DllCall("kernel32.dll", "long", "GlobalLock", "long", $hGlobal)
  2266. If @error Or $vDllCallTmp[0] < 1 Then
  2267. SetError(4)
  2268. Return False
  2269. EndIf
  2270. $hLock = $vDllCallTmp[0]
  2271. $DROPFILES = DllStructCreate("dword;ptr;int;int;int;char[" & StringLen($sFile) & "]", $hLock)
  2272. If @error Then
  2273. SetError(5)
  2274. Return False
  2275. EndIf
  2276. DllStructSetData($DROPFILES, 1, DllStructGetSize($DROPFILES) - StringLen($sFile))
  2277. DllStructSetData($DROPFILES, 2, 0)
  2278. DllStructSetData($DROPFILES, 3, 0)
  2279. DllStructSetData($DROPFILES, 4, 0)
  2280. DllStructSetData($DROPFILES, 5, 0)
  2281. DllStructSetData($DROPFILES, 6, $sFile)
  2282. For $i = 1 To StringLen($sFile)
  2283. If DllStructGetData($DROPFILES, 6, $i) = Asc($sSeperator) Then DllStructSetData($DROPFILES, 6, 0, $i)
  2284. Next
  2285. $vDllCallTmp = DllCall("user32.dll", "long", "SetClipboardData", "int", $CF_HDROP, "long", $hGlobal)
  2286. If @error Or $vDllCallTmp[0] < 1 Then
  2287. SetError(6)
  2288. $DROPFILES = 0
  2289. Return False
  2290. EndIf
  2291. $vDllCallTmp = DllCall("user32.dll", "int", "CloseClipboard")
  2292. If @error Or $vDllCallTmp[0] = 0 Then
  2293. SetError(7)
  2294. $DROPFILES = 0
  2295. Return False
  2296. EndIf
  2297. $vDllCallTmp = DllCall("kernel32.dll", "int", "GlobalUnlock", "long", $hGlobal)
  2298. If @error Then
  2299. SetError(8)
  2300. $DROPFILES = 0
  2301. Return False
  2302. EndIf
  2303. $vDllCallTmp = DllCall("kernel32.dll", "int", "GetLastError")
  2304. If $vDllCallTmp = 0 Then
  2305. $DROPFILES = 0
  2306. SetError(8)
  2307. Return False
  2308. Else
  2309. $DROPFILES = 0
  2310. Return True
  2311. EndIf
  2312. EndFunc
  2313. Func _Iif($f_Test, $v_TrueVal, $v_FalseVal)
  2314. If $f_Test Then
  2315. Return $v_TrueVal
  2316. Else
  2317. Return $v_FalseVal
  2318. EndIf
  2319. EndFunc
  2320. Func _MouseTrap($i_left = 0, $i_top = 0, $i_right = 0, $i_bottom = 0)
  2321. Local $av_ret
  2322. If @NumParams == 0 Then
  2323. $av_ret = DllCall("user32.dll", "int", "ClipCursor", "int", 0)
  2324. Else
  2325. If @NumParams == 2 Then
  2326. $i_right = $i_left + 1
  2327. $i_bottom = $i_top + 1
  2328. EndIf
  2329. Local $Rect = DllStructCreate("int;int;int;int")
  2330. If @error Then Return 0
  2331. DllStructSetData($Rect, 1, $i_left)
  2332. DllStructSetData($Rect, 2, $i_top)
  2333. DllStructSetData($Rect, 3, $i_right)
  2334. DllStructSetData($Rect, 4, $i_bottom)
  2335. $av_ret = DllCall("user32.dll", "int", "ClipCursor", "ptr", DllStructGetPtr($Rect))
  2336. EndIf
  2337. Return $av_ret[0]
  2338. EndFunc
  2339. Func _Singleton($occurenceName, $flag = 0)
  2340. Local $ERROR_ALREADY_EXISTS = 183
  2341. $occurenceName = StringReplace($occurenceName, "\", "")
  2342. Local $handle = DllCall("kernel32.dll", "int", "CreateMutex", "int", 0, "long", 1, "str", $occurenceName)
  2343. Local $lastError = DllCall("kernel32.dll", "int", "GetLastError")
  2344. If $lastError[0] = $ERROR_ALREADY_EXISTS Then
  2345. If $flag = 0 Then
  2346. Exit -1
  2347. Else
  2348. SetError($lastError[0])
  2349. Return 0
  2350. EndIf
  2351. EndIf
  2352. Return $handle[0]
  2353. EndFunc
  2354. Func _IsPressed($s_hexKey, $v_dll = 'user32.dll')
  2355. Local $a_R = DllCall($v_dll, "int", "GetAsyncKeyState", "int", '0x' & $s_hexKey)
  2356. If Not @error And BitAND($a_R[0], 0x8000) = 0x8000 Then Return 1
  2357. Return 0
  2358. EndFunc
  2359. Func _SendMessage($h_hWnd, $i_msg, $wParam = 0, $lParam = 0, $i_r = 0, $s_t1 = "int", $s_t2 = "int")
  2360. Local $a_ret = DllCall("user32.dll", "long", "SendMessage", "hwnd", $h_hWnd, "int", $i_msg, $s_t1, $wParam, $s_t2, $lParam)
  2361. If @error Then Return SetError(@error, @extended, "")
  2362. If $i_r >= 0 And $i_r <= 4 Then Return $a_ret[$i_r]
  2363. Return $a_ret
  2364. EndFunc
  2365. Func _IsClassName($h_hWnd, $s_ClassName)
  2366. If Not IsHWnd($h_hWnd) Then $h_hWnd = GUICtrlGetHandle($h_hWnd)
  2367. Local $aResult = DllCall("user32.dll", "int", "GetClassNameA", "hwnd", $h_hWnd, "str", "", "int", 256)
  2368. If @error Then Return SetError(@error, @error, "")
  2369. If IsArray($aResult) Then
  2370. If StringUpper(StringMid($aResult[2], 1, StringLen($s_ClassName))) = StringUpper($s_ClassName) Then
  2371. Return 1
  2372. Else
  2373. Return 0
  2374. EndIf
  2375. Else
  2376. Return SetError(-1, -1, 0)
  2377. EndIf
  2378. EndFunc
  2379. ; ----------------------------------------------------------------------------
  2380. ; <AUT2EXE INCLUDE-END: C:\Program Files\AutoIt3\Include\Misc.au3>
  2381. ; ----------------------------------------------------------------------------
  2382. ; ----------------------------------------------------------------------------
  2383. ; <AUT2EXE INCLUDE-START: C:\Program Files\AutoIt3\Include\Memory.au3>
  2384. ; ----------------------------------------------------------------------------
  2385. Global Const $MEM_MAP = "uint;uint;ptr"
  2386. Global Const $MEM_MAP_HPROC = 1
  2387. Global Const $MEM_MAP_ISIZE = 2
  2388. Global Const $MEM_MAP_PMEM = 3
  2389. Func _MemFree(ByRef $rMemMap)
  2390. Local $hProcess
  2391. Local $pMemory
  2392. Local $bResult
  2393. Local $MEM_RELEASE = 0x00008000
  2394. $hProcess = DllStructGetData($rMemMap, $MEM_MAP_HPROC)
  2395. $pMemory = DllStructGetData($rMemMap, $MEM_MAP_PMEM)
  2396. Switch @OSVersion
  2397. Case "WIN_ME", "WIN_98", "WIN_95"
  2398. $bResult = _VirtualFree($pMemory, 0, $MEM_RELEASE)
  2399. Case Else
  2400. $bResult = _VirtualFreeEx($hProcess, $pMemory, 0, $MEM_RELEASE)
  2401. EndSwitch
  2402. _CloseHandle($hProcess)
  2403. $rMemMap = 0
  2404. Return $bResult
  2405. EndFunc
  2406. Func _CloseHandle($hObject)
  2407. Local $aResult = DllCall("Kernel32.dll", "int", "CloseHandle", "int", $hObject)
  2408. If @error Or Not IsArray($aResult) Then Return SetError(-1, -1, 0)
  2409. Return $aResult[0]
  2410. EndFunc
  2411. Func _VirtualAlloc($pAddress, $iSize, $iAllocation, $iProtect)
  2412. Local $aResult = DllCall("Kernel32.dll", "ptr", "VirtualAlloc", "ptr", $pAddress, "int", $iSize, "int", $iAllocation, "int", $iProtect)
  2413. If @error Or Not IsArray($aResult) Then Return SetError(-1, -1, 0)
  2414. Return $aResult[0]
  2415. EndFunc
  2416. Func _VirtualAllocEx($hProcess, $pAddress, $iSize, $iAllocation, $iProtect)
  2417. Local $aResult = DllCall("Kernel32.dll", "ptr", "VirtualAllocEx", "int", $hProcess, "ptr", $pAddress, "int", $iSize, "int", $iAllocation, "int", $iProtect)
  2418. If @error Or Not IsArray($aResult) Then Return SetError(-1, -1, 0)
  2419. Return $aResult[0]
  2420. EndFunc
  2421. Func _VirtualFree($pAddress, $iSize, $iFreeType)
  2422. Local $aResult = DllCall("Kernel32.dll", "ptr", "VirtualFree", "ptr", $pAddress, "int", $iSize, "int", $iFreeType)
  2423. If @error Or Not IsArray($aResult) Then Return SetError(-1, -1, 0)
  2424. Return $aResult[0]
  2425. EndFunc
  2426. Func _VirtualFreeEx($hProcess, $pAddress, $iSize, $iFreeType)
  2427. Local $aResult = DllCall("Kernel32.dll", "ptr", "VirtualFreeEx", "hwnd", $hProcess, "ptr", $pAddress, "int", $iSize, "int", $iFreeType)
  2428. If @error Or Not IsArray($aResult) Then Return SetError(-1, -1, 0)
  2429. Return $aResult[0]
  2430. EndFunc
  2431. Func _GetWindowThreadProcessId($hWnd, ByRef $iProcessID)
  2432. Local $rProcessID, $aResult
  2433. $rProcessID = DllStructCreate("int")
  2434. $aResult = DllCall("User32.dll", "int", "GetWindowThreadProcessId", "hwnd", $hWnd, "ptr", DllStructGetPtr($rProcessID))
  2435. If @error Or Not IsArray($aResult) Then Return SetError(-1, -1, 0)
  2436. $iProcessID = DllStructGetData($rProcessID, 1)
  2437. Return $aResult[0]
  2438. EndFunc
  2439. Func _OpenProcess($iAccess, $bInherit, $iProcessID)
  2440. Local $aResult = DllCall("Kernel32.Dll", "int", "OpenProcess", "int", $iAccess, "int", $bInherit, "int", $iProcessID)
  2441. If @error Or Not IsArray($aResult) Then Return SetError(-1, -1, 0)
  2442. Return $aResult[0]
  2443. EndFunc
  2444. Func _ReadProcessMemory($hProcess, $pBaseAddress, $pBuffer, $iSize, ByRef $iBytesRead)
  2445. Local $rBytesRead = DllStructCreate("int")
  2446. Local $aResult = DllCall("Kernel32.dll", "int", "ReadProcessMemory", "int", $hProcess, "int", $pBaseAddress, _
  2447. "ptr", $pBuffer, "int", $iSize, "ptr", DllStructGetPtr($rBytesRead))
  2448. If @error Or Not IsArray($aResult) Then Return SetError(-1, -1, 0)
  2449. $iBytesRead = DllStructGetData($rBytesRead, 1)
  2450. $rBytesRead = 0
  2451. Return $aResult[0]
  2452. EndFunc
  2453. Func _WriteProcessMemory($hProcess, $pBaseAddress, $pBuffer, $iSize, ByRef $iBytesWritten)
  2454. Local $rBytesWritten = DllStructCreate("int")
  2455. Local $aResult = DllCall("Kernel32.dll", "int", "WriteProcessMemory", "int", $hProcess, "int", $pBaseAddress, _
  2456. "ptr", $pBuffer, "int", $iSize, "int", DllStructGetPtr($rBytesWritten))
  2457. If @error Or Not IsArray($aResult) Then Return SetError(-1, -1, 0)
  2458. $iBytesWritten = DllStructGetData($rBytesWritten, 1)
  2459. $rBytesWritten = 0
  2460. Return $aResult[0]
  2461. EndFunc
  2462. Func _MemInit($hWnd, $iSize, ByRef $rMemMap, $pAddress = 0)
  2463. Local $iAccess, $iAllocation
  2464. Local $pMemory, $hProcess
  2465. Local $iProcessID
  2466. Local $PROCESS_VM_OPERATION = 0x00000008
  2467. Local $PROCESS_VM_READ = 0x00000010
  2468. Local $PROCESS_VM_WRITE = 0x00000020
  2469. Local $MEM_RESERVE = 0x00002000
  2470. Local $MEM_COMMIT = 0x00001000
  2471. Local $MEM_SHARED = 0x08000000
  2472. Local $PAGE_READWRITE = 0x00000004
  2473. _GetWindowThreadProcessId($hWnd, $iProcessID)
  2474. $iAccess = BitOR($PROCESS_VM_OPERATION, $PROCESS_VM_READ, $PROCESS_VM_WRITE)
  2475. $hProcess = _OpenProcess($iAccess, False, $iProcessID)
  2476. Switch @OSVersion
  2477. Case "WIN_ME", "WIN_98", "WIN_95"
  2478. $iAllocation = BitOR($MEM_RESERVE, $MEM_COMMIT, $MEM_SHARED)
  2479. $pMemory = _VirtualAlloc($pAddress, $iSize, $iAllocation, $PAGE_READWRITE)
  2480. Case Else
  2481. $iAllocation = BitOR($MEM_RESERVE, $MEM_COMMIT)
  2482. $pMemory = _VirtualAllocEx($hProcess, $pAddress, $iSize, $iAllocation, $PAGE_READWRITE)
  2483. EndSwitch
  2484. If @error Then Return SetError(-1, -1, 0)
  2485. $rMemMap = DllStructCreate($MEM_MAP)
  2486. DllStructSetData($rMemMap, $MEM_MAP_HPROC, $hProcess)
  2487. DllStructSetData($rMemMap, $MEM_MAP_ISIZE, $iSize)
  2488. DllStructSetData($rMemMap, $MEM_MAP_PMEM, $pMemory)
  2489. Return $pMemory
  2490. EndFunc
  2491. Func _MemRead($rMemMap, $pSrce, $pDest, $iSize)
  2492. Local $hProcess
  2493. Local $iWritten
  2494. $hProcess = DllStructGetData($rMemMap, $MEM_MAP_HPROC)
  2495. Return _ReadProcessMemory($hProcess, $pSrce, $pDest, $iSize, $iWritten)
  2496. EndFunc
  2497. Func _MemWrite($rMemMap, $pSrce, $pDest = 0, $iSize = 0)
  2498. Local $hProcess
  2499. Local $iWritten
  2500. If $pDest = 0 Then
  2501. $pDest = DllStructGetData($rMemMap, $MEM_MAP_PMEM)
  2502. EndIf
  2503. If $iSize = 0 Then
  2504. $iSize = DllStructGetData($rMemMap, $MEM_MAP_ISIZE)
  2505. EndIf
  2506. $hProcess = DllStructGetData($rMemMap, $MEM_MAP_HPROC)
  2507. Return _WriteProcessMemory($hProcess, $pDest, $pSrce, $iSize, $iWritten)
  2508. EndFunc
  2509. Func _MultiByteToWideChar($s_Text, $i_CodePage = 0, $i_Flags = 1)
  2510. Local $iBuffLen = StringLen($s_Text)
  2511. Local $rUnicode = DllStructCreate("byte[" & ($iBuffLen * 2) & "]")
  2512. Local $pUnicode = DllStructGetPtr($rUnicode)
  2513. DllCall("Kernel32.dll", "int", "MultiByteToWideChar", "int", $i_CodePage, "int", $i_Flags, _
  2514. "str", $s_Text, "int", $iBuffLen, "ptr", $pUnicode, "int", $iBuffLen * 2)
  2515. If @error Then Return SetError(-1, -1, 0)
  2516. Return DllStructGetData($rUnicode, 1)
  2517. EndFunc
  2518. ; ----------------------------------------------------------------------------
  2519. ; <AUT2EXE INCLUDE-END: C:\Program Files\AutoIt3\Include\Memory.au3>
  2520. ; ----------------------------------------------------------------------------
  2521. Global Const $LVITEM = "int;int;int;int;int;ptr;int;int;int;int"
  2522. Global Enum $LVI_MASK = 1, $LVI_IITEM, $LVI_ISUBITEM, $LVI_STATE, $LVI_STATEMASK, $LVI_PSZTEXT, _
  2523. $LVI_CCHTEXTMAX, $LVI_IIMAGE, $LVI_LPARAM, $LVI_IINDENT
  2524. Global $LVCOLUMN = "uint;int;int;ptr;int;int;int;int"
  2525. Global Enum $LVC_MASK = 1, $LVC_FMT, $LVC_CX, $LVC_PSZTEXT, $LVC_CCHTEXTMAX, $LVC_ISUBITEM, $LVC_IIMAGE, $LVC_IORDER
  2526. Func _GUICtrlListViewCopyItems($h_Source_listview, $h_Destination_listview, $i_DelFlag = 0)
  2527. If Not _IsClassName ($h_Source_listview, "SysListView32") Then Return SetError($LV_ERR, $LV_ERR, 0)
  2528. If Not _IsClassName ($h_Destination_listview, "SysListView32") Then Return SetError($LV_ERR, $LV_ERR, 0)
  2529. Local $a_indices, $i, $s_item, $items
  2530. $items = _GUICtrlListViewGetItemCount($h_Source_listview)
  2531. If BitAND(_GUICtrlListViewGetExtendedListViewStyle($h_Source_listview), $LVS_EX_CHECKBOXES) == $LVS_EX_CHECKBOXES Then
  2532. For $i = 0 To $items - 1
  2533. If (_GUICtrlListViewGetCheckedState($h_Source_listview, $i)) Then
  2534. If IsArray($a_indices) Then
  2535. ReDim $a_indices[UBound($a_indices) + 1]
  2536. Else
  2537. Local $a_indices[2]
  2538. EndIf
  2539. $a_indices[0] = $a_indices[0] + 1
  2540. $a_indices[UBound($a_indices) - 1] = $i
  2541. EndIf
  2542. Next
  2543. If (IsArray($a_indices)) Then
  2544. For $i = 1 To $a_indices[0]
  2545. $s_item = _GUICtrlListViewGetItemText($h_Source_listview, $a_indices[$i])
  2546. _GUICtrlListViewSetCheckState($h_Source_listview, $a_indices[$i], 0)
  2547. _GUICtrlListViewInsertItem($h_Destination_listview, _GUICtrlListViewGetItemCount($h_Destination_listview), $s_item)
  2548. Next
  2549. If $i_DelFlag Then
  2550. For $i = $a_indices[0] To 1 Step - 1
  2551. _GUICtrlListViewSetItemSelState($h_Source_listview, $a_indices[$i])
  2552. _GUICtrlListViewDeleteItem($h_Source_listview, $a_indices[$i])
  2553. Next
  2554. EndIf
  2555. EndIf
  2556. EndIf
  2557. If (_GUICtrlListViewGetSelectedCount($h_Source_listview)) Then
  2558. $a_indices = _GUICtrlListViewGetSelectedIndices($h_Source_listview, 1)
  2559. For $i = 1 To $a_indices[0]
  2560. $s_item = _GUICtrlListViewGetItemText($h_Source_listview, $a_indices[$i])
  2561. _GUICtrlListViewInsertItem($h_Destination_listview, _GUICtrlListViewGetItemCount($h_Destination_listview), $s_item)
  2562. Next
  2563. _GUICtrlListViewSetItemSelState($h_Source_listview, -1, 0)
  2564. If $i_DelFlag Then
  2565. For $i = $a_indices[0] To 1 Step - 1
  2566. _GUICtrlListViewSetItemSelState($h_Source_listview, $a_indices[$i])
  2567. _GUICtrlListViewDeleteItem($h_Source_listview, $a_indices[$i])
  2568. Next
  2569. EndIf
  2570. EndIf
  2571. EndFunc
  2572. Func _GUICtrlListViewDeleteAllItems($h_listview)
  2573. If Not _IsClassName ($h_listview, "SysListView32") Then Return SetError($LV_ERR, $LV_ERR, False)
  2574. Local $i_index, $control_ID
  2575. If IsHWnd($h_listview) Then
  2576. Return _SendMessage($h_listview, $LVM_DELETEALLITEMS)
  2577. Else
  2578. For $i_index = _GUICtrlListViewGetItemCount($h_listview) - 1 To 0 Step - 1
  2579. _GUICtrlListViewSetItemSelState($h_listview, $i_index, 1)
  2580. $control_ID = GUICtrlRead($h_listview)
  2581. If $control_ID Then GUICtrlDelete($control_ID)
  2582. Next
  2583. If _GUICtrlListViewGetItemCount($h_listview) == 0 Then
  2584. Return 1
  2585. Else
  2586. Return GUICtrlSendMsg($h_listview, $LVM_DELETEALLITEMS, 0, 0)
  2587. EndIf
  2588. EndIf
  2589. EndFunc
  2590. Func _GUICtrlListViewDeleteColumn($h_listview, $i_col)
  2591. If Not _IsClassName ($h_listview, "SysListView32") Then Return SetError($LV_ERR, $LV_ERR, False)
  2592. If IsHWnd($h_listview) Then
  2593. Return _SendMessage($h_listview, $LVM_DELETECOLUMN, $i_col)
  2594. Else
  2595. Return GUICtrlSendMsg($h_listview, $LVM_DELETECOLUMN, $i_col, 0)
  2596. EndIf
  2597. EndFunc
  2598. Func _GUICtrlListViewDeleteItem($h_listview, $i_index)
  2599. If Not _IsClassName ($h_listview, "SysListView32") Then Return SetError($LV_ERR, $LV_ERR, False)
  2600. Local $control_ID, $ID_Check
  2601. If IsHWnd($h_listview) Then
  2602. Return _SendMessage($h_listview, $LVM_DELETEITEM, $i_index)
  2603. Else
  2604. _GUICtrlListViewSetItemSelState($h_listview, -1, 0)
  2605. _GUICtrlListViewSetItemSelState($h_listview, $i_index)
  2606. $control_ID = GUICtrlRead($h_listview)
  2607. If $control_ID Then
  2608. GUICtrlDelete($control_ID)
  2609. _GUICtrlListViewSetItemSelState($h_listview, $i_index)
  2610. $ID_Check = GUICtrlRead($h_listview)
  2611. _GUICtrlListViewSetItemSelState($h_listview, $i_index, 0)
  2612. If $control_ID <> $ID_Check Then
  2613. Return 1
  2614. Else
  2615. Return GUICtrlSendMsg($h_listview, $LVM_DELETEITEM, $i_index, 0)
  2616. EndIf
  2617. Else
  2618. If Not GUICtrlSendMsg($h_listview, $LVM_DELETEITEM, $i_index, 0) Then
  2619. Return _SendMessage($h_listview, $LVM_DELETEITEM, $i_index)
  2620. Else
  2621. Return 1
  2622. EndIf
  2623. EndIf
  2624. EndIf
  2625. EndFunc
  2626. Func _GUICtrlListViewDeleteItemsSelected($h_listview)
  2627. If Not _IsClassName ($h_listview, "SysListView32") Then Return SetError($LV_ERR, $LV_ERR, 0)
  2628. Local $i, $ItemCount
  2629. $ItemCount = _GUICtrlListViewGetItemCount($h_listview)
  2630. If (_GUICtrlListViewGetSelectedCount($h_listview) == $ItemCount) Then
  2631. _GUICtrlListViewDeleteAllItems($h_listview)
  2632. Else
  2633. Local $items = _GUICtrlListViewGetSelectedIndices($h_listview, 1)
  2634. If Not IsArray($items) Then Return SetError($LV_ERR, $LV_ERR, 0)
  2635. _GUICtrlListViewSetItemSelState($h_listview, -1, 0)
  2636. For $i = $items[0] To 1 Step - 1
  2637. _GUICtrlListViewDeleteItem($h_listview, $items[$i])
  2638. Next
  2639. EndIf
  2640. EndFunc
  2641. Func _GUICtrlListViewEnsureVisible($h_listview, $i_index, $i_bool)
  2642. If Not _IsClassName ($h_listview, "SysListView32") Then Return SetError($LV_ERR, $LV_ERR, False)
  2643. If IsHWnd($h_listview) Then
  2644. Return _SendMessage($h_listview, $LVM_ENSUREVISIBLE, $i_index, $i_bool)
  2645. Else
  2646. Return GUICtrlSendMsg($h_listview, $LVM_ENSUREVISIBLE, $i_index, $i_bool)
  2647. EndIf
  2648. EndFunc
  2649. Func _GUICtrlListViewFindItem($h_listview, $v_find, $i_Start = -1, $v_SearchType = 0x8, $v_direction = 0x28)
  2650. If Not _IsClassName ($h_listview, "SysListView32") Then Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  2651. Local $struct_String, $struct_LVFINDINFO, $iResult
  2652. Local $i_Size, $struct_LVFINDINFO_pointer, $struct_MemMap, $Memory_pointer, $string_Memory_pointer, $sBuffer_pointer
  2653. $struct_LVFINDINFO = DllStructCreate("uint;ptr;int;int[2];int")
  2654. If @error Then Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  2655. DllStructSetData($struct_LVFINDINFO, 1, $v_SearchType)
  2656. If BitAND($v_SearchType, $LVFI_PARAM) = $LVFI_PARAM Then
  2657. DllStructSetData($struct_LVFINDINFO, 3, $v_find)
  2658. Else
  2659. If StringLen($v_find) = 0 Then Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  2660. $struct_String = DllStructCreate("char[" & StringLen($v_find) + 1 & "]")
  2661. $sBuffer_pointer = DllStructGetPtr($struct_String)
  2662. DllStructSetData($struct_String, 1, $v_find)
  2663. EndIf
  2664. DllStructSetData($struct_LVFINDINFO, 6, $v_direction)
  2665. If IsHWnd($h_listview) Then
  2666. $i_Size = DllStructGetSize($struct_LVFINDINFO)
  2667. $struct_LVFINDINFO_pointer = DllStructGetPtr($struct_LVFINDINFO)
  2668. If BitAND($v_SearchType, $LVFI_PARAM) = $LVFI_PARAM Then
  2669. $Memory_pointer = _MemInit ($h_listview, $i_Size, $struct_MemMap)
  2670. If @error Then
  2671. _MemFree ($struct_MemMap)
  2672. Return SetError($LV_ERR, $LV_ERR, 0)
  2673. EndIf
  2674. _MemWrite ($struct_MemMap, $struct_LVFINDINFO_pointer)
  2675. Else
  2676. $Memory_pointer = _MemInit ($h_listview, $i_Size + StringLen($v_find) + 1, $struct_MemMap)
  2677. If @error Then
  2678. _MemFree ($struct_MemMap)
  2679. Return SetError($LV_ERR, $LV_ERR, 0)
  2680. EndIf
  2681. $string_Memory_pointer = $Memory_pointer + $i_Size
  2682. DllStructSetData($struct_LVFINDINFO, 2, $string_Memory_pointer)
  2683. _MemWrite ($struct_MemMap, $struct_LVFINDINFO_pointer)
  2684. _MemWrite ($struct_MemMap, $sBuffer_pointer, $string_Memory_pointer, 4096)
  2685. EndIf
  2686. $iResult = _SendMessage($h_listview, $LVM_FINDITEM, $i_Start, $Memory_pointer)
  2687. If @error Then
  2688. _MemFree ($struct_MemMap)
  2689. Return SetError($LV_ERR, $LV_ERR, 0)
  2690. EndIf
  2691. _MemFree ($struct_MemMap)
  2692. If @error Then Return SetError($LV_ERR, $LV_ERR, 0)
  2693. Return $iResult
  2694. Else
  2695. If BitAND($v_SearchType, $LVFI_PARAM) <> $LVFI_PARAM Then
  2696. DllStructSetData($struct_LVFINDINFO, 2, DllStructGetPtr($struct_String))
  2697. EndIf
  2698. Return GUICtrlSendMsg($h_listview, $LVM_FINDITEM, $i_Start, DllStructGetPtr($struct_LVFINDINFO))
  2699. EndIf
  2700. EndFunc
  2701. Func _GUICtrlListViewGetBackColor($h_listview)
  2702. If Not _IsClassName ($h_listview, "SysListView32") Then Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  2703. Local $v_color
  2704. If IsHWnd($h_listview) Then
  2705. $v_color = _SendMessage($h_listview, $LVM_GETBKCOLOR)
  2706. Else
  2707. $v_color = GUICtrlSendMsg($h_listview, $LVM_GETBKCOLOR, 0, 0)
  2708. EndIf
  2709. Return _ReverseColorOrder($v_color)
  2710. EndFunc
  2711. Func _GUICtrlListViewGetCallBackMask($h_listview)
  2712. If Not _IsClassName ($h_listview, "SysListView32") Then Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  2713. If IsHWnd($h_listview) Then
  2714. Return _SendMessage($h_listview, $LVM_GETCALLBACKMASK)
  2715. Else
  2716. Return GUICtrlSendMsg($h_listview, $LVM_GETCALLBACKMASK, 0, 0)
  2717. EndIf
  2718. EndFunc
  2719. Func _GUICtrlListViewGetCheckedState($h_listview, $i_index)
  2720. If Not _IsClassName ($h_listview, "SysListView32") Then Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  2721. Local $isChecked = 0, $ret
  2722. If IsHWnd($h_listview) Then
  2723. $ret = _SendMessage($h_listview, $LVM_GETITEMSTATE, $i_index, $LVIS_STATEIMAGEMASK)
  2724. Else
  2725. $ret = GUICtrlSendMsg($h_listview, $LVM_GETITEMSTATE, $i_index, $LVIS_STATEIMAGEMASK)
  2726. EndIf
  2727. If (Not $ret) Then
  2728. $ret = _SendMessage($h_listview, $LVM_GETITEMSTATE, $i_index, $LVIS_STATEIMAGEMASK)
  2729. If ($ret == -1) Then
  2730. Return $LV_ERR
  2731. Else
  2732. If (BitAND($ret, 0x3000) == 0x3000) Then
  2733. $isChecked = 0
  2734. Else
  2735. $isChecked = 1
  2736. EndIf
  2737. EndIf
  2738. Else
  2739. If (BitAND($ret, 0x2000) == 0x2000) Then $isChecked = 1
  2740. EndIf
  2741. Return $isChecked
  2742. EndFunc
  2743. Func _GUICtrlListViewGetColumnOrder($h_listview)
  2744. If Not _IsClassName ($h_listview, "SysListView32") Then Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  2745. Local $i_cols = _GUICtrlListViewGetSubItemsCount($h_listview)
  2746. Local $i, $ret
  2747. Local $struct = ""
  2748. For $i = 1 To $i_cols
  2749. $struct &= "int;"
  2750. Next
  2751. $struct = StringTrimRight($struct, 1)
  2752. Local $column_struct = DllStructCreate($struct)
  2753. If @error Then Return $LV_ERR
  2754. If IsHWnd($h_listview) Then
  2755. Local $struct_MemMap, $sBuffer_pointer
  2756. $sBuffer_pointer = DllStructGetPtr($column_struct)
  2757. Local $i_Size = DllStructGetSize($column_struct)
  2758. Local $Memory_pointer = _MemInit ($h_listview, $i_Size, $struct_MemMap)
  2759. If @error Then
  2760. _MemFree ($struct_MemMap)
  2761. Return SetError($LV_ERR, $LV_ERR, 0)
  2762. EndIf
  2763. $ret = _SendMessage($h_listview, $LVM_GETCOLUMNORDERARRAY, $i_cols, $Memory_pointer)
  2764. If @error Then
  2765. _MemFree ($struct_MemMap)
  2766. Return SetError($LV_ERR, $LV_ERR, 0)
  2767. EndIf
  2768. _MemRead ($struct_MemMap, $Memory_pointer, $sBuffer_pointer, $i_Size)
  2769. If @error Then
  2770. _MemFree ($struct_MemMap)
  2771. Return SetError($LV_ERR, $LV_ERR, 0)
  2772. EndIf
  2773. _MemFree ($struct_MemMap)
  2774. If @error Then Return SetError($LV_ERR, $LV_ERR, 0)
  2775. Else
  2776. $ret = GUICtrlSendMsg($h_listview, $LVM_GETCOLUMNORDERARRAY, $i_cols, DllStructGetPtr($column_struct))
  2777. EndIf
  2778. If (Not $ret) Then Return $LV_ERR
  2779. Local $s_cols
  2780. For $i = 1 To $i_cols
  2781. $s_cols &= DllStructGetData($column_struct, $i) & "|"
  2782. Next
  2783. $s_cols = StringTrimRight($s_cols, 1)
  2784. Return $s_cols
  2785. EndFunc
  2786. Func _GUICtrlListViewGetColumnWidth($h_listview, $i_col)
  2787. If Not _IsClassName ($h_listview, "SysListView32") Then Return SetError($LV_ERR, $LV_ERR, 0)
  2788. If IsHWnd($h_listview) Then
  2789. Return _SendMessage($h_listview, $LVM_GETCOLUMNWIDTH, $i_col)
  2790. Else
  2791. Return GUICtrlSendMsg($h_listview, $LVM_GETCOLUMNWIDTH, $i_col, 0)
  2792. EndIf
  2793. EndFunc
  2794. Func _GUICtrlListViewGetCounterPage($h_listview)
  2795. If Not _IsClassName ($h_listview, "SysListView32") Then Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  2796. If IsHWnd($h_listview) Then
  2797. Return _SendMessage($h_listview, $LVM_GETCOUNTPERPAGE)
  2798. Else
  2799. Return GUICtrlSendMsg($h_listview, $LVM_GETCOUNTPERPAGE, 0, 0)
  2800. EndIf
  2801. EndFunc
  2802. Func _GUICtrlListViewGetCurSel($h_listview)
  2803. If Not _IsClassName ($h_listview, "SysListView32") Then Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  2804. If _GUICtrlListViewGetSelectedCount($h_listview) > 0 Then
  2805. Return Int(_GUICtrlListViewGetSelectedIndices($h_listview))
  2806. Else
  2807. Return $LV_ERR
  2808. EndIf
  2809. EndFunc
  2810. Func _GUICtrlListViewGetExtendedListViewStyle($h_listview)
  2811. If Not _IsClassName ($h_listview, "SysListView32") Then Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  2812. If IsHWnd($h_listview) Then
  2813. Return _SendMessage($h_listview, $LVM_GETEXTENDEDLISTVIEWSTYLE)
  2814. Else
  2815. Return GUICtrlSendMsg($h_listview, $LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0)
  2816. EndIf
  2817. EndFunc
  2818. Func _GUICtrlListViewGetHeader($h_listview)
  2819. If Not _IsClassName ($h_listview, "SysListView32") Then Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  2820. If IsHWnd($h_listview) Then
  2821. Return _SendMessage($h_listview, $LVM_GETHEADER)
  2822. Else
  2823. Return GUICtrlSendMsg($h_listview, $LVM_GETHEADER, 0, 0)
  2824. EndIf
  2825. EndFunc
  2826. Func _GUICtrlListViewGetHotCursor($h_listview)
  2827. If Not _IsClassName ($h_listview, "SysListView32") Then Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  2828. If IsHWnd($h_listview) Then
  2829. Return _SendMessage($h_listview, $LVM_GETHOTCURSOR)
  2830. Else
  2831. Return GUICtrlSendMsg($h_listview, $LVM_GETHOTCURSOR, 0, 0)
  2832. EndIf
  2833. EndFunc
  2834. Func _GUICtrlListViewGetHotItem($h_listview)
  2835. If Not _IsClassName ($h_listview, "SysListView32") Then Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  2836. If IsHWnd($h_listview) Then
  2837. Return _SendMessage($h_listview, $LVM_GETHOTITEM)
  2838. Else
  2839. Return GUICtrlSendMsg($h_listview, $LVM_GETHOTITEM, 0, 0)
  2840. EndIf
  2841. EndFunc
  2842. Func _GUICtrlListViewGetHoverTime($h_listview)
  2843. If Not _IsClassName ($h_listview, "SysListView32") Then Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  2844. If IsHWnd($h_listview) Then
  2845. Return _SendMessage($h_listview, $LVM_GETHOVERTIME)
  2846. Else
  2847. Return GUICtrlSendMsg($h_listview, $LVM_GETHOVERTIME, 0, 0)
  2848. EndIf
  2849. EndFunc
  2850. Func _GUICtrlListViewGetItemCount($h_listview)
  2851. If Not _IsClassName ($h_listview, "SysListView32") Then Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  2852. If IsHWnd($h_listview) Then
  2853. Return _SendMessage($h_listview, $LVM_GETITEMCOUNT)
  2854. Else
  2855. Return GUICtrlSendMsg($h_listview, $LVM_GETITEMCOUNT, 0, 0)
  2856. EndIf
  2857. EndFunc
  2858. Func _GUICtrlListViewGetItemText($h_listview, $i_Item = -1, $i_SubItem = -1)
  2859. If Not _IsClassName ($h_listview, "SysListView32") Then Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  2860. Local $sBuffer_pointer
  2861. Local $LVITEM_pointer
  2862. Local $Memory_pointer, $struct_MemMap
  2863. Local $i_Size, $string_Memory_pointer
  2864. Local $struct_LVITEM, $struct_String
  2865. $struct_LVITEM = DllStructCreate($LVITEM)
  2866. If @error Then Return SetError($LV_ERR, $LV_ERR, "")
  2867. $struct_String = DllStructCreate("char[4096]")
  2868. If @error Then Return SetError($LV_ERR, $LV_ERR, "")
  2869. If $i_Item = -1 Then $i_Item = Int(_GUICtrlListViewGetSelectedIndices($h_listview))
  2870. If $i_Item = -1 Then Return SetError($LV_ERR, $LV_ERR, "")
  2871. DllStructSetData($struct_LVITEM, $LVI_MASK, $LVIF_TEXT)
  2872. DllStructSetData($struct_LVITEM, $LVI_CCHTEXTMAX, 4096)
  2873. Local $x_indice, $count, $str = ""
  2874. $count = _GUICtrlListViewGetSubItemsCount($h_listview)
  2875. If Not $count Then $count = 1
  2876. DllStructSetData($struct_LVITEM, $LVI_IITEM, $i_Item)
  2877. If ($i_SubItem == -1) Then
  2878. For $x_indice = 0 To $count - 1 Step 1
  2879. If IsHWnd($h_listview) Then
  2880. $sBuffer_pointer = DllStructGetPtr($struct_String)
  2881. $LVITEM_pointer = DllStructGetPtr($struct_LVITEM)
  2882. $i_Size = DllStructGetSize($struct_LVITEM)
  2883. $Memory_pointer = _MemInit ($h_listview, $i_Size + 4096, $struct_MemMap)
  2884. If @error Then
  2885. _MemFree ($struct_MemMap)
  2886. Return SetError($LV_ERR, $LV_ERR, "")
  2887. EndIf
  2888. $string_Memory_pointer = $Memory_pointer + 4096
  2889. DllStructSetData($struct_LVITEM, $LVI_ISUBITEM, $x_indice)
  2890. DllStructSetData($struct_LVITEM, $LVI_PSZTEXT, $string_Memory_pointer)
  2891. _MemWrite ($struct_MemMap, $LVITEM_pointer)
  2892. If @error Then
  2893. _MemFree ($struct_MemMap)
  2894. Return SetError($LV_ERR, $LV_ERR, "")
  2895. EndIf
  2896. _SendMessage($h_listview, $LVM_GETITEMA, 0, $Memory_pointer)
  2897. If @error Then
  2898. _MemFree ($struct_MemMap)
  2899. Return SetError($LV_ERR, $LV_ERR, "")
  2900. EndIf
  2901. _MemRead ($struct_MemMap, $string_Memory_pointer, $sBuffer_pointer, 4096)
  2902. If @error Then
  2903. _MemFree ($struct_MemMap)
  2904. Return SetError($LV_ERR, $LV_ERR, "")
  2905. EndIf
  2906. _MemFree ($struct_MemMap)
  2907. If @error Then Return SetError($LV_ERR, $LV_ERR, "")
  2908. Else
  2909. DllStructSetData($struct_LVITEM, $LVI_PSZTEXT, DllStructGetPtr($struct_String))
  2910. DllStructSetData($struct_LVITEM, $LVI_ISUBITEM, $x_indice)
  2911. If Not GUICtrlSendMsg($h_listview, $LVM_GETITEMA, 0, DllStructGetPtr($struct_LVITEM)) Then
  2912. SetError($LV_ERR)
  2913. EndIf
  2914. EndIf
  2915. If Not @error Then
  2916. If $x_indice Then
  2917. $str = $str & "|" & DllStructGetData($struct_String, 1)
  2918. Else
  2919. $str = DllStructGetData($struct_String, 1)
  2920. EndIf
  2921. Else
  2922. If StringLen($str) Then
  2923. $str = $str & "|"
  2924. EndIf
  2925. EndIf
  2926. Next
  2927. Return $str
  2928. ElseIf ($i_SubItem < $count) Then
  2929. If IsHWnd($h_listview) Then
  2930. $sBuffer_pointer = DllStructGetPtr($struct_String)
  2931. $LVITEM_pointer = DllStructGetPtr($struct_LVITEM)
  2932. $i_Size = DllStructGetSize($struct_LVITEM)
  2933. $Memory_pointer = _MemInit ($h_listview, $i_Size + 4096, $struct_MemMap)
  2934. If @error Then
  2935. _MemFree ($struct_MemMap)
  2936. Return SetError($LV_ERR, $LV_ERR, "")
  2937. EndIf
  2938. $string_Memory_pointer = $Memory_pointer + 4096
  2939. DllStructSetData($struct_LVITEM, $LVI_ISUBITEM, $i_SubItem)
  2940. DllStructSetData($struct_LVITEM, $LVI_PSZTEXT, $string_Memory_pointer)
  2941. _MemWrite ($struct_MemMap, $LVITEM_pointer)
  2942. If @error Then
  2943. _MemFree ($struct_MemMap)
  2944. Return SetError($LV_ERR, $LV_ERR, "")
  2945. EndIf
  2946. _SendMessage($h_listview, $LVM_GETITEMA, 0, $Memory_pointer)
  2947. If @error Then
  2948. _MemFree ($struct_MemMap)
  2949. Return SetError($LV_ERR, $LV_ERR, "")
  2950. EndIf
  2951. _MemRead ($struct_MemMap, $string_Memory_pointer, $sBuffer_pointer, 4096)
  2952. If @error Then
  2953. _MemFree ($struct_MemMap)
  2954. Return SetError($LV_ERR, $LV_ERR, "")
  2955. EndIf
  2956. _MemFree ($struct_MemMap)
  2957. If @error Then Return SetError($LV_ERR, $LV_ERR, "")
  2958. Else
  2959. DllStructSetData($struct_LVITEM, $LVI_PSZTEXT, DllStructGetPtr($struct_String))
  2960. DllStructSetData($struct_LVITEM, $LVI_ISUBITEM, $i_SubItem)
  2961. If Not GUICtrlSendMsg($h_listview, $LVM_GETITEMA, 0, DllStructGetPtr($struct_LVITEM)) Then Return SetError($LV_ERR, $LV_ERR, "")
  2962. EndIf
  2963. Return DllStructGetData($struct_String, 1)
  2964. Else
  2965. Return SetError($LV_ERR, $LV_ERR, "")
  2966. EndIf
  2967. EndFunc
  2968. Func _GUICtrlListViewGetItemTextArray($h_listview, $i_Item = -1)
  2969. If Not _IsClassName ($h_listview, "SysListView32") Then Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  2970. Local $v_ret = _GUICtrlListViewGetItemText($h_listview, $i_Item)
  2971. If @error Or $v_ret = "" Then Return SetError($LV_ERR, $LV_ERR, "")
  2972. Return StringSplit($v_ret, "|")
  2973. EndFunc
  2974. Func _GUICtrlListViewGetNextItem($h_GUI, $h_listview, $i_index = -1, $i_direction = 0x0)
  2975. If Not _IsClassName ($h_listview, "SysListView32") Then Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  2976. Local $h_lv
  2977. If IsHWnd($h_listview) Then
  2978. $h_lv = $h_listview
  2979. Else
  2980. $h_lv = ControlGetHandle($h_GUI, "", $h_listview)
  2981. EndIf
  2982. If ($i_direction == $LVNI_ALL Or $i_direction == $LVNI_ABOVE Or _
  2983. $i_direction == $LVNI_BELOW Or $i_direction == $LVNI_TOLEFT Or _
  2984. $i_direction == $LVNI_TORIGHT) Then
  2985. Return _SendMessage($h_lv, $LVM_GETNEXTITEM, $i_index, $i_direction)
  2986. Else
  2987. Return $LV_ERR
  2988. EndIf
  2989. EndFunc
  2990. Func _GUICtrlListViewGetSelectedCount($h_listview)
  2991. If Not _IsClassName ($h_listview, "SysListView32") Then Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  2992. If IsHWnd($h_listview) Then
  2993. Return _SendMessage($h_listview, $LVM_GETSELECTEDCOUNT)
  2994. Else
  2995. Return GUICtrlSendMsg($h_listview, $LVM_GETSELECTEDCOUNT, 0, 0)
  2996. EndIf
  2997. EndFunc
  2998. Func _GUICtrlListViewGetSelectedIndices($h_listview, $i_ReturnType = 0)
  2999. If Not _IsClassName ($h_listview, "SysListView32") Then Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3000. Local $v_indices
  3001. Local $x_indice, $v_ret
  3002. For $x_indice = 0 To _GUICtrlListViewGetItemCount($h_listview)
  3003. If IsHWnd($h_listview) Then
  3004. $v_ret = _SendMessage($h_listview, $LVM_GETITEMSTATE, $x_indice, $LVIS_SELECTED)
  3005. If $v_ret Then
  3006. If (Not $i_ReturnType) Then
  3007. If StringLen($v_indices) Then
  3008. $v_indices = $v_indices & "|" & $x_indice
  3009. Else
  3010. $v_indices = $x_indice
  3011. EndIf
  3012. Else
  3013. If Not IsArray($v_indices) Then
  3014. Dim $v_indices[2]
  3015. Else
  3016. ReDim $v_indices[UBound($v_indices) + 1]
  3017. EndIf
  3018. $v_indices[0] = UBound($v_indices) - 1
  3019. $v_indices[UBound($v_indices) - 1] = $x_indice
  3020. EndIf
  3021. EndIf
  3022. Else
  3023. $v_ret = GUICtrlSendMsg($h_listview, $LVM_GETITEMSTATE, $x_indice, $LVIS_SELECTED)
  3024. If $v_ret Then
  3025. If (Not $i_ReturnType) Then
  3026. If StringLen($v_indices) Then
  3027. $v_indices = $v_indices & "|" & $x_indice
  3028. Else
  3029. $v_indices = $x_indice
  3030. EndIf
  3031. Else
  3032. If Not IsArray($v_indices) Then
  3033. Dim $v_indices[2]
  3034. Else
  3035. ReDim $v_indices[UBound($v_indices) + 1]
  3036. EndIf
  3037. $v_indices[0] = UBound($v_indices) - 1
  3038. $v_indices[UBound($v_indices) - 1] = $x_indice
  3039. EndIf
  3040. EndIf
  3041. EndIf
  3042. Next
  3043. If (StringLen($v_indices) > 0 Or IsArray($v_indices)) Then
  3044. Return $v_indices
  3045. Else
  3046. Return $LV_ERR
  3047. EndIf
  3048. EndFunc
  3049. Func _GUICtrlListViewGetSubItemsCount($h_listview)
  3050. If Not _IsClassName ($h_listview, "SysListView32") Then Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3051. Return _SendMessage(_GUICtrlListViewGetHeader($h_listview), 0x1200, 0, 0)
  3052. EndFunc
  3053. Func _GUICtrlListViewGetTopIndex($h_listview)
  3054. If Not _IsClassName ($h_listview, "SysListView32") Then Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3055. If IsHWnd($h_listview) Then
  3056. Return _SendMessage($h_listview, $LVM_GETTOPINDEX)
  3057. Else
  3058. Return GUICtrlSendMsg($h_listview, $LVM_GETTOPINDEX, 0, 0)
  3059. EndIf
  3060. EndFunc
  3061. Func _GUICtrlListViewGetUnicodeFormat($h_listview)
  3062. If Not _IsClassName ($h_listview, "SysListView32") Then Return SetError($LV_ERR, $LV_ERR, 0)
  3063. If IsHWnd($h_listview) Then
  3064. Return _SendMessage($h_listview, $LVM_GETUNICODEFORMAT)
  3065. Else
  3066. Return GUICtrlSendMsg($h_listview, $LVM_GETUNICODEFORMAT, 0, 0)
  3067. EndIf
  3068. EndFunc
  3069. Func _GUICtrlListViewGetView($h_listview)
  3070. If Not _IsClassName ($h_listview, "SysListView32") Then Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3071. If IsHWnd($h_listview) Then
  3072. Return _SendMessage($h_listview, $LVM_GETVIEW)
  3073. Else
  3074. Return GUICtrlSendMsg($h_listview, $LVM_GETVIEW, 0, 0)
  3075. EndIf
  3076. EndFunc
  3077. Func _GUICtrlListViewHideColumn($h_listview, $i_col)
  3078. If Not _IsClassName ($h_listview, "SysListView32") Then Return SetError($LV_ERR, $LV_ERR, False)
  3079. If IsHWnd($h_listview) Then
  3080. Return _SendMessage($h_listview, $LVM_SETCOLUMNWIDTH, $i_col)
  3081. Else
  3082. Return GUICtrlSendMsg($h_listview, $LVM_SETCOLUMNWIDTH, $i_col, 0)
  3083. EndIf
  3084. EndFunc
  3085. Func _GUICtrlListViewInsertColumn($h_listview, $i_col, $s_text, $i_justification = 0, $i_width = 25)
  3086. If Not _IsClassName ($h_listview, "SysListView32") Then Return SetError($LV_ERR, $LV_ERR, False)
  3087. Local $struct_LVCOLUMN, $struct_String, $ret
  3088. $struct_LVCOLUMN = DllStructCreate($LVCOLUMN)
  3089. If @error Then Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3090. $struct_String = DllStructCreate("char[" & StringLen($s_text) + 1 & "]")
  3091. If @error Then Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3092. DllStructSetData($struct_String, 1, $s_text)
  3093. DllStructSetData($struct_LVCOLUMN, $LVC_MASK, BitOR($LVCF_WIDTH, $LVCF_FMT, $LVCF_TEXT))
  3094. If ($i_justification == 1) Then
  3095. DllStructSetData($struct_LVCOLUMN, $LVC_FMT, $LVCFMT_RIGHT)
  3096. ElseIf ($i_justification == 2) Then
  3097. DllStructSetData($struct_LVCOLUMN, $LVC_FMT, $LVCFMT_CENTER)
  3098. Else
  3099. DllStructSetData($struct_LVCOLUMN, $LVC_FMT, $LVCFMT_LEFT)
  3100. EndIf
  3101. DllStructSetData($struct_LVCOLUMN, $LVC_CX, $i_width)
  3102. If IsHWnd($h_listview) Then
  3103. Local $sBuffer_pointer = DllStructGetPtr($struct_String)
  3104. Local $column_struct_pointer = DllStructGetPtr($struct_LVCOLUMN)
  3105. Local $i_Size = DllStructGetSize($struct_LVCOLUMN)
  3106. Local $struct_MemMap
  3107. Local $Memory_pointer = _MemInit ($h_listview, $i_Size + StringLen($s_text) + 1, $struct_MemMap)
  3108. If @error Then
  3109. _MemFree ($struct_MemMap)
  3110. Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3111. EndIf
  3112. Local $string_Memory_pointer = $Memory_pointer + $i_Size
  3113. DllStructSetData($struct_LVCOLUMN, $LVC_PSZTEXT, $string_Memory_pointer)
  3114. _MemWrite ($struct_MemMap, $column_struct_pointer)
  3115. If @error Then
  3116. _MemFree ($struct_MemMap)
  3117. Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3118. EndIf
  3119. _MemWrite ($struct_MemMap, $sBuffer_pointer, $string_Memory_pointer, StringLen($s_text) + 1)
  3120. If @error Then
  3121. _MemFree ($struct_MemMap)
  3122. Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3123. EndIf
  3124. $ret = _SendMessage($h_listview, $LVM_INSERTCOLUMNA, $i_col, $Memory_pointer)
  3125. If @error Then
  3126. _MemFree ($struct_MemMap)
  3127. Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3128. EndIf
  3129. _MemFree ($struct_MemMap)
  3130. If @error Then Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3131. Return $ret
  3132. Else
  3133. DllStructSetData($struct_LVCOLUMN, $LVC_PSZTEXT, DllStructGetPtr($struct_String))
  3134. $ret = GUICtrlSendMsg($h_listview, $LVM_INSERTCOLUMNA, $i_col, DllStructGetPtr($struct_LVCOLUMN))
  3135. EndIf
  3136. Return $ret
  3137. EndFunc
  3138. Func _GUICtrlListViewInsertItem($h_listview, $i_index, $s_text)
  3139. If Not _IsClassName ($h_listview, "SysListView32") Then Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3140. Local $struct_LVITEM, $struct_String, $ret, $a_text
  3141. $struct_LVITEM = DllStructCreate($LVITEM)
  3142. If @error Then Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3143. $struct_String = DllStructCreate("char[" & StringLen($s_text) + 1 & "]")
  3144. If @error Then Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3145. $a_text = StringSplit($s_text, "|")
  3146. DllStructSetData($struct_String, 1, $a_text[1])
  3147. If $i_index = -1 Then $i_index = _GUICtrlListViewGetItemCount($h_listview)
  3148. DllStructSetData($struct_LVITEM, $LVI_MASK, $LVIF_TEXT)
  3149. DllStructSetData($struct_LVITEM, $LVI_IITEM, $i_index)
  3150. DllStructSetData($struct_LVITEM, $LVI_CCHTEXTMAX, StringLen($s_text) + 1)
  3151. If IsHWnd($h_listview) Then
  3152. Local $sBuffer_pointer = DllStructGetPtr($struct_String)
  3153. Local $LVITEM_pointer = DllStructGetPtr($struct_LVITEM)
  3154. Local $i_Size = DllStructGetSize($struct_LVITEM)
  3155. Local $struct_MemMap
  3156. Local $Memory_pointer = _MemInit ($h_listview, $i_Size + StringLen($s_text) + 1, $struct_MemMap)
  3157. If @error Then
  3158. _MemFree ($struct_MemMap)
  3159. Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3160. EndIf
  3161. Local $string_Memory_pointer = $Memory_pointer + $i_Size
  3162. DllStructSetData($struct_LVITEM, $LVI_PSZTEXT, $string_Memory_pointer)
  3163. _MemWrite ($struct_MemMap, $LVITEM_pointer)
  3164. If @error Then
  3165. _MemFree ($struct_MemMap)
  3166. Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3167. EndIf
  3168. _MemWrite ($struct_MemMap, $sBuffer_pointer, $string_Memory_pointer, StringLen($s_text) + 1)
  3169. If @error Then
  3170. _MemFree ($struct_MemMap)
  3171. Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3172. EndIf
  3173. $ret = _SendMessage($h_listview, $LVM_INSERTITEMA, 0, $Memory_pointer)
  3174. If @error Then
  3175. _MemFree ($struct_MemMap)
  3176. Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3177. EndIf
  3178. _MemFree ($struct_MemMap)
  3179. If @error Then Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3180. Else
  3181. DllStructSetData($struct_LVITEM, $LVI_PSZTEXT, DllStructGetPtr($struct_String))
  3182. $ret = GUICtrlSendMsg($h_listview, $LVM_INSERTITEMA, 0, DllStructGetPtr($struct_LVITEM))
  3183. EndIf
  3184. Local $i
  3185. For $i = 2 To $a_text[0]
  3186. _GUICtrlListViewSetItemText($h_listview, $i_index, $i - 1, $a_text[$i])
  3187. Next
  3188. Return $ret
  3189. EndFunc
  3190. Func _GUICtrlListViewJustifyColumn($h_listview, $i_col, $i_justification = 0)
  3191. If Not _IsClassName ($h_listview, "SysListView32") Then Return SetError($LV_ERR, $LV_ERR, False)
  3192. Local $struct_LVCOLUMN, $ret
  3193. $struct_LVCOLUMN = DllStructCreate($LVCOLUMN)
  3194. If @error Then Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3195. DllStructSetData($struct_LVCOLUMN, $LVC_MASK, $LVCF_FMT)
  3196. If ($i_justification == 1) Then
  3197. DllStructSetData($struct_LVCOLUMN, $LVC_FMT, $LVCFMT_RIGHT)
  3198. ElseIf ($i_justification == 2) Then
  3199. DllStructSetData($struct_LVCOLUMN, $LVC_FMT, $LVCFMT_CENTER)
  3200. Else
  3201. DllStructSetData($struct_LVCOLUMN, $LVC_FMT, $LVCFMT_LEFT)
  3202. EndIf
  3203. If IsHWnd($h_listview) Then
  3204. Local $column_struct_pointer = DllStructGetPtr($struct_LVCOLUMN)
  3205. Local $i_Size = DllStructGetSize($struct_LVCOLUMN)
  3206. Local $struct_MemMap
  3207. Local $Memory_pointer = _MemInit ($h_listview, $i_Size, $struct_MemMap)
  3208. If @error Then
  3209. _MemFree ($struct_MemMap)
  3210. Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3211. EndIf
  3212. _MemWrite ($struct_MemMap, $column_struct_pointer)
  3213. If @error Then
  3214. _MemFree ($struct_MemMap)
  3215. Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3216. EndIf
  3217. $ret = _SendMessage($h_listview, $LVM_SETCOLUMNA, $i_col, $Memory_pointer)
  3218. If @error Then
  3219. _MemFree ($struct_MemMap)
  3220. Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3221. EndIf
  3222. _MemFree ($struct_MemMap)
  3223. If @error Then Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3224. Else
  3225. $ret = GUICtrlSendMsg($h_listview, $LVM_SETCOLUMNA, $i_col, DllStructGetPtr($struct_LVCOLUMN))
  3226. EndIf
  3227. Return $ret
  3228. EndFunc
  3229. Func _GUICtrlListViewScroll($h_listview, $i_dx, $i_dy)
  3230. If Not _IsClassName ($h_listview, "SysListView32") Then Return SetError($LV_ERR, $LV_ERR, False)
  3231. If IsHWnd($h_listview) Then
  3232. Return _SendMessage($h_listview, $LVM_SCROLL, $i_dx, $i_dy)
  3233. Else
  3234. Return GUICtrlSendMsg($h_listview, $LVM_SCROLL, $i_dx, $i_dy)
  3235. EndIf
  3236. EndFunc
  3237. Func _GUICtrlListViewSetCheckState($h_listview, $i_index, $i_check = 1)
  3238. If Not _IsClassName ($h_listview, "SysListView32") Then Return SetError($LV_ERR, $LV_ERR, False)
  3239. Local $ret
  3240. Local $struct_LVITEM = DllStructCreate($LVITEM)
  3241. If @error Then Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3242. DllStructSetData($struct_LVITEM, $LVI_MASK, $LVIF_STATE)
  3243. DllStructSetData($struct_LVITEM, $LVI_IITEM, $i_index)
  3244. If ($i_check) Then
  3245. DllStructSetData($struct_LVITEM, $LVI_STATE, 0x2000)
  3246. Else
  3247. DllStructSetData($struct_LVITEM, $LVI_STATE, 0x1000)
  3248. EndIf
  3249. DllStructSetData($struct_LVITEM, $LVI_STATEMASK, $LVIS_STATEIMAGEMASK)
  3250. If IsHWnd($h_listview) Then
  3251. Local $LVITEM_pointer = DllStructGetPtr($struct_LVITEM)
  3252. Local $i_Size = DllStructGetSize($struct_LVITEM)
  3253. Local $struct_MemMap
  3254. Local $Memory_pointer = _MemInit ($h_listview, $i_Size + 4096, $struct_MemMap)
  3255. If @error Then
  3256. _MemFree ($struct_MemMap)
  3257. Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3258. EndIf
  3259. _MemWrite ($struct_MemMap, $LVITEM_pointer)
  3260. If @error Then
  3261. _MemFree ($struct_MemMap)
  3262. Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3263. EndIf
  3264. $ret = _SendMessage($h_listview, $LVM_SETITEMSTATE, $i_index, $Memory_pointer)
  3265. If @error Then
  3266. _MemFree ($struct_MemMap)
  3267. Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3268. EndIf
  3269. _MemFree ($struct_MemMap)
  3270. If @error Then Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3271. Else
  3272. $ret = GUICtrlSendMsg($h_listview, $LVM_SETITEMSTATE, $i_index, DllStructGetPtr($struct_LVITEM))
  3273. EndIf
  3274. Return $ret
  3275. EndFunc
  3276. Func _GUICtrlListViewSetColumnHeaderText($h_listview, $i_col, $s_text)
  3277. If Not _IsClassName ($h_listview, "SysListView32") Then Return SetError($LV_ERR, $LV_ERR, False)
  3278. Local $struct_LVCOLUMN, $ret, $struct_String
  3279. $struct_String = DllStructCreate("char[" & StringLen($s_text) + 1 & "]")
  3280. If @error Then Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3281. DllStructSetData($struct_String, 1, $s_text)
  3282. $struct_LVCOLUMN = DllStructCreate($LVCOLUMN)
  3283. If @error Then Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3284. DllStructSetData($struct_LVCOLUMN, $LVC_MASK, $LVCF_TEXT)
  3285. If IsHWnd($h_listview) Then
  3286. Local $sBuffer_pointer = DllStructGetPtr($struct_String)
  3287. Local $column_struct_pointer = DllStructGetPtr($struct_LVCOLUMN)
  3288. Local $i_Size = DllStructGetSize($struct_LVCOLUMN)
  3289. Local $struct_MemMap
  3290. Local $Memory_pointer = _MemInit ($h_listview, $i_Size + StringLen($s_text) + 1, $struct_MemMap)
  3291. If @error Then
  3292. _MemFree ($struct_MemMap)
  3293. Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3294. EndIf
  3295. Local $string_Memory_pointer = $Memory_pointer + $i_Size
  3296. DllStructSetData($struct_LVCOLUMN, $LVC_PSZTEXT, $string_Memory_pointer)
  3297. _MemWrite ($struct_MemMap, $column_struct_pointer)
  3298. If @error Then
  3299. _MemFree ($struct_MemMap)
  3300. Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3301. EndIf
  3302. _MemWrite ($struct_MemMap, $sBuffer_pointer, $string_Memory_pointer, StringLen($s_text) + 1)
  3303. If @error Then
  3304. _MemFree ($struct_MemMap)
  3305. Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3306. EndIf
  3307. $ret = _SendMessage($h_listview, $LVM_SETCOLUMNA, $i_col, $Memory_pointer)
  3308. If @error Then
  3309. _MemFree ($struct_MemMap)
  3310. Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3311. EndIf
  3312. _MemFree ($struct_MemMap)
  3313. If @error Then Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3314. Else
  3315. DllStructSetData($struct_LVCOLUMN, $LVC_PSZTEXT, DllStructGetPtr($struct_String))
  3316. $ret = GUICtrlSendMsg($h_listview, $LVM_SETCOLUMNA, $i_col, DllStructGetPtr($struct_LVCOLUMN))
  3317. EndIf
  3318. Return $ret
  3319. EndFunc
  3320. Func _GUICtrlListViewSetColumnOrder($h_listview, $s_order)
  3321. If Not _IsClassName ($h_listview, "SysListView32") Then Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3322. Local $i, $ret
  3323. Local $struct = ""
  3324. Local $a_order = StringSplit($s_order, "|")
  3325. If @error Then Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3326. For $i = 1 To $a_order[0]
  3327. $struct &= "int;"
  3328. Next
  3329. $struct = StringTrimRight($struct, 1)
  3330. Local $struct_LVCOLUMN = DllStructCreate($struct)
  3331. For $i = 1 To $a_order[0]
  3332. DllStructSetData($struct_LVCOLUMN, $i, $a_order[$i])
  3333. Next
  3334. If IsHWnd($h_listview) Then
  3335. Local $sBuffer_pointer = DllStructGetPtr($struct_LVCOLUMN)
  3336. Local $i_Size = DllStructGetSize($struct_LVCOLUMN)
  3337. Local $struct_MemMap
  3338. Local $Memory_pointer = _MemInit ($h_listview, $i_Size, $struct_MemMap)
  3339. If @error Then
  3340. _MemFree ($struct_MemMap)
  3341. Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3342. EndIf
  3343. _MemWrite ($struct_MemMap, $sBuffer_pointer)
  3344. If @error Then
  3345. _MemFree ($struct_MemMap)
  3346. Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3347. EndIf
  3348. $ret = _SendMessage($h_listview, $LVM_SETCOLUMNORDERARRAY, $a_order[0], $Memory_pointer)
  3349. If @error Then
  3350. _MemFree ($struct_MemMap)
  3351. Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3352. EndIf
  3353. _MemFree ($struct_MemMap)
  3354. If @error Then Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3355. Else
  3356. $ret = GUICtrlSendMsg($h_listview, $LVM_SETCOLUMNORDERARRAY, $a_order[0], DllStructGetPtr($struct_LVCOLUMN))
  3357. EndIf
  3358. If (Not $ret) Then Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3359. Return $ret
  3360. EndFunc
  3361. Func _GUICtrlListViewSetColumnWidth($h_listview, $i_col, $i_width)
  3362. If Not _IsClassName ($h_listview, "SysListView32") Then Return SetError($LV_ERR, $LV_ERR, False)
  3363. If IsHWnd($h_listview) Then
  3364. Return _SendMessage($h_listview, $LVM_SETCOLUMNWIDTH, $i_col, $i_width)
  3365. Else
  3366. Return GUICtrlSendMsg($h_listview, $LVM_SETCOLUMNWIDTH, $i_col, $i_width)
  3367. EndIf
  3368. EndFunc
  3369. Func _GUICtrlListViewSetHotItem($h_listview, $i_index)
  3370. If Not _IsClassName ($h_listview, "SysListView32") Then Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3371. If IsHWnd($h_listview) Then
  3372. Return _SendMessage($h_listview, $LVM_SETHOTITEM, $i_index)
  3373. Else
  3374. Return GUICtrlSendMsg($h_listview, $LVM_SETHOTITEM, $i_index, 0)
  3375. EndIf
  3376. EndFunc
  3377. Func _GUICtrlListViewSetHoverTime($h_listview, $i_time)
  3378. If Not _IsClassName ($h_listview, "SysListView32") Then Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3379. If IsHWnd($h_listview) Then
  3380. Return _SendMessage($h_listview, $LVM_SETHOVERTIME, 0, $i_time)
  3381. Else
  3382. Return GUICtrlSendMsg($h_listview, $LVM_SETHOVERTIME, 0, $i_time)
  3383. EndIf
  3384. EndFunc
  3385. Func _GUICtrlListViewSetItemCount($h_listview, $i_items)
  3386. If Not _IsClassName ($h_listview, "SysListView32") Then Return SetError($LV_ERR, $LV_ERR, 0)
  3387. If IsHWnd($h_listview) Then
  3388. Return _SendMessage($h_listview, $LVM_SETITEMCOUNT, $i_items, BitOR($LVSICF_NOINVALIDATEALL, $LVSICF_NOSCROLL))
  3389. Else
  3390. Return GUICtrlSendMsg($h_listview, $LVM_SETITEMCOUNT, $i_items, BitOR($LVSICF_NOINVALIDATEALL, $LVSICF_NOSCROLL))
  3391. EndIf
  3392. EndFunc
  3393. Func _GUICtrlListViewSetItemSelState($h_listview, $i_index, $i_selected = 1, $i_focused = 0)
  3394. If Not _IsClassName ($h_listview, "SysListView32") Then Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3395. Local $ret
  3396. Local $struct_LVITEM = DllStructCreate($LVITEM)
  3397. If @error Then Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3398. If ($i_selected == 1) Then
  3399. $i_selected = $LVNI_SELECTED
  3400. Else
  3401. $i_selected = 0
  3402. EndIf
  3403. If ($i_focused == 1) Then
  3404. $i_focused = $LVNI_FOCUSED
  3405. Else
  3406. $i_focused = 0
  3407. EndIf
  3408. DllStructSetData($struct_LVITEM, $LVI_MASK, $LVIF_STATE)
  3409. DllStructSetData($struct_LVITEM, $LVI_IITEM, $i_index)
  3410. DllStructSetData($struct_LVITEM, $LVI_STATE, BitOR($i_selected, $i_focused))
  3411. DllStructSetData($struct_LVITEM, $LVI_STATEMASK, BitOR($LVIS_SELECTED, $i_focused))
  3412. If IsHWnd($h_listview) Then
  3413. Local $sBuffer_pointer = DllStructGetPtr($struct_LVITEM)
  3414. Local $i_Size = DllStructGetSize($struct_LVITEM)
  3415. Local $struct_MemMap
  3416. Local $Memory_pointer = _MemInit ($h_listview, $i_Size, $struct_MemMap)
  3417. If @error Then
  3418. _MemFree ($struct_MemMap)
  3419. Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3420. EndIf
  3421. _MemWrite ($struct_MemMap, $sBuffer_pointer)
  3422. If @error Then
  3423. _MemFree ($struct_MemMap)
  3424. Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3425. EndIf
  3426. $ret = _SendMessage($h_listview, $LVM_SETITEMSTATE, $i_index, $Memory_pointer)
  3427. If @error Then
  3428. _MemFree ($struct_MemMap)
  3429. Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3430. EndIf
  3431. _MemFree ($struct_MemMap)
  3432. If @error Then Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3433. Else
  3434. $ret = GUICtrlSendMsg($h_listview, $LVM_SETITEMSTATE, $i_index, DllStructGetPtr($struct_LVITEM))
  3435. EndIf
  3436. Return $ret
  3437. EndFunc
  3438. Func _GUICtrlListViewSetItemText($h_listview, $i_index, $i_SubItem, $s_text)
  3439. If Not _IsClassName ($h_listview, "SysListView32") Then Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3440. Local $ret
  3441. Local $struct_LVITEM = DllStructCreate($LVITEM)
  3442. If @error Then Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3443. Local $struct_String = DllStructCreate("char[" & StringLen($s_text) + 1 & "]")
  3444. If @error Then Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3445. DllStructSetData($struct_String, 1, $s_text)
  3446. DllStructSetData($struct_LVITEM, $LVI_MASK, $LVIF_TEXT)
  3447. DllStructSetData($struct_LVITEM, $LVI_IITEM, $i_index)
  3448. DllStructSetData($struct_LVITEM, $LVI_ISUBITEM, $i_SubItem)
  3449. If IsHWnd($h_listview) Then
  3450. Local $sBuffer_pointer = DllStructGetPtr($struct_String)
  3451. Local $LVITEM_pointer = DllStructGetPtr($struct_LVITEM)
  3452. Local $i_Size = DllStructGetSize($struct_LVITEM)
  3453. Local $struct_MemMap
  3454. Local $Memory_pointer = _MemInit ($h_listview, $i_Size + StringLen($s_text) + 1, $struct_MemMap)
  3455. If @error Then
  3456. _MemFree ($struct_MemMap)
  3457. Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3458. EndIf
  3459. Local $string_Memory_pointer = $Memory_pointer + $i_Size
  3460. DllStructSetData($struct_LVITEM, $LVI_PSZTEXT, $string_Memory_pointer)
  3461. If @error Then
  3462. _MemFree ($struct_MemMap)
  3463. Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3464. EndIf
  3465. _MemWrite ($struct_MemMap, $LVITEM_pointer)
  3466. If @error Then
  3467. _MemFree ($struct_MemMap)
  3468. Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3469. EndIf
  3470. _MemWrite ($struct_MemMap, $sBuffer_pointer, $string_Memory_pointer, StringLen($s_text) + 1)
  3471. If @error Then
  3472. _MemFree ($struct_MemMap)
  3473. Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3474. EndIf
  3475. $ret = _SendMessage($h_listview, $LVM_SETITEMTEXTA, 0, $Memory_pointer)
  3476. If @error Then
  3477. _MemFree ($struct_MemMap)
  3478. Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3479. EndIf
  3480. _MemFree ($struct_MemMap)
  3481. If @error Then Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3482. Else
  3483. DllStructSetData($struct_LVITEM, $LVI_PSZTEXT, DllStructGetPtr($struct_String))
  3484. $ret = GUICtrlSendMsg($h_listview, $LVM_SETITEMTEXTA, $i_index, DllStructGetPtr($struct_LVITEM))
  3485. EndIf
  3486. Return $ret
  3487. EndFunc
  3488. Func _GUICtrlListViewSetSelectedColumn($h_listview, $i_col)
  3489. If Not _IsClassName ($h_listview, "SysListView32") Then Return SetError($LV_ERR, $LV_ERR, False)
  3490. If IsHWnd($h_listview) Then
  3491. Return _SendMessage($h_listview, $LVM_SETSELECTEDCOLUMN, $i_col)
  3492. Else
  3493. Return GUICtrlSendMsg($h_listview, $LVM_SETSELECTEDCOLUMN, $i_col, 0)
  3494. EndIf
  3495. EndFunc
  3496. Func _GUICtrlListViewSort($h_listview, ByRef $v_descending, $i_sortcol)
  3497. If Not _IsClassName ($h_listview, "SysListView32") Then Return SetError($LV_ERR, $LV_ERR, 0)
  3498. Local $X, $Y, $Z, $b_desc, $columns, $items, $v_item, $temp_item
  3499. If _GUICtrlListViewGetItemCount($h_listview) Then
  3500. If (IsArray($v_descending)) Then
  3501. $b_desc = $v_descending[$i_sortcol]
  3502. Else
  3503. $b_desc = $v_descending
  3504. EndIf
  3505. $columns = _GUICtrlListViewGetSubItemsCount($h_listview)
  3506. $items = _GUICtrlListViewGetItemCount($h_listview)
  3507. For $X = 1 To $columns
  3508. $temp_item = $temp_item & " |"
  3509. Next
  3510. $temp_item = StringTrimRight($temp_item, 1)
  3511. Local $a_lv[$items][$columns + 1], $i_selected
  3512. $i_selected = StringSplit(_GUICtrlListViewGetSelectedIndices($h_listview), "|")
  3513. For $X = 0 To UBound($a_lv) - 1 Step 1
  3514. For $Y = 0 To UBound($a_lv, 2) - 2 Step 1
  3515. $v_item = StringStripWS(_GUICtrlListViewGetItemText($h_listview, $X, $Y), 2)
  3516. If (StringIsFloat($v_item) Or StringIsInt($v_item)) Then
  3517. $a_lv[$X][$Y] = Number($v_item)
  3518. Else
  3519. $a_lv[$X][$Y] = $v_item
  3520. EndIf
  3521. Next
  3522. $a_lv[$X][$Y] = $X
  3523. Next
  3524. _ArraySort($a_lv, $b_desc, 0, 0, $columns + 1, $i_sortcol)
  3525. _GUICtrlListViewSetItemSelState($h_listview, -1, 0)
  3526. For $X = 0 To UBound($a_lv) - 1 Step 1
  3527. For $Y = 0 To UBound($a_lv, 2) - 2 Step 1
  3528. _GUICtrlListViewSetItemText($h_listview, $X, $Y, $a_lv[$X][$Y])
  3529. Next
  3530. For $Z = 1 To $i_selected[0]
  3531. If $a_lv[$X][UBound($a_lv, 2) - 1] = $i_selected[$Z]Then
  3532. _GUICtrlListViewSetItemSelState($h_listview, $X, 1, 1)
  3533. ExitLoop
  3534. EndIf
  3535. Next
  3536. Next
  3537. If (IsArray($v_descending)) Then
  3538. $v_descending[$i_sortcol] = Not $b_desc
  3539. Else
  3540. $v_descending = Not $b_desc
  3541. EndIf
  3542. EndIf
  3543. EndFunc
  3544. Func _ReverseColorOrder($v_color)
  3545. Local $tc = Hex(String($v_color), 6)
  3546. Return '0x' & StringMid($tc, 5, 2) & StringMid($tc, 3, 2) & StringMid($tc, 1, 2)
  3547. EndFunc
  3548. Func _GUICtrlListViewArrange($h_listview, $i_arrange)
  3549. If Not _IsClassName ($h_listview, "SysListView32") Then Return SetError($LV_ERR, $LV_ERR, False)
  3550. If $i_arrange <> $LVA_ALIGNLEFT And $i_arrange <> $LVA_ALIGNTOP And _
  3551. $i_arrange <> $LVA_DEFAULT And $i_arrange <> $LVA_SNAPTOGRID Then Return SetError(-1, -1, 0)
  3552. If IsHWnd($h_listview) Then
  3553. Return _SendMessage($h_listview, $LVM_ARRANGE, $i_arrange)
  3554. Else
  3555. Return GUICtrlSendMsg($h_listview, $LVM_ARRANGE, $i_arrange, 0)
  3556. EndIf
  3557. EndFunc
  3558. Func _GUICtrlListViewSetIconSpacing($h_listview, $i_cx, $i_cy)
  3559. If Not _IsClassName ($h_listview, "SysListView32") Then Return SetError($LV_ERR, $LV_ERR, $LV_ERR)
  3560. If IsHWnd($h_listview) Then
  3561. Return _SendMessage($h_listview, $LVM_SETICONSPACING, 0, BitOR(BitShift($i_cy, -16), BitAND($i_cx, 0xFFFF)))
  3562. Else
  3563. Return GUICtrlSendMsg($h_listview, $LVM_SETICONSPACING, 0, BitOR(BitShift($i_cy, -16), BitAND($i_cx, 0xFFFF)))
  3564. EndIf
  3565. EndFunc
  3566. Func _GUICtrlListViewSetItemPosition($h_listview, $i_index, $i_x, $i_y)
  3567. If Not _IsClassName ($h_listview, "SysListView32") Then Return SetError($LV_ERR, $LV_ERR, False)
  3568. If IsHWnd($h_listview) Then
  3569. Return _SendMessage($h_listview, $LVM_SETITEMPOSITION, $i_index, BitOR(BitShift($i_y, -16), BitAND($i_x, 0xFFFF)))
  3570. Else
  3571. Return GUICtrlSendMsg($h_listview, $LVM_SETITEMPOSITION, $i_index, BitOR(BitShift($i_y, -16), BitAND($i_x, 0xFFFF)))
  3572. EndIf
  3573. EndFunc
  3574. Func _GUICtrlListViewSetView($h_listview, $i_View)
  3575. If Not _IsClassName ($h_listview, "SysListView32") Then Return SetError($LV_ERR, $LV_ERR, 0)
  3576. If $i_View <> $LV_VIEW_DETAILS And $i_View <> $LV_VIEW_ICON And $i_View <> $LV_VIEW_LIST And _
  3577. $i_View <> $LV_VIEW_SMALLICON And $i_View <> $LV_VIEW_TILE Then Return SetError($LV_ERR, $LV_ERR, 0)
  3578. If IsHWnd($h_listview) Then
  3579. Return _SendMessage($h_listview, $LVM_SETVIEW, $i_View)
  3580. Else
  3581. Return GUICtrlSendMsg($h_listview, $LVM_SETVIEW, $i_View, 0)
  3582. EndIf
  3583. EndFunc
  3584. ; ----------------------------------------------------------------------------
  3585. ; <AUT2EXE INCLUDE-END: C:\Program Files\AutoIt3\Include\GuiListView.au3>
  3586. ; ----------------------------------------------------------------------------
  3587. Func _ArrayAdd(ByRef $avArray, $sValue)
  3588. If IsArray($avArray) Then
  3589. ReDim $avArray[UBound($avArray) + 1]
  3590. $avArray[UBound($avArray) - 1] = $sValue
  3591. SetError(0)
  3592. Return 1
  3593. Else
  3594. SetError(1)
  3595. Return 0
  3596. EndIf
  3597. EndFunc
  3598. Func _ArrayBinarySearch(ByRef $avArray, $sKey, $i_Base = 0)
  3599. Local $iLwrLimit = $i_Base
  3600. Local $iUprLimit
  3601. Local $iMidElement
  3602. If (Not IsArray($avArray)) Then
  3603. SetError(1)
  3604. Return ""
  3605. EndIf
  3606. $iUprLimit = UBound($avArray) - 1
  3607. $iMidElement = Int(($iUprLimit + $iLwrLimit) / 2)
  3608. If $avArray[$iLwrLimit] > $sKey Or $avArray[$iUprLimit] < $sKey Then
  3609. SetError(2)
  3610. Return ""
  3611. EndIf
  3612. While $iLwrLimit <= $iMidElement And $sKey <> $avArray[$iMidElement]
  3613. If $sKey < $avArray[$iMidElement] Then
  3614. $iUprLimit = $iMidElement - 1
  3615. Else
  3616. $iLwrLimit = $iMidElement + 1
  3617. EndIf
  3618. $iMidElement = Int(($iUprLimit + $iLwrLimit) / 2)
  3619. WEnd
  3620. If $iLwrLimit > $iUprLimit Then
  3621. SetError(3)
  3622. Return ""
  3623. Else
  3624. SetError(0)
  3625. Return $iMidElement
  3626. EndIf
  3627. EndFunc
  3628. Func _ArrayCreate($v_0, $v_1 = 0, $v_2 = 0, $v_3 = 0, $v_4 = 0, $v_5 = 0, $v_6 = 0, $v_7 = 0, $v_8 = 0, $v_9 = 0, $v_10 = 0, $v_11 = 0, $v_12 = 0, $v_13 = 0, $v_14 = 0, $v_15 = 0, $v_16 = 0, $v_17 = 0, $v_18 = 0, $v_19 = 0, $v_20 = 0)
  3629. Local $av_Array[21] = [$v_0, $v_1, $v_2, $v_3, $v_4, $v_5, $v_6, $v_7, $v_8, $v_9, $v_10, $v_11, $v_12, $v_13, $v_14, $v_15, $v_16, $v_17, $v_18, $v_19, $v_20]
  3630. ReDim $av_Array[@NumParams]
  3631. Return $av_Array
  3632. EndFunc
  3633. Func _ArrayDelete(ByRef $avArray, $iElement)
  3634. Local $iCntr = 0, $iUpper = 0
  3635. If (Not IsArray($avArray)) Then
  3636. SetError(1)
  3637. Return ""
  3638. EndIf
  3639. $iUpper = UBound($avArray)
  3640. If $iUpper = 1 Then
  3641. SetError(2)
  3642. Return ""
  3643. EndIf
  3644. Local $avNewArray[$iUpper - 1]
  3645. If $iElement < 0 Then
  3646. $iElement = 0
  3647. EndIf
  3648. If $iElement > ($iUpper - 1) Then
  3649. $iElement = ($iUpper - 1)
  3650. EndIf
  3651. If $iElement > 0 Then
  3652. For $iCntr = 0 To $iElement - 1
  3653. $avNewArray[$iCntr] = $avArray[$iCntr]
  3654. Next
  3655. EndIf
  3656. If $iElement < ($iUpper - 1) Then
  3657. For $iCntr = ($iElement + 1) To ($iUpper - 1)
  3658. $avNewArray[$iCntr - 1] = $avArray[$iCntr]
  3659. Next
  3660. EndIf
  3661. $avArray = $avNewArray
  3662. SetError(0)
  3663. Return 1
  3664. EndFunc
  3665. Func _ArrayDisplay($ar_2DArray, $sTitle = "ListView array 1D and 2D Display", $i_ShowOver4000 = 1, $i_Transpose = 0, $GUIDataSeparatorChar = "|", $GUIDataReplace = "~")
  3666. Local $searchlistView, $hndButton_Close, $sTempHeader = 'Row', $i_Pos, $size, $ar_ExcelValueTrans[1][1], $s_NotDoneLine, $ret
  3667. Local $ar_TempSingle[1], $msg, $hndButton_Array1Box_TextSelect, $searchGUI, $ar_2dCurrent[1][1], $GUICtrlCreateListViewItem
  3668. If Not IsArray($ar_2DArray) Then Return SetError(1, 0, 0)
  3669. $searchGUI = GUICreate($sTitle, 810, 623, (@DesktopWidth - 800) / 2, (@DesktopHeight - 600) / 2, $WS_MAXIMIZEBOX + $WS_MINIMIZEBOX)
  3670. $hndButton_Array1Box_TextSelect = GUICtrlCreateButton('&Text' & 'Selected', 10, 550, 70, 24)
  3671. GUICtrlSetResizing($hndButton_Array1Box_TextSelect, BitOR($GUI_DockRight, $GUI_DockBottom, $GUI_DockSize))
  3672. $hndButton_Close = GUICtrlCreateButton('&Close', 190, 550, 70, 24)
  3673. GUICtrlSetResizing($hndButton_Close, BitOR($GUI_DockRight, $GUI_DockBottom, $GUI_DockSize))
  3674. GUICtrlSetState($hndButton_Array1Box_TextSelect, ($GUI_DefButton))
  3675. If UBound($ar_2DArray, 0) = 1 Then
  3676. ReDim $ar_2dCurrent[UBound($ar_2DArray) ][1]
  3677. For $i = 0 To UBound($ar_2DArray) - 1
  3678. $ar_2dCurrent[$i][0] = $ar_2DArray[$i]
  3679. Next
  3680. $ar_2DArray = $ar_2dCurrent
  3681. EndIf
  3682. If $i_Transpose And IsArray($ar_2DArray) And UBound($ar_2DArray, 0) = 2 Then
  3683. ReDim $ar_ExcelValueTrans[UBound($ar_2DArray, 2) ][UBound($ar_2DArray, 1) ]
  3684. For $j = 0 To UBound($ar_2DArray, 2) - 1
  3685. For $numb = 0 To UBound($ar_2DArray, 1) - 1
  3686. If $numb > 250 Then ExitLoop
  3687. $ar_ExcelValueTrans[$j][$numb] = $ar_2DArray[$numb][$j]
  3688. Next
  3689. Next
  3690. $ar_2DArray = $ar_ExcelValueTrans
  3691. EndIf
  3692. Opt("GUIDataSeparatorChar", $GUIDataSeparatorChar)
  3693. For $x = 0 To UBound($ar_2DArray) - 1 Step 1
  3694. For $y = 0 To UBound($ar_2DArray, 2) - 1 Step 1
  3695. $ar_2DArray[$x][$y] = StringReplace($ar_2DArray[$x][$y], $GUIDataSeparatorChar, $GUIDataReplace)
  3696. Next
  3697. Next
  3698. For $i = 1 To UBound($ar_2DArray, 2)
  3699. $sTempHeader &= $GUIDataSeparatorChar & 'Col ' & $i - 1
  3700. Next
  3701. StringReplace($sTempHeader, $GUIDataSeparatorChar, "<")
  3702. If @extended > 252 Then
  3703. $i_Pos = StringInStr($sTempHeader, $GUIDataSeparatorChar, 0, 252)
  3704. $sTempHeader = StringLeft($sTempHeader, $i_Pos - 1)
  3705. EndIf
  3706. $s_NotDoneLine = StringReplace($sTempHeader, "Col", "ND")
  3707. If UBound($ar_2DArray, 0) = 2 Then
  3708. ReDim $ar_TempSingle[UBound($ar_2DArray) ]
  3709. For $i = 0 To UBound($ar_2DArray) - 1
  3710. $ar_TempSingle[$i] = "[" & $i & "]"
  3711. For $c = 0 To UBound($ar_2DArray, 2) - 1
  3712. If $c < 251 Then
  3713. $ar_TempSingle[$i] &= $GUIDataSeparatorChar & $ar_2DArray[$i][$c]
  3714. Else
  3715. ExitLoop
  3716. EndIf
  3717. Next
  3718. $ar_TempSingle[$i] = StringMid($ar_TempSingle[$i], 1, StringLen($ar_TempSingle) - 1)
  3719. Next
  3720. Else
  3721. $ar_TempSingle = $ar_2DArray
  3722. EndIf
  3723. $size = WinGetClientSize($sTitle)
  3724. GUICtrlDelete($searchlistView)
  3725. $searchlistView = GUICtrlCreateListView($sTempHeader, 0, 16, $size[0] - 10, $size[1] - 90, BitOR($LVS_SHOWSELALWAYS, $LVS_EDITLABELS), BitOR($LVS_EX_GRIDLINES, $LVS_EX_HEADERDRAGDROP, $LVS_EX_FULLROWSELECT, $LVS_EX_REGIONAL))
  3726. GUICtrlSetResizing($searchlistView, BitOR($GUI_DockLeft, $GUI_DockTop, $GUI_DockRight, $GUI_DockBottom))
  3727. For $c = 0 To UBound($ar_TempSingle) - 1
  3728. If ($c < 3999) Or $i_ShowOver4000 Then
  3729. If $c < 3999 Then
  3730. $GUICtrlCreateListViewItem = GUICtrlCreateListViewItem($ar_TempSingle[$c], $searchlistView)
  3731. If Not $GUICtrlCreateListViewItem Then GUICtrlCreateListViewItem($s_NotDoneLine, $searchlistView)
  3732. Else
  3733. $ret = _GUICtrlListViewInsertItem($searchlistView, -1, $ar_TempSingle[$c])
  3734. If ($ret = $LV_ERR) Then _GUICtrlListViewInsertItem($searchlistView, -1, $s_NotDoneLine)
  3735. EndIf
  3736. ElseIf ($c >= 3999) Then
  3737. ExitLoop
  3738. EndIf
  3739. Next
  3740. _GUICtrlListViewSetColumnWidth($searchlistView, 2, $LVSCW_AUTOSIZE)
  3741. If UBound($ar_2DArray, 2) = 1 Then _GUICtrlListViewSetColumnWidth($searchlistView, 1, $LVSCW_AUTOSIZE)
  3742. GUISetState()
  3743. Local $SaveEventMode = Opt("GUIOnEventMode",0)
  3744. Do
  3745. $msg = GUIGetMsg(1)
  3746. Select
  3747. Case $msg[0] = $hndButton_Array1Box_TextSelect
  3748. Local $a_indices[1], $s_CopyLines = ""
  3749. If _GUICtrlListViewGetItemCount($searchlistView) Then $a_indices = _GUICtrlListViewGetSelectedIndices($searchlistView, 1)
  3750. If (IsArray($a_indices)) Then
  3751. ClipPut("")
  3752. For $i = 1 To $a_indices[0]
  3753. $s_CopyLines &= $ar_TempSingle[ $a_indices[$i]] & @LF
  3754. Next
  3755. Else
  3756. For $i = 0 To UBound($ar_TempSingle) - 1
  3757. $s_CopyLines &= $ar_TempSingle[$i] & @LF
  3758. Next
  3759. EndIf
  3760. ClipPut($s_CopyLines)
  3761. EndSelect
  3762. Until $msg[0] = $GUI_EVENT_CLOSE Or $msg[0] = $hndButton_Close
  3763. GUIDelete($searchGUI)
  3764. Opt("GUIOnEventMode",$SaveEventMode)
  3765. Return SetError(0, 0, 1)
  3766. EndFunc
  3767. Func _ArrayInsert(ByRef $avArray, $iElement, $sValue = "")
  3768. Local $iCntr = 0
  3769. If Not IsArray($avArray) Then
  3770. SetError(1)
  3771. Return 0
  3772. EndIf
  3773. ReDim $avArray[UBound($avArray) + 1]
  3774. For $iCntr = UBound($avArray) - 1 To $iElement + 1 Step - 1
  3775. $avArray[$iCntr] = $avArray[$iCntr - 1]
  3776. Next
  3777. $avArray[$iCntr] = $sValue
  3778. Return 1
  3779. EndFunc
  3780. Func _ArrayMax(Const ByRef $avArray, $iCompNumeric = 0, $i_Base = 0)
  3781. If IsArray($avArray) Then
  3782. Return $avArray[_ArrayMaxIndex($avArray, $iCompNumeric, $i_Base) ]
  3783. Else
  3784. SetError(1)
  3785. Return ""
  3786. EndIf
  3787. EndFunc
  3788. Func _ArrayMaxIndex(Const ByRef $avArray, $iCompNumeric = 0, $i_Base = 0)
  3789. Local $iCntr, $iMaxIndex = $i_Base
  3790. If Not IsArray($avArray) Then
  3791. SetError(1)
  3792. Return ""
  3793. EndIf
  3794. Local $iUpper = UBound($avArray)
  3795. For $iCntr = $i_Base To ($iUpper - 1)
  3796. If $iCompNumeric = 1 Then
  3797. If Number($avArray[$iMaxIndex]) < Number($avArray[$iCntr]) Then
  3798. $iMaxIndex = $iCntr
  3799. EndIf
  3800. Else
  3801. If $avArray[$iMaxIndex] < $avArray[$iCntr] Then
  3802. $iMaxIndex = $iCntr
  3803. EndIf
  3804. EndIf
  3805. Next
  3806. SetError(0)
  3807. Return $iMaxIndex
  3808. EndFunc
  3809. Func _ArrayMin(Const ByRef $avArray, $iCompNumeric = 0, $i_Base = 0)
  3810. If IsArray($avArray) Then
  3811. Return $avArray[_ArrayMinIndex($avArray, $iCompNumeric, $i_Base) ]
  3812. Else
  3813. SetError(1)
  3814. Return ""
  3815. EndIf
  3816. EndFunc
  3817. Func _ArrayMinIndex(Const ByRef $avArray, $iCompNumeric = 0, $i_Base = 0)
  3818. Local $iCntr = 0, $iMinIndex = $i_Base
  3819. If Not IsArray($avArray) Then
  3820. SetError(1)
  3821. Return ""
  3822. EndIf
  3823. Local $iUpper = UBound($avArray)
  3824. For $iCntr = $i_Base To ($iUpper - 1)
  3825. If $iCompNumeric = 1 Then
  3826. If Number($avArray[$iMinIndex]) > Number($avArray[$iCntr]) Then
  3827. $iMinIndex = $iCntr
  3828. EndIf
  3829. Else
  3830. If $avArray[$iMinIndex] > $avArray[$iCntr] Then
  3831. $iMinIndex = $iCntr
  3832. EndIf
  3833. EndIf
  3834. Next
  3835. SetError(0)
  3836. Return $iMinIndex
  3837. EndFunc
  3838. Func _ArrayPop(ByRef $avArray)
  3839. Local $sLastVal
  3840. If (Not IsArray($avArray)) Then
  3841. SetError(1)
  3842. Return ""
  3843. EndIf
  3844. $sLastVal = $avArray[UBound($avArray) - 1]
  3845. If UBound($avArray) = 1 Then
  3846. $avArray = ""
  3847. Else
  3848. ReDim $avArray[UBound($avArray) - 1]
  3849. EndIf
  3850. Return $sLastVal
  3851. EndFunc
  3852. Func _ArrayPush(ByRef $avArray, $sValue, $i_Direction = 0)
  3853. Local $i, $j
  3854. If (Not IsArray($avArray)) Then
  3855. SetError(1)
  3856. Return 0
  3857. EndIf
  3858. If (Not IsArray($sValue)) Then
  3859. If $i_Direction = 1 Then
  3860. For $i = (UBound($avArray) - 1) To 1 Step - 1
  3861. $avArray[$i] = $avArray[$i - 1]
  3862. Next
  3863. $avArray[0] = $sValue
  3864. Else
  3865. For $i = 0 To (UBound($avArray) - 2)
  3866. $avArray[$i] = $avArray[$i + 1]
  3867. Next
  3868. $i = (UBound($avArray) - 1)
  3869. $avArray[$i] = $sValue
  3870. EndIf
  3871. SetError(0)
  3872. Return 1
  3873. Else
  3874. If UBound($sValue) > UBound($avArray) Then
  3875. SetError(1)
  3876. Return -1
  3877. Else
  3878. For $j = 0 To (UBound($sValue) - 1)
  3879. If $i_Direction = 1 Then
  3880. For $i = (UBound($avArray) - 1) To 1
  3881. $avArray[$i] = $avArray[$i - 1]
  3882. Next
  3883. $avArray[$j] = $sValue[$j]
  3884. Else
  3885. For $i = 0 To (UBound($avArray) - 2)
  3886. $avArray[$i] = $avArray[$i + 1]
  3887. Next
  3888. $i = (UBound($avArray) - 1)
  3889. $avArray[$i] = $sValue[$j]
  3890. EndIf
  3891. Next
  3892. EndIf
  3893. EndIf
  3894. SetError(0)
  3895. Return 1
  3896. EndFunc
  3897. Func _ArrayReverse(ByRef $avArray, $i_Base = 0, $i_UBound = 0)
  3898. If Not IsArray($avArray) Then
  3899. SetError(1)
  3900. Return 0
  3901. EndIf
  3902. Local $tmp, $last = UBound($avArray) - 1
  3903. If $i_UBound < 1 Or $i_UBound > $last Then $i_UBound = $last
  3904. For $i = $i_Base To $i_Base + Int(($i_UBound - $i_Base - 1) / 2)
  3905. $tmp = $avArray[$i]
  3906. $avArray[$i] = $avArray[$i_UBound]
  3907. $avArray[$i_UBound] = $tmp
  3908. $i_UBound = $i_UBound - 1
  3909. Next
  3910. Return 1
  3911. EndFunc
  3912. Func _ArraySearch(Const ByRef $avArray, $vWhat2Find, $iStart = 0, $iEnd = 0, $iCaseSense = 0, $fPartialSearch = False)
  3913. Local $iCurrentPos, $iUBound, $iResult
  3914. If Not IsArray($avArray) Then
  3915. SetError(1)
  3916. Return -1
  3917. EndIf
  3918. $iUBound = UBound($avArray) - 1
  3919. If $iEnd = 0 Then $iEnd = $iUBound
  3920. If $iStart > $iUBound Then
  3921. SetError(2)
  3922. Return -1
  3923. EndIf
  3924. If $iEnd > $iUBound Then
  3925. SetError(3)
  3926. Return -1
  3927. EndIf
  3928. If $iStart > $iEnd Then
  3929. SetError(4)
  3930. Return -1
  3931. EndIf
  3932. If Not ($iCaseSense = 0 Or $iCaseSense = 1) Then
  3933. SetError(5)
  3934. Return -1
  3935. EndIf
  3936. For $iCurrentPos = $iStart To $iEnd
  3937. Select
  3938. Case $iCaseSense = 0
  3939. If $fPartialSearch = False Then
  3940. If $avArray[$iCurrentPos] = $vWhat2Find Then
  3941. SetError(0)
  3942. Return $iCurrentPos
  3943. EndIf
  3944. Else
  3945. $iResult = StringInStr($avArray[$iCurrentPos], $vWhat2Find, $iCaseSense)
  3946. If $iResult > 0 Then
  3947. SetError(0)
  3948. Return $iCurrentPos
  3949. EndIf
  3950. EndIf
  3951. Case $iCaseSense = 1
  3952. If $fPartialSearch = False Then
  3953. If $avArray[$iCurrentPos] == $vWhat2Find Then
  3954. SetError(0)
  3955. Return $iCurrentPos
  3956. EndIf
  3957. Else
  3958. $iResult = StringInStr($avArray[$iCurrentPos], $vWhat2Find, $iCaseSense)
  3959. If $iResult > 0 Then
  3960. SetError(0)
  3961. Return $iCurrentPos
  3962. EndIf
  3963. EndIf
  3964. EndSelect
  3965. Next
  3966. SetError(6)
  3967. Return -1
  3968. EndFunc
  3969. Func _ArraySort(ByRef $a_Array, $i_Decending = 0, $i_Base = 0, $i_UBound = 0, $i_Dim = 1, $i_SortIndex = 0)
  3970. If Not IsArray($a_Array) Then
  3971. SetError(1)
  3972. Return 0
  3973. EndIf
  3974. Local $last = UBound($a_Array) - 1
  3975. If $i_UBound < 1 Or $i_UBound > $last Then $i_UBound = $last
  3976. If $i_Dim = 1 Then
  3977. __ArrayQSort1($a_Array, $i_Base, $i_UBound)
  3978. If $i_Decending Then _ArrayReverse($a_Array, $i_Base, $i_UBound)
  3979. Else
  3980. __ArrayQSort2($a_Array, $i_Base, $i_UBound, $i_Dim, $i_SortIndex, $i_Decending)
  3981. EndIf
  3982. Return 1
  3983. EndFunc
  3984. Func __ArrayQSort1(ByRef $array, ByRef $left, ByRef $right)
  3985. Local $i, $j, $t
  3986. If $right - $left < 10 Then
  3987. For $i = $left + 1 To $right
  3988. $t = $array[$i]
  3989. $j = $i
  3990. While $j > $left _
  3991. And ((IsNumber($array[$j - 1]) = IsNumber($t) And $array[$j - 1] > $t) _
  3992. Or (IsNumber($array[$j - 1]) <> IsNumber($t) And String($array[$j - 1]) > String($t)))
  3993. $array[$j] = $array[$j - 1]
  3994. $j = $j - 1
  3995. WEnd
  3996. $array[$j] = $t
  3997. Next
  3998. Return
  3999. EndIf
  4000. Local $pivot = $array[Int(($left + $right) / 2) ]
  4001. Local $L = $left
  4002. Local $R = $right
  4003. Do
  4004. While ((IsNumber($array[$L]) = IsNumber($pivot) And $array[$L] < $pivot) _
  4005. Or (IsNumber($array[$L]) <> IsNumber($pivot) And String($array[$L]) < String($pivot)))
  4006. $L = $L + 1
  4007. WEnd
  4008. While ((IsNumber($array[$R]) = IsNumber($pivot) And $array[$R] > $pivot) _
  4009. Or (IsNumber($array[$R]) <> IsNumber($pivot) And String($array[$R]) > String($pivot)))
  4010. $R = $R - 1
  4011. WEnd
  4012. If $L <= $R Then
  4013. $t = $array[$L]
  4014. $array[$L] = $array[$R]
  4015. $array[$R] = $t
  4016. $L = $L + 1
  4017. $R = $R - 1
  4018. EndIf
  4019. Until $L > $R
  4020. __ArrayQSort1($array, $left, $R)
  4021. __ArrayQSort1($array, $L, $right)
  4022. EndFunc
  4023. Func __ArrayQSort2(ByRef $array, ByRef $left, ByRef $right, ByRef $dim2, ByRef $sortIdx, ByRef $decend)
  4024. If $left >= $right Then Return
  4025. Local $t, $d2 = $dim2 - 1
  4026. Local $pivot = $array[Int(($left + $right) / 2) ][$sortIdx]
  4027. Local $L = $left
  4028. Local $R = $right
  4029. Do
  4030. If $decend Then
  4031. While ((IsNumber($array[$L][$sortIdx]) = IsNumber($pivot) And $array[$L][$sortIdx] > $pivot) _
  4032. Or (IsNumber($array[$L][$sortIdx]) <> IsNumber($pivot) And String($array[$L][$sortIdx]) > String($pivot)))
  4033. $L = $L + 1
  4034. WEnd
  4035. While ((IsNumber($array[$R][$sortIdx]) = IsNumber($pivot) And $array[$R][$sortIdx] < $pivot) _
  4036. Or (IsNumber($array[$R][$sortIdx]) <> IsNumber($pivot) And String($array[$R][$sortIdx]) < String($pivot)))
  4037. $R = $R - 1
  4038. WEnd
  4039. Else
  4040. While ((IsNumber($array[$L][$sortIdx]) = IsNumber($pivot) And $array[$L][$sortIdx] < $pivot) _
  4041. Or (IsNumber($array[$L][$sortIdx]) <> IsNumber($pivot) And String($array[$L][$sortIdx]) < String($pivot)))
  4042. $L = $L + 1
  4043. WEnd
  4044. While ((IsNumber($array[$R][$sortIdx]) = IsNumber($pivot) And $array[$R][$sortIdx] > $pivot) _
  4045. Or (IsNumber($array[$R][$sortIdx]) <> IsNumber($pivot) And String($array[$R][$sortIdx]) > String($pivot)))
  4046. $R = $R - 1
  4047. WEnd
  4048. EndIf
  4049. If $L <= $R Then
  4050. For $x = 0 To $d2
  4051. $t = $array[$L][$x]
  4052. $array[$L][$x] = $array[$R][$x]
  4053. $array[$R][$x] = $t
  4054. Next
  4055. $L = $L + 1
  4056. $R = $R - 1
  4057. EndIf
  4058. Until $L > $R
  4059. __ArrayQSort2($array, $left, $R, $dim2, $sortIdx, $decend)
  4060. __ArrayQSort2($array, $L, $right, $dim2, $sortIdx, $decend)
  4061. EndFunc
  4062. Func _ArraySwap(ByRef $svector1, ByRef $svector2)
  4063. Local $sTemp = $svector1
  4064. $svector1 = $svector2
  4065. $svector2 = $sTemp
  4066. SetError(0)
  4067. EndFunc
  4068. Func _ArrayToClip(Const ByRef $avArray, $i_Base = 0)
  4069. Local $iCntr, $iRetVal = 0, $sCr = "", $sText = ""
  4070. If (IsArray($avArray)) Then
  4071. For $iCntr = $i_Base To (UBound($avArray) - 1)
  4072. $iRetVal = 1
  4073. If $iCntr > $i_Base Then
  4074. $sCr = @CR
  4075. EndIf
  4076. $sText = $sText & $sCr & $avArray[$iCntr]
  4077. Next
  4078. EndIf
  4079. ClipPut($sText)
  4080. Return $iRetVal
  4081. EndFunc
  4082. Func _ArrayToString(Const ByRef $avArray, $sDelim, $iStart = Default, $iEnd = Default)
  4083. Local $iUBound = UBound($avArray) - 1
  4084. If ($iUBound + 1) < 2 Or UBound($avArray, 0) > 1 Then Return SetError(1, 0, "")
  4085. If $iStart = Default Or $iStart = -1 Then $iStart = 0
  4086. If $iEnd = Default Or $iEnd = -1 Then $iEnd = $iUBound
  4087. If ($iStart < 0) Or ($iEnd < 0) Or ($iStart > $iEnd) Then Return SetError(2, 0, "")
  4088. If ($iEnd > $iUBound) Then
  4089. $iEnd = $iUBound
  4090. EndIf
  4091. Local $sResult
  4092. For $i = $iStart To $iEnd
  4093. $sResult &= $avArray[$i] & $sDelim
  4094. Next
  4095. Return StringTrimRight($sResult, StringLen($sDelim))
  4096. EndFunc
  4097. Func _ArrayTrim($aArray, $iTrimNum, $iTrimDirection = 0, $iBase = 0, $iUBound = 0)
  4098. Local $i
  4099. If UBound($aArray) = 0 Then
  4100. SetError(1)
  4101. Return $aArray
  4102. EndIf
  4103. If $iBase < 0 Or Not IsNumber($iBase) Then
  4104. SetError(2)
  4105. Return $aArray
  4106. EndIf
  4107. If UBound($aArray) <= $iUBound Or Not IsNumber($iUBound) Then
  4108. SetError(3)
  4109. Return $aArray
  4110. EndIf
  4111. If $iUBound < 1 Then $iUBound = UBound($aArray) - 1
  4112. If $iTrimDirection < 0 Or $iTrimDirection > 1 Then
  4113. SetError(4)
  4114. Return
  4115. EndIf
  4116. For $i = $iBase To $iUBound
  4117. If $iTrimDirection = 0 Then
  4118. $aArray[$i] = StringTrimLeft($aArray[$i], $iTrimNum)
  4119. Else
  4120. $aArray[$i] = StringTrimRight($aArray[$i], $iTrimNum)
  4121. EndIf
  4122. Next
  4123. Return $aArray
  4124. EndFunc
  4125. ; ----------------------------------------------------------------------------
  4126. ; <AUT2EXE INCLUDE-END: C:\Program Files\AutoIt3\Include\array.au3>
  4127. ; ----------------------------------------------------------------------------
  4128. Const $PARAMBYVAL = 0
  4129. Const $PARAMBYREF = 1
  4130. Const $PARAMWINDOW = 3
  4131. Const $ParamArray = 2
  4132. Const $OE_HOTKEY = 1
  4133. Const $OE_CONTROL = 0
  4134. Const $OE_GUI = 2
  4135. Const $MAX_NUM_PARAMS = 5
  4136. Global $CtrlLib[6][2][$MAX_NUM_PARAMS + 3]
  4137. Func SetOnEventA($iCtrl, $sFunc, $ParType1 = 0, $Par1 = '', $ParType2 = 0, $par2 = '', $ParType3 = 0, $Par3 = '', $ParType4 = 0, $Par4 = '', $ParType5 = 0, $Par5 = '')
  4138. Local $n, $aval, $item = 0, $iParCount = 0
  4139. $iParCount = (@NumParams - 2) / 2
  4140. If $iCtrl = -1 Then $iCtrl = _GUIGetLastCtrlID()
  4141. For $n = 1 To $CtrlLib[0][0][0]
  4142. If $CtrlLib[$n][1][0] = $iCtrl Then
  4143. $item = $n
  4144. ExitLoop
  4145. EndIf
  4146. Next
  4147. If $item = 0 Then
  4148. $CtrlLib[0][0][0] += 1
  4149. $item = $CtrlLib[0][0][0]
  4150. If UBound($CtrlLib) < $item + 1 Then ReDim $CtrlLib[$item + 2][2][$MAX_NUM_PARAMS + 3]
  4151. EndIf
  4152. If IsString($iCtrl) Then
  4153. If Not IsString($iCtrl) Or $iCtrl = '' Then Return -6
  4154. HotKeySet($iCtrl, "HK_EventFunc")
  4155. $CtrlLib[$item][0][0] = $OE_HOTKEY
  4156. Else
  4157. If Opt("GUIOnEventMode") = 0 Then
  4158. Return -3
  4159. EndIf
  4160. If $iCtrl < -2 And $iCtrl > -14 Then
  4161. If $ParType1 <> $PARAMBYVAL Then Return -4
  4162. If IsHWnd($Par1) Then
  4163. $CtrlLib[$item][0][1] = $Par1
  4164. ElseIf Number($Par1) = 0 Then
  4165. $CtrlLib[$item][0][1] = 0
  4166. Else
  4167. Return -5
  4168. EndIf
  4169. GUISetOnEvent($iCtrl, "EventGuiFunc")
  4170. $CtrlLib[$item][0][0] = $OE_GUI
  4171. Else
  4172. $CtrlLib[$item][0][0] = $OE_CONTROL
  4173. GUICtrlSetOnEvent($iCtrl, "EventCtrlFunc")
  4174. EndIf
  4175. EndIf
  4176. Switch $CtrlLib[$item][0][0]
  4177. Case $OE_HOTKEY
  4178. $CtrlLib[$item][1][0] = $iCtrl
  4179. Case $OE_CONTROL
  4180. $CtrlLib[$item][1][0] = $iCtrl
  4181. Case $OE_GUI
  4182. $CtrlLib[$item][1][0] = $iCtrl
  4183. EndSwitch
  4184. $CtrlLib[$item][1][1] = $sFunc
  4185. $CtrlLib[$item][1][2] = $iParCount
  4186. For $n = 1 To $iParCount
  4187. $CtrlLib[$item][0][$n + 2] = Eval("ParType" & $n)
  4188. If $CtrlLib[$item][0][$n + 2] = $PARAMBYVAL Then
  4189. $CtrlLib[$item][1][$n + 2] = Eval("Par" & $n)
  4190. ElseIf ($CtrlLib[$item][0][$n + 2] = $PARAMBYREF) Then
  4191. $aval = Eval("Par" & $n)
  4192. If Not IsString($aval) Then
  4193. $CtrlLib[$item][1][1] = ""
  4194. SetError($n)
  4195. Return -2
  4196. EndIf
  4197. If StringLeft($aval, 1) = '$' Then
  4198. $aval = StringRight($aval, StringLen($aval) - 1)
  4199. EndIf
  4200. $CtrlLib[$item][1][$n + 2] = $aval
  4201. Else
  4202. $CtrlLib[$item][1][1] = ""
  4203. Return -1
  4204. EndIf
  4205. Next
  4206. If $CtrlLib[$item][0][0] = $OE_GUI And $iParCount = 0 Then
  4207. $CtrlLib[$item][1][1 + 2] = 0
  4208. EndIf
  4209. Return 1
  4210. EndFunc
  4211. Func _GUIGetLastCtrlID()
  4212. Local $aRet = DllCall("user32.dll", "int", "GetDlgCtrlID", "hwnd", GUICtrlGetHandle(-1))
  4213. Return $aRet[0]
  4214. EndFunc
  4215. Func EventCtrlFunc()
  4216. Local $item
  4217. $item = GetItem(@GUI_CtrlId)
  4218. If $item = -1 Then Return
  4219. $CtrlLib[0][1][1] = $item
  4220. $CtrlLib[0][1][2] = @GUI_CtrlId
  4221. BuildFnCall($item)
  4222. EndFunc
  4223. Func EventGuiFunc()
  4224. Local $item
  4225. $item = GetItem(@GUI_CtrlId, @GUI_WinHandle)
  4226. If $item = -1 Then Return
  4227. $CtrlLib[0][1][1] = $item
  4228. $CtrlLib[0][1][2] = @GUI_CtrlId
  4229. If @GUI_CtrlId = $GUI_EVENT_DROPPED Then
  4230. $CtrlLib[0][1][3] = @GUI_DragId
  4231. $CtrlLib[0][1][4] = @GUI_DragFile
  4232. $CtrlLib[0][1][5] = @GUI_DropId
  4233. EndIf
  4234. BuildFnCall($item)
  4235. EndFunc
  4236. Func EventGetDragIDs()
  4237. Local $aDrag[3]
  4238. $aDrag[0] = $CtrlLib[0][1][3]
  4239. $aDrag[1] = $CtrlLib[0][1][4]
  4240. $aDrag[2] = $CtrlLib[0][1][5]
  4241. Return $aDrag
  4242. EndFunc
  4243. Func HK_EventFunc()
  4244. Local $item
  4245. $item = GetItem(@HotKeyPressed)
  4246. If $item = -1 Then Return
  4247. $CtrlLib[0][1][1] = $item
  4248. $CtrlLib[0][1][2] = @HotKeyPressed
  4249. BuildFnCall($item)
  4250. EndFunc
  4251. Func BuildFnCall($index)
  4252. Local $Arrayset[$CtrlLib[$index][1][2] + 1]
  4253. $Arrayset[0] = "CallArgArray"
  4254. For $n = 1 To $CtrlLib[$index][1][2]
  4255. If $CtrlLib[$index][0][$n + 2] = $PARAMBYVAL Then
  4256. $Arrayset[$n] = $CtrlLib[$index][1][$n + 2]
  4257. Else
  4258. $Arrayset[$n] = Eval($CtrlLib[$index][1][$n + 2])
  4259. EndIf
  4260. Next
  4261. Call($CtrlLib[$index][1][1], $Arrayset)
  4262. EndFunc
  4263. Func GetCtrlID()
  4264. Return $CtrlLib[0][1][2]
  4265. EndFunc
  4266. Func GetCtrlHandle()
  4267. If IsString($CtrlLib[0][1][2]) Or $CtrlLib[0][1][2] = 0 Then
  4268. Return 0
  4269. Else
  4270. Return GUICtrlGetHandle($CtrlLib[0][1][2])
  4271. EndIf
  4272. EndFunc
  4273. Func GetItem($id, $hWnd = 0)
  4274. For $n = 0 To UBound($CtrlLib) - 1
  4275. If $CtrlLib[$n][1][0] = $id Then
  4276. If $CtrlLib[$n][0][0] = $OE_GUI Then
  4277. If $CtrlLib[$n][0][1] = $hWnd Or $CtrlLib[$n][0][1] = 0 Then
  4278. Return $n
  4279. EndIf
  4280. Else
  4281. Return $n
  4282. EndIf
  4283. EndIf
  4284. Next
  4285. Return -1
  4286. EndFunc
  4287. Func SetOnEvent($iCtrl, $sFunc, $iParCount = 0, $ParType1 = 0, $Par1 = '', $ParType2 = 0, $par2 = '', $ParType3 = 0, $Par3 = '', $ParType4 = 0, $Par4 = '', $ParType5 = 0, $Par5 = '')
  4288. SetOnEventA($iCtrl, $sFunc, $ParType1, $Par1, $ParType2, $par2, $ParType3, $Par3, $ParType4, $Par4, $ParType5, $Par5)
  4289. EndFunc
  4290. ; ----------------------------------------------------------------------------
  4291. ; <AUT2EXE INCLUDE-END: C:\Program Files\AutoIt3\Scripts\WoW\Relogger\V1\onEventFunc.au3>
  4292. ; ----------------------------------------------------------------------------
  4293. ; ----------------------------------------------------------------------------
  4294. ; <AUT2EXE INCLUDE-START: C:\Program Files\AutoIt3\Include\GuiListView.au3>
  4295. ; ----------------------------------------------------------------------------
  4296. ; ----------------------------------------------------------------------------
  4297. ; <AUT2EXE INCLUDE-END: C:\Program Files\AutoIt3\Include\GuiListView.au3>
  4298. ; ----------------------------------------------------------------------------
  4299. ; ----------------------------------------------------------------------------
  4300. ; <AUT2EXE INCLUDE-START: C:\Program Files\AutoIt3\Scripts\WoW\Relogger\V1\onEventFunc.au3>
  4301. ; ----------------------------------------------------------------------------
  4302. #AutoIt3Wrapper_Add_Constants=n
  4303. ; ----------------------------------------------------------------------------
  4304. ; <AUT2EXE INCLUDE-START: C:\Program Files\AutoIt3\Include\array.au3>
  4305. ; ----------------------------------------------------------------------------
  4306. ; ----------------------------------------------------------------------------
  4307. ; <AUT2EXE INCLUDE-END: C:\Program Files\AutoIt3\Include\array.au3>
  4308. ; ----------------------------------------------------------------------------
  4309. ; ----------------------------------------------------------------------------
  4310. ; <AUT2EXE INCLUDE-END: C:\Program Files\AutoIt3\Scripts\WoW\Relogger\V1\onEventFunc.au3>
  4311. ; ----------------------------------------------------------------------------
  4312. ; ----------------------------------------------------------------------------
  4313. ; <AUT2EXE INCLUDE-START: C:\Program Files\AutoIt3\Scripts\WoW\Relogger\V1\doubleclick.au3>
  4314. ; ----------------------------------------------------------------------------
  4315. Func WM_NOTIFY($hWnd, $MsgID, $wParam, $lParam)
  4316. Local $tagNMHDR, $event, $hwndFrom, $code
  4317. $tagNMHDR = DllStructCreate("int;int;int", $lParam)
  4318. If @error Then Return 0
  4319. $code = DllStructGetData($tagNMHDR, 3)
  4320. If $wParam = $list And $code = -3 And _GUICtrlListViewGetSelectedCount($list) > 0 Then
  4321. Global $dblclk=1
  4322. EndIf
  4323. EndFunc
  4324. ; ----------------------------------------------------------------------------
  4325. ; <AUT2EXE INCLUDE-END: C:\Program Files\AutoIt3\Scripts\WoW\Relogger\V1\doubleclick.au3>
  4326. ; ----------------------------------------------------------------------------
  4327. ; ----------------------------------------------------------------------------
  4328. ; <AUT2EXE INCLUDE-START: C:\Program Files\AutoIt3\Scripts\WoW\Relogger\V1\mem.au3>
  4329. ; ----------------------------------------------------------------------------
  4330. Global $DllInformation[99] = [0]
  4331. Global $CurrentLevel [99] = [0]
  4332. Global $playeradress[99] = [0]
  4333. Global $unitfield[99] = [0]
  4334. Func LoadMemory ($i)
  4335. If $attached[$i]=1 Then
  4336. If Winexists ($handle[$i]) Then
  4337. $DllInformation[$i] = _MemoryOpen($id[$i])
  4338.  
  4339. Global $Test1 = $id[$i]
  4340. Else
  4341. $attached[$i]=0
  4342. $status[$i] = $notattached_
  4343. LoadList ()
  4344. EndIf
  4345. EndIf
  4346. EndFunc
  4347. Func GetAdresses ($i)
  4348. $playeradress[$i] = _MemoryRead(_MemoryRead(_MemoryRead($playerbase, $DllInformation[$i], 'dword')+0x0C, $DllInformation[$i], 'dword')+0x24,$DllInformation[$i], 'dword')
  4349. $unitfield[$i] = _MemoryRead($playeradress[$i]+0x8, $DllInformation[$i], 'int')
  4350. EndFunc
  4351. Func GetChar ($i)
  4352. LoadMemory ($i)
  4353. GetAdresses ($i)
  4354. $level[$i] = _MemoryRead($unitfield[$i]+$UNIT_FIELD_LEVEL*4, $DllInformation[$i], 'int')
  4355. EndFunc
  4356. Func GetScreens ()
  4357. For $k=1 To IniRead ("settings.ini", "Global", "Number", 0)
  4358. LoadMemory ($k)
  4359. GetAdresses ($k)
  4360. If $attached[$k]=1 Then
  4361. If _MemoryRead(0x00B02BB8, $DllInformation[$k], 'int') = 1768386412 And _MemoryRead($playeradress[$k] + $offset_x, $DllInformation[$k], 'float')=0 Then
  4362. $screen[$k]=$home_
  4363. ElseIf ((_MemoryRead(0x00B02BB8, $DllInformation[$k], 'int') = 1918986339 And _MemoryRead(0x00A64D94, $DllInformation[$k], 'int')) = 4 Or (_MemoryRead(0x00A64D94, $DllInformation[$k], 'int') = 16)) And _MemoryRead($playeradress[$k] + $offset_x, $DllInformation[$k], 'float') = 0 Then
  4364. $screen[$k]=$char_
  4365. ElseIf _MemoryRead(0x00B02BB8, $DllInformation[$k], 'int') = 1768386412 And (_MemoryRead(0x00A64D94, $DllInformation[$k], 'int') = 5 Or _MemoryRead(0x00A64D94, $DllInformation[$k], 'int') = 1) And _MemoryRead($playeradress[$k] + $offset_x, $DllInformation[$k], 'float') = 0 Then
  4366. $screen[$k]=$popup_
  4367. ElseIf _MemoryRead(0x00B02BB8, $DllInformation[$k], 'int') = 1918986339 And _MemoryRead(0x00A64D94, $DllInformation[$k], 'int') = 4 And _MemoryRead($playeradress[$k] + $offset_x, $DllInformation[$k], 'float')<> 0 Then
  4368. $screen[$k] = $ig_
  4369. Else
  4370. $screen[$k]=$unknown_
  4371. EndIf
  4372. EndIf
  4373. Next
  4374. EndFunc
  4375. ; ----------------------------------------------------------------------------
  4376. ; <AUT2EXE INCLUDE-END: C:\Program Files\AutoIt3\Scripts\WoW\Relogger\V1\mem.au3>
  4377. ; ----------------------------------------------------------------------------
  4378. ; ----------------------------------------------------------------------------
  4379. ; <AUT2EXE INCLUDE-START: C:\Program Files\AutoIt3\Scripts\WoW\Relogger\V1\offsets.au3>
  4380. ; ----------------------------------------------------------------------------
  4381. $playerbase=0x00A7B434
  4382. $offset_x = 0x798
  4383. $UNIT_FIELD_LEVEL = 0x35
  4384. $UNIT_FIELD_STAT0=0x55
  4385. Func addOffset($i, $base, $tOff1 = 0, $tOff2 = 0, $tOff3 = 0, $tOff4 = 0, $tOff5 = 0)
  4386. Local $ret0 = _MemoryRead($base, $DllInformation[$i], 'dword'), $count=0
  4387. For $step = 1 to @NumParams-1
  4388. Assign("ret" & $step, _MemoryRead(eval("ret" & $step-1) + eval("tOff" & $step), $DllInformation[$i], 'dword'))
  4389. $count+=1
  4390. Next
  4391. Return eval("ret" & $count)
  4392. EndFunc
  4393. ; ----------------------------------------------------------------------------
  4394. ; <AUT2EXE INCLUDE-END: C:\Program Files\AutoIt3\Scripts\WoW\Relogger\V1\offsets.au3>
  4395. ; ----------------------------------------------------------------------------
  4396. ; ----------------------------------------------------------------------------
  4397. ; <AUT2EXE INCLUDE-START: C:\Program Files\AutoIt3\Scripts\WoW\Relogger\V1\NomadMemory.au3>
  4398. ; ----------------------------------------------------------------------------
  4399. ; ----------------------------------------------------------------------------
  4400. ; <AUT2EXE INCLUDE-END: C:\Program Files\AutoIt3\Scripts\WoW\Relogger\V1\NomadMemory.au3>
  4401. ; ----------------------------------------------------------------------------
  4402. ; ----------------------------------------------------------------------------
  4403. ; <AUT2EXE INCLUDE-START: C:\Program Files\AutoIt3\Scripts\WoW\Relogger\V1\custom.au3>
  4404. ; ----------------------------------------------------------------------------
  4405. Func ClearPopup ($i)
  4406. $popupcount = $popupcount+1
  4407. If Round(Int($popupcount/3)/2,0)=Int($popupcount/3)/2 Then
  4408. ClearPopup1 ($i)
  4409. Else
  4410. ClearPopup2 ($i)
  4411. EndIf
  4412. EndFunc
  4413. Func ClearPopup1 ($i)
  4414. ControlSend($handle[$i], "", $handle[$i], "{ENTER}")
  4415. EndFunc
  4416. Func ClearPopup2 ($i)
  4417. $pos = WinGetPos($handle[$i])
  4418. $pos2 = MouseGetPos()
  4419. MouseMove(IniRead("settings.ini","Global","Border Width", 6)+$pos[0] + (1/2)* ($pos[2]-IniRead("settings.ini","Global","Border Width", 6)*2), IniRead("settings.ini","Global","Title Height",20)+ IniRead("settings.ini","Global","Border Width",6)+$pos[1] + (103/200)*($pos[3]-IniRead("settings.ini","Global","Border Width", 6)*2-IniRead("settings.ini","Global","Title Height",20)), 0)
  4420. _MouseClickPlus($handle[$i], "left", IniRead("settings.ini","Global","Border Width", 6)+$pos[0] + (1/2)* ($pos[2]-IniRead("settings.ini","Global","Border Width", 6)*2), IniRead("settings.ini","Global","Title Height",20)+ IniRead("settings.ini","Global","Border Width",6)+$pos[1] + (103/200)*($pos[3]-IniRead("settings.ini","Global","Border Width", 6)*2-IniRead("settings.ini","Global","Title Height",20)))
  4421. MouseMove(IniRead("settings.ini","Global","Border Width", 6)+$pos[0] + (1/2)* $pos[2], IniRead("settings.ini","Global","Title Height",20)+ IniRead("settings.ini","Global","Border Width",6)+$pos[1] + (116/200)*$pos[3], 0)
  4422. _MouseClickPlus($handle[$i], "left", IniRead("settings.ini","Global","Border Width", 6)+$pos[0] + (1/2)* ($pos[2]-IniRead("settings.ini","Global","Border Width", 6)*2), IniRead("settings.ini","Global","Title Height",20)+ IniRead("settings.ini","Global","Border Width",6)+$pos[1] + (116/200)*($pos[3]-IniRead("settings.ini","Global","Border Width", 6)*2-IniRead("settings.ini","Global","Title Height",20)))
  4423. MouseMove(IniRead("settings.ini","Global","Border Width", 6)+$pos[0] + (123/200)* $pos[2], IniRead("settings.ini","Global","Title Height",20)+ IniRead("settings.ini","Global","Border Width",6)+$pos[1] + (120/200)*$pos[3], 0)
  4424. _MouseClickPlus($handle[$i], "left", IniRead("settings.ini","Global","Border Width", 6)+$pos[0] + (123/200)* ($pos[2]-IniRead("settings.ini","Global","Border Width", 6)*2), IniRead("settings.ini","Global","Title Height",20)+ IniRead("settings.ini","Global","Border Width",6)+$pos[1] + (120/200)*($pos[3]-IniRead("settings.ini","Global","Border Width", 6)*2-IniRead("settings.ini","Global","Title Height",20)))
  4425. Sleep ("0")
  4426. MouseMove(IniRead("settings.ini","Global","Border Width", 6)+$pos[0] + (140/200)* $pos[2], IniRead("settings.ini","Global","Title Height",20)+ IniRead("settings.ini","Global","Border Width",6)+$pos[1] + (158/200)*$pos[3], 0)
  4427. _MouseClickPlus($handle[$i], "left", IniRead("settings.ini","Global","Border Width", 6)+$pos[0] + (140/200)* ($pos[2]-IniRead("settings.ini","Global","Border Width", 6)*2), IniRead("settings.ini","Global","Title Height",20)+ IniRead("settings.ini","Global","Border Width",6)+$pos[1] + (158/200)*($pos[3]-IniRead("settings.ini","Global","Border Width", 6)*2-IniRead("settings.ini","Global","Title Height",20)))
  4428. MouseMove($pos2[0], $pos2[1], 0)
  4429. EndFunc
  4430. Func Login ($i)
  4431. $pos = WinGetPos($handle[$i])
  4432. $pos2 = MouseGetPos()
  4433. If IniRead ("settings.ini", "Settings " &$i, "AccountInput", 4)=1 Then
  4434. MouseMove(IniRead("settings.ini","Global","Border Width", 6)+$pos[0] + (1/2)* ($pos[2]-IniRead("settings.ini","Global","Border Width", 6)*2), IniRead("settings.ini","Global","Title Height",20)+ IniRead("settings.ini","Global","Border Width",6)+$pos[1] + (105/200)*($pos[3]-IniRead("settings.ini","Global","Border Width", 6)*2-IniRead("settings.ini","Global","Title Height",20)), 0)
  4435. _MouseClickPlus($handle[$i], "left", IniRead("settings.ini","Global","Border Width", 6)+$pos[0] + (1/2)* ($pos[2]-IniRead("settings.ini","Global","Border Width", 6)*2), IniRead("settings.ini","Global","Title Height",20)+ IniRead("settings.ini","Global","Border Width",6)+$pos[1] + (105/200)*($pos[3]-IniRead("settings.ini","Global","Border Width", 6)*2-IniRead("settings.ini","Global","Title Height",20)))
  4436. MouseMove($pos2[0], $pos2[1], 0)
  4437. Sleep ("1000")
  4438. ControlSend($handle[$i], "", $handle[$i], "{BACKSPACE 50}")
  4439. ControlSend($handle[$i], "", $handle[$i], "{DEL 50}")
  4440. If StringInStr(IniRead("settings.ini","Settings "&$i, "Account",''), "@")>0 Then
  4441. ControlSend ( $handle[$i], '' , $handle[$i], StringLeft(IniRead("settings.ini","Settings "&$i, "Account",''), StringInStr(IniRead("settings.ini","Settings "&$i, "Account",''), "@")-1))
  4442. Sleep ("200")
  4443. ControlSend ($handle[$i], '' , $handle[$i],"{CTRLDOWN}")
  4444. Sleep ("5000")
  4445. $previousclip=ClipGet()
  4446. Sleep ("100")
  4447. While ClipGet ()<>"@"
  4448. ClipPut ("@")
  4449. WEnd
  4450. ControlSend ( $handle[$i], '' , $handle[$i],"^v")
  4451. Sleep ("100")
  4452. While ClipGet ()<>$previousclip
  4453. ClipPut ($previousclip)
  4454. WEnd
  4455. Sleep ("5000")
  4456. ControlSend ($handle[$i], '' , $handle[$i],"{CTRLUP}")
  4457. Sleep ("200")
  4458. ControlSend ( $handle[$i], '' , $handle[$i],"{BS}")
  4459. ControlSend ( $handle[$i], '' , $handle[$i], StringRight(IniRead("settings.ini","Settings "&$i, "Account",''), StringLen (IniRead("settings.ini","Settings "&$i, "Account",''))-StringInStr(IniRead("settings.ini","Settings "&$i, "Account",''), "@")))
  4460. Else
  4461. ControlSend($handle[$i], "", $handle[$i], IniRead("settings.ini","Settings "&$i, "Account",''))
  4462. EndIf
  4463. Sleep ("1000")
  4464. EndIf
  4465. $pos = WinGetPos($handle[$i])
  4466. $pos2 = MouseGetPos()
  4467. MouseMove(IniRead("settings.ini","Global","Border Width", 6)+$pos[0] + (1/2)* ($pos[2]-IniRead("settings.ini","Global","Border Width", 6)*2), IniRead("settings.ini","Global","Title Height",20)+ IniRead("settings.ini","Global","Border Width",6)+$pos[1] + (123/200)*($pos[3]-IniRead("settings.ini","Global","Border Width", 6)*2-IniRead("settings.ini","Global","Title Height",20)), 0)
  4468. _MouseClickPlus($handle[$i], "left", IniRead("settings.ini","Global","Border Width", 6)+$pos[0] + (1/2)* ($pos[2]-IniRead("settings.ini","Global","Border Width", 6)*2), IniRead("settings.ini","Global","Title Height",20)+ IniRead("settings.ini","Global","Border Width",6)+$pos[1] + (123/200)*($pos[3]-IniRead("settings.ini","Global","Border Width", 6)*2-IniRead("settings.ini","Global","Title Height",20)))
  4469. MouseMove($pos2[0], $pos2[1], 0)
  4470. Sleep ("1000")
  4471. ControlSend($handle[$i], "", $handle[$i], "{BACKSPACE 50}")
  4472. ControlSend($handle[$i], "", $handle[$i], "{DEL 50}")
  4473. ControlSend($handle[$i], "", $handle[$i], IniRead("settings.ini","Settings "&$i, "Password",''))
  4474. Sleep ("1000")
  4475. ControlSend($handle[$i], "", $handle[$i], "{ENTER}")
  4476. $relog[$i]= $relog[$i]+1
  4477. EndFunc
  4478. Func CharSelect ($i)
  4479. If IniRead("settings.ini", "Settings "&$i,"Character",0)=0 Then
  4480. ControlSend($handle[$i], "", $handle[$i], "{ENTER}")
  4481. Else
  4482. $pos = WinGetPos($handle[$i])
  4483. $pos2 = MouseGetPos()
  4484. MouseMove(IniRead("settings.ini","Global","Border Width", 6)+$pos[0] + (170/200)* ($pos[2]-IniRead("settings.ini","Global","Border Width", 6)*2), IniRead("settings.ini","Global","Title Height",20)+ IniRead("settings.ini","Global","Border Width",6)+$pos[1] + ((14/200)+((45/600)*IniRead("settings.ini", "Settings "&$i,"Character",0)))*($pos[3]-IniRead("settings.ini","Global","Border Width", 6)*2-IniRead("settings.ini","Global","Title Height",20)), 0)
  4485. _MouseClickPlus($handle[$i], "left", IniRead("settings.ini","Global","Border Width", 6)+$pos[0] + (170/200)* ($pos[2]-IniRead("settings.ini","Global","Border Width", 6)*2), IniRead("settings.ini","Global","Title Height",20)+ IniRead("settings.ini","Global","Border Width",6)+$pos[1] + ((14/200)+((45/600)*IniRead("settings.ini", "Settings "&$i,"Character",0)))*($pos[3]-IniRead("settings.ini","Global","Border Width", 6)*2-IniRead("settings.ini","Global","Title Height",20)))
  4486. _MouseClickPlus($handle[$i], "left", IniRead("settings.ini","Global","Border Width", 6)+$pos[0] + (170/200)* ($pos[2]-IniRead("settings.ini","Global","Border Width", 6)*2), IniRead("settings.ini","Global","Title Height",20)+ IniRead("settings.ini","Global","Border Width",6)+$pos[1] + ((14/200)+((45/600)*IniRead("settings.ini", "Settings "&$i,"Character",0)))*($pos[3]-IniRead("settings.ini","Global","Border Width", 6)*2-IniRead("settings.ini","Global","Title Height",20)))
  4487. MouseMove($pos2[0], $pos2[1], 0)
  4488. EndIf
  4489. $relogchar[$i]= $relogchar[$i]+1
  4490. Sleep ("30000")
  4491. LoadList ()
  4492. EndFunc
  4493. ; ----------------------------------------------------------------------------
  4494. ; <AUT2EXE INCLUDE-END: C:\Program Files\AutoIt3\Scripts\WoW\Relogger\V1\custom.au3>
  4495. ; ----------------------------------------------------------------------------
  4496. ; ----------------------------------------------------------------------------
  4497. ; <AUT2EXE INCLUDE-START: C:\Program Files\AutoIt3\Scripts\WoW\Relogger\V1\lang.au3>
  4498. ; ----------------------------------------------------------------------------
  4499. Func SetLanguage ()
  4500. If IniRead ("settings.ini", "Global", "Language", 'en')='en' Then
  4501. Global $menu1_ = 'Menu'
  4502. Global $menu2_ = 'Settings'
  4503. Global $statistics_ = 'Statistics'
  4504. Global $cancel_ = 'Cancel'
  4505. Global $ok_ = 'Ok'
  4506. Global $relog_ = 'Relog'
  4507. Global $wow_ = 'WoW'
  4508. Global $start_ = 'Start'
  4509. Global $stop_ = 'Stop'
  4510. Global $edit_ = 'Edit'
  4511. Global $del_ = 'Delete'
  4512. Global $new_ = 'New'
  4513. Global $attach_ = 'Attach'
  4514. Global $refresh_ = 'Refresh'
  4515. Global $startall_ = 'Start All'
  4516. Global $stopall_ = 'Stop All'
  4517. Global $error_ = 'Error'
  4518. Global $fillsettings_ = 'You must fill all the settings !'
  4519. Global $fillnumber_ = 'You must fill the character setting with a number between 0 and 10!'
  4520. Global $name_ = 'Name'
  4521. Global $level_ = 'Level'
  4522. Global $class_ = 'Class'
  4523. Global $screen_ = 'Screen'
  4524. Global $relogslist_ = 'Relogs'
  4525. Global $status_ = 'Status'
  4526. Global $new_ = 'New'
  4527. Global $notattached_ = 'Not Attached'
  4528. Global $attached_ = 'Attached'
  4529. Global $started_ = 'Started'
  4530. Global $notstarted_ = 'Stopped'
  4531. Global $unknown_ = 'Unknown'
  4532. Global $home_ = 'Home'
  4533. Global $char_ = 'Character'
  4534. Global $popup_ = "Disconnected?"
  4535. Global $ig_ = 'In Game'
  4536. Global $relogs_ = 'Maximum Relogs number'
  4537. Global $time_ = 'Maximum Relogs time'
  4538. Global $timeexp_ = 'in hours'
  4539. Global $wowusername_ = 'Username'
  4540. Global $wowpassword_ = 'Password'
  4541. Global $wowchar_ = 'Number'
  4542. Global $wowcharexp_ = 'If you leave 0, it will relog the already selected character'
  4543. Global $wowclass_ = 'Class'
  4544. Global $dk_ = 'Death Knight'
  4545. Global $druid_ = 'Druid'
  4546. Global $hunt_ = 'Hunter'
  4547. Global $mage_ = 'Mage'
  4548. Global $paladin_ = 'Paladin'
  4549. Global $priest_ = 'Priest'
  4550. Global $rogue_ = 'Rogue'
  4551. Global $shaman_ = 'Shaman'
  4552. Global $warlock = 'Warlock'
  4553. Global $war_ = 'Warrior'
  4554. Global $clickonwow_ = 'Click on WoW window'
  4555. Global $failedtoload_ = "Failed to load WoW"
  4556. Global $wowloaded_ = 'WoW has been loaded'
  4557. Global $exit_ = 'Exit'
  4558. Global $options_ = 'Settings'
  4559. Global $credits_ = 'Credits'
  4560. Global $show_ = 'Show'
  4561. Global $lang_ = 'Language'
  4562. Global $fr_ = 'French'
  4563. Global $en_ = 'English'
  4564. Global $langexp_ = "Changes will only take effect at the next start"
  4565. Global $calibrate_ = 'Calibrate'
  4566. Global $calibrateexp_ = 'Calibrate can solve mouse clic issues'
  4567. Global $calibrateexp1_ = 'Launch a new WoW instance which video resolution settings are 800x600. Then attach to that window with the following button :'
  4568. Global $clickonwowcalib_ = 'Click on WoW window whose resolution is 800x600'
  4569. Global $failedtocalib_ = "Failed to calibrate WoW"
  4570. Global $wowcalibrated_ = 'WoW was calibrated'
  4571. Global $borderwidth_ = "Border Width"
  4572. Global $titleheight_ = "Title Height"
  4573. Global $calibrateexp2_ = "If you have negative results or results above 15/30, calibrate again."
  4574. Global $windowsize_ = 'Window Size'
  4575. Global $windowsizeexp_ = 'Number of lines (minimum 3) :'
  4576. Global $reloglogin_ = 'Relogs :'
  4577. Global $relogchar_ = 'Character Selection :'
  4578. Global $rename_ = 'WoW window'
  4579. Global $renameexp_ = 'Rename WoW window'
  4580. Global $windowposexp_ = 'Set window position'
  4581. Global $windowsizeexp_ = 'Set window size'
  4582. Global $move_ = 'Move window'
  4583. Global $move_grid_ = 'Automatic grid'
  4584. Global $move_xy_ = 'Choose XY'
  4585. ElseIf IniRead ("settings.ini", "Global", "Language", 'en')='fr' Then
  4586. Global $menu1_ = 'Menu'
  4587. Global $menu2_ = 'Options'
  4588. Global $statistics_ = 'Statistiques'
  4589. Global $cancel_ = 'Annuler'
  4590. Global $ok_ = 'Ok'
  4591. Global $relog_ = 'Relog'
  4592. Global $wow_ = 'WoW'
  4593. Global $start_ = 'D�marrer'
  4594. Global $stop_ = 'Arr�ter'
  4595. Global $edit_ = 'Editer'
  4596. Global $del_ = 'Supprimer'
  4597. Global $new_ = 'Nouveau'
  4598. Global $attach_ = 'Attacher'
  4599. Global $refresh_ = 'Rafra�chir'
  4600. Global $startall_ = 'Tout D�marrer'
  4601. Global $stopall_ = 'Tout Arr�ter'
  4602. Global $error_ = 'Erreur'
  4603. Global $fillsettings_ = 'Vous devez remplir tous les param�tres !'
  4604. Global $fillnumber_ = 'Vous devez remplir le param�tre personnage avec un nombre entre 0 et 10!'
  4605. Global $name_ = 'Nom'
  4606. Global $level_ = 'Niveau'
  4607. Global $class_ = 'Classe'
  4608. Global $screen_ = 'Ecran'
  4609. Global $relogslist_ = 'Relogs'
  4610. Global $status_ = 'Statut'
  4611. Global $new_ = 'Nouveau'
  4612. Global $notattached_ = 'Non Attach�'
  4613. Global $attached_ = 'Attach�'
  4614. Global $started_ = 'D�marr�'
  4615. Global $notstarted_ = 'Arr�t�'
  4616. Global $unknown_ = 'Inconnu'
  4617. Global $home_ = 'Home'
  4618. Global $char_ = 'Personnage'
  4619. Global $popup_ = "Fen�tre d'erreur"
  4620. Global $ig_ = 'En Jeu'
  4621. Global $relogs_ = 'Nombre de Relogs maximum'
  4622. Global $time_ = 'Temps de Relogs maximum'
  4623. Global $timeexp_ = 'en heures'
  4624. Global $wowusername_ = 'Nom de Compte'
  4625. Global $wowpassword_ = 'Mot de Passe'
  4626. Global $wowchar_ = 'Numero'
  4627. Global $wowcharexp_ = 'Si vous laissez 0, cela reloggera le personnage d�j� s�l�ctionn�'
  4628. Global $wowclass_ = 'Classe'
  4629. Global $dk_ = 'Chevalier de la mort'
  4630. Global $druid_ = 'Druide'
  4631. Global $hunt_ = 'Chasseur'
  4632. Global $mage_ = 'Mage'
  4633. Global $paladin_ = 'Paladin'
  4634. Global $priest_ = 'Pr�tre'
  4635. Global $rogue_ = 'Voleur'
  4636. Global $shaman_ = 'Chaman'
  4637. Global $warlock = 'D�moniste'
  4638. Global $war_ = 'Guerrier'
  4639. Global $clickonwow_ = 'Cliquez sur la fen�tre de WoW'
  4640. Global $failedtoload_ = "WoW n'a pas pu etre charg�"
  4641. Global $wowloaded_ = 'WoW a �t� charg�'
  4642. Global $exit_ = 'Quitter'
  4643. Global $options_ = 'Options'
  4644. Global $credits_ = 'Credits'
  4645. Global $show_ = 'Afficher'
  4646. Global $lang_ = 'Langue'
  4647. Global $fr_ = 'Fran�ais'
  4648. Global $en_ = 'Anglais'
  4649. Global $langexp_ = "Les changements prendront effet au prochain lancement seulement"
  4650. Global $calibrate_ = 'Calibrer'
  4651. Global $calibrateexp_ = 'Calibrer peut resoudre des probl�mes de clics de souris'
  4652. Global $calibrateexp1_ = 'Lancez une nouvelle session de WoW dont les param�tres videos de r�solution sont en 800x600. Puis attachez cette fen�tre avec le bouton suivant :'
  4653. Global $clickonwowcalib_ = 'Cliquez sur la nouvelle fen�tre de WoW de resolution 800x600'
  4654. Global $failedtocalib_ = "WoW n'a pas pu �tre calibr�"
  4655. Global $wowcalibrated_ = 'WoW a �t� calibr�'
  4656. Global $borderwidth_ = "Largeur de bordure"
  4657. Global $titleheight_ = "Hauteur du titre"
  4658. Global $calibrateexp2_ = "Si vous avez des r�sultats negatifs ou superieurs � 15/30, recommencez le calibrage."
  4659. Global $windowsize_ = 'Taille de la fen�tre'
  4660. Global $windowsizeexp_ = 'Nombre de lignes (minimum 3) :'
  4661. Global $reloglogin_ = 'Reconnexions :'
  4662. Global $relogchar_ = 'Selections personnage :'
  4663. Global $rename_ = 'Fen�tre WoW'
  4664. Global $renameexp_ = 'Renommer la fen�tre de WoW'
  4665. Global $windowposexp_ = 'Changer la position de la fen�tre'
  4666. Global $windowsizeexp_ = 'Changer la taille de la fen�tre'
  4667. Global $move_ = 'Positionner la fen�tre'
  4668. Global $move_grid_ = 'Grille automatique'
  4669. Global $move_xy_ = 'Choisir XY'
  4670. EndIf
  4671. EndFunc
  4672. ; ----------------------------------------------------------------------------
  4673. ; <AUT2EXE INCLUDE-END: C:\Program Files\AutoIt3\Scripts\WoW\Relogger\V1\lang.au3>
  4674. ; ----------------------------------------------------------------------------
  4675. SetLanguage ()
  4676. SetPrivilege("SeDebugPrivilege", 1)
  4677. Global $reloggername = 'Relogger'
  4678. Global $version = 'Beta 5'
  4679. Global $class[99] = [0]
  4680. Global $screen[99] = [0]
  4681. Global $popupcount=0
  4682. For $k=1 TO 98
  4683. $status[$k] = $notattached_
  4684. $relog[$k] = 0
  4685. $relogchar[$k] = 0
  4686. $class[$k] = IniRead ("settings.ini", "Settings "&$k, "Class", "")
  4687. Next
  4688. Opt("GUIOnEventMode", 1)
  4689. Opt("TrayOnEventMode", 1)
  4690. Opt("TrayMenuMode",1)
  4691. $showitem = TrayCreateItem($show_ & " ")
  4692. $startallitem = TrayCreateItem($startall_&" ")
  4693. $stopallitem = TrayCreateItem($stopall_&" ")
  4694. $exititem = TrayCreateItem($exit_&" ")
  4695. TrayItemSetOnEvent ( $startallitem, "StartAll" )
  4696. TrayItemSetOnEvent ( $stopallitem, "StopAll" )
  4697. TrayItemSetOnEvent ( $exititem , "itemexit" )
  4698. TrayItemSetOnEvent ( $showitem , "maximize" )
  4699. TraySetOnEvent($TRAY_EVENT_PRIMARYDOUBLE, "maximize")
  4700. SetPrivilege("SeDebugPrivilege", 1)
  4701. CreateGUI()
  4702. While 1
  4703. CheckAttach ()
  4704. GetScreens ()
  4705. LoadList ()
  4706. UpdateStats ()
  4707. Sleep ("2000")
  4708. For $k=1 To IniRead ("settings.ini", "Global", "Number", 0)
  4709. If $started[$k]=1 And $relog[$k]<IniRead ("settings.ini", "Settings "&$k, "Relogs",0) And TimerDiff ($timer[$k])<IniRead("settings.ini", "Settings "&$k, "Time", 0)*60*60*1000 Then
  4710. Switch $screen[$k]
  4711. Case $home_
  4712. ClearPopup ($k)
  4713. Sleep ("3000")
  4714. Login ($k)
  4715. Case $char_
  4716. Charselect ($k)
  4717. Case $popup_
  4718. ClearPopup ($k)
  4719. Sleep ("3000")
  4720. Login ($k)
  4721. Case $ig_
  4722. GetChar ($k)
  4723. $popupcount = 0
  4724. EndSwitch
  4725. Else
  4726. $started[$k]=0
  4727. $status[$k]=$notstarted_
  4728. EndIf
  4729. Next
  4730. Sleep ("6000")
  4731. WEnd
  4732. ; ----------------------------------------------------------------------------
  4733. ; <AUT2EXE INCLUDE-END: C:\Program Files\AutoIt3\Scripts\WoW\Relogger\V1\Core.au3>
  4734. ; ----------------------------------------------------------------------------
  4735.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement