Sign in to follow this  
Followers 0
rvn

CompInfo UDF unique hardware id?

22 posts in this topic

#1 ·  Posted (edited)

Im experimenting something right now with UDF...

From the hardware section, Is there any unique id, that "really unique" for that hardware it self?

Simple question,, just curious :P

thanx btw :)

Edited by rvn

Share this post


Link to post
Share on other sites



Im trying to find out about that too. Maybe serial number?

Share this post


Link to post
Share on other sites

Nice to hear that Edgaras :)

The candidate, something like "serial number" and "id" ofcourse :)

Look like no body know,,, then the only way "Test it in multiple computer"...

Ok,,, let see... i got 1 pc n 1 notebook...

Share this post


Link to post
Share on other sites

If you want to have an unique hardware ID, use WinAPIEx and _WinAPI_UniqueHardwareID()

1 person likes this

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Thanx for the sugestion johnmcloud, apreciate it :)

Ive check the URL and test it... Anvanced UDF there,,, really amazing :)

First time using that _WinAPI_UniqueHardwareID, and still not sure thats "really unique" feature... Must test it or maybe someone already test it.

Still curious,,, and thanx for all btw :)

Edited by rvn

Share this post


Link to post
Share on other sites

I already tried _WinAPI_UniqueHardwareID but what I get is bunch of errors from include files

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Well no error for me, try example from help file...

Post error log please :)

Edited by rvn

Share this post


Link to post
Share on other sites

C:Program FilesAutoIt3IncludeAPIConstants.au3(38,40) : ERROR: $READ_CONTROL previously declared as a 'Const'.
Global Const $READ_CONTROL = 0x00020000
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(39,37) : ERROR: $WRITE_DAC previously declared as a 'Const'.
Global Const $WRITE_DAC = 0x00040000
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(40,39) : ERROR: $WRITE_OWNER previously declared as a 'Const'.
Global Const $WRITE_OWNER = 0x00080000
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(41,39) : ERROR: $SYNCHRONIZE previously declared as a 'Const'.
Global Const $SYNCHRONIZE = 0x00100000
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(44,106) : ERROR: $STANDARD_RIGHTS_ALL previously declared as a 'Const'.
Global Const $STANDARD_RIGHTS_ALL = BitOR($DELETE, $READ_CONTROL, $SYNCHRONIZE, $WRITE_DAC, $WRITE_OWNER)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(45,54) : ERROR: $STANDARD_RIGHTS_EXECUTE previously declared as a 'Const'.
Global Const $STANDARD_RIGHTS_EXECUTE = $READ_CONTROL
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(46,51) : ERROR: $STANDARD_RIGHTS_READ previously declared as a 'Const'.
Global Const $STANDARD_RIGHTS_READ = $READ_CONTROL
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(47,97) : ERROR: $STANDARD_RIGHTS_REQUIRED previously declared as a 'Const'.
Global Const $STANDARD_RIGHTS_REQUIRED = BitOR($DELETE, $READ_CONTROL, $WRITE_DAC, $WRITE_OWNER)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(48,52) : ERROR: $STANDARD_RIGHTS_WRITE previously declared as a 'Const'.
Global Const $STANDARD_RIGHTS_WRITE = $READ_CONTROL
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(185,42) : ERROR: $WM_QUERYENDSESSION previously declared as a 'Const'.
Global Const $WM_QUERYENDSESSION = 0x0011
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(187,36) : ERROR: $WM_QUERYOPEN previously declared as a 'Const'.
Global Const $WM_QUERYOPEN = 0x0013
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(190,37) : ERROR: $WM_ENDSESSION previously declared as a 'Const'.
Global Const $WM_ENDSESSION = 0x0016
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(194,40) : ERROR: $WM_SETTINGCHANGE previously declared as a 'Const'.
Global Const $WM_SETTINGCHANGE = 0x001A
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(291,40) : ERROR: $WM_NCXBUTTONDOWN previously declared as a 'Const'.
Global Const $WM_NCXBUTTONDOWN = 0x00AB
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(292,38) : ERROR: $WM_NCXBUTTONUP previously declared as a 'Const'.
Global Const $WM_NCXBUTTONUP = 0x00AC
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(293,42) : ERROR: $WM_NCXBUTTONDBLCLK previously declared as a 'Const'.
Global Const $WM_NCXBUTTONDBLCLK = 0x00AD
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(307,34) : ERROR: $WM_UNICHAR previously declared as a 'Const'.
Global Const $WM_UNICHAR = 0x0109
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(311,47) : ERROR: $WM_IME_STARTCOMPOSITION previously declared as a 'Const'.
Global Const $WM_IME_STARTCOMPOSITION = 0x010D
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(312,45) : ERROR: $WM_IME_ENDCOMPOSITION previously declared as a 'Const'.
Global Const $WM_IME_ENDCOMPOSITION = 0x010E
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(313,42) : ERROR: $WM_IME_COMPOSITION previously declared as a 'Const'.
Global Const $WM_IME_COMPOSITION = 0x010F
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(352,40) : ERROR: $WM_RBUTTONDBLCLK previously declared as a 'Const'.
Global Const $WM_RBUTTONDBLCLK = 0x0206
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(355,40) : ERROR: $WM_MBUTTONDBLCLK previously declared as a 'Const'.
Global Const $WM_MBUTTONDBLCLK = 0x0209
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(361,39) : ERROR: $WM_PARENTNOTIFY previously declared as a 'Const'.
Global Const $WM_PARENTNOTIFY = 0x0210
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(362,40) : ERROR: $WM_ENTERMENULOOP previously declared as a 'Const'.
Global Const $WM_ENTERMENULOOP = 0x0211
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(363,39) : ERROR: $WM_EXITMENULOOP previously declared as a 'Const'.
Global Const $WM_EXITMENULOOP = 0x0212
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(364,35) : ERROR: $WM_NEXTMENU previously declared as a 'Const'.
Global Const $WM_NEXTMENU = 0x0213
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(366,41) : ERROR: $WM_CAPTURECHANGED previously declared as a 'Const'.
Global Const $WM_CAPTURECHANGED = 0x0215
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(367,33) : ERROR: $WM_MOVING previously declared as a 'Const'.
Global Const $WM_MOVING = 0x0216
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(368,41) : ERROR: $WM_POWERBROADCAST previously declared as a 'Const'.
Global Const $WM_POWERBROADCAST = 0x0218
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(369,39) : ERROR: $WM_DEVICECHANGE previously declared as a 'Const'.
Global Const $WM_DEVICECHANGE = 0x0219
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(370,36) : ERROR: $WM_MDICREATE previously declared as a 'Const'.
Global Const $WM_MDICREATE = 0x0220
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(371,37) : ERROR: $WM_MDIDESTROY previously declared as a 'Const'.
Global Const $WM_MDIDESTROY = 0x0221
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(372,38) : ERROR: $WM_MDIACTIVATE previously declared as a 'Const'.
Global Const $WM_MDIACTIVATE = 0x0222
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(373,37) : ERROR: $WM_MDIRESTORE previously declared as a 'Const'.
Global Const $WM_MDIRESTORE = 0x0223
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(374,34) : ERROR: $WM_MDINEXT previously declared as a 'Const'.
Global Const $WM_MDINEXT = 0x0224
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(375,38) : ERROR: $WM_MDIMAXIMIZE previously declared as a 'Const'.
Global Const $WM_MDIMAXIMIZE = 0x0225
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(376,34) : ERROR: $WM_MDITILE previously declared as a 'Const'.
Global Const $WM_MDITILE = 0x0226
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(377,37) : ERROR: $WM_MDICASCADE previously declared as a 'Const'.
Global Const $WM_MDICASCADE = 0x0227
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(378,41) : ERROR: $WM_MDIICONARRANGE previously declared as a 'Const'.
Global Const $WM_MDIICONARRANGE = 0x0228
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(379,39) : ERROR: $WM_MDIGETACTIVE previously declared as a 'Const'.
Global Const $WM_MDIGETACTIVE = 0x0229
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(386,37) : ERROR: $WM_MDISETMENU previously declared as a 'Const'.
Global Const $WM_MDISETMENU = 0x0230
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(387,40) : ERROR: $WM_ENTERSIZEMOVE previously declared as a 'Const'.
Global Const $WM_ENTERSIZEMOVE = 0x0231
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(388,39) : ERROR: $WM_EXITSIZEMOVE previously declared as a 'Const'.
Global Const $WM_EXITSIZEMOVE = 0x0232
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(389,36) : ERROR: $WM_DROPFILES previously declared as a 'Const'.
Global Const $WM_DROPFILES = 0x0233
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(390,41) : ERROR: $WM_MDIREFRESHMENU previously declared as a 'Const'.
Global Const $WM_MDIREFRESHMENU = 0x0234
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(392,41) : ERROR: $WM_IME_SETCONTEXT previously declared as a 'Const'.
Global Const $WM_IME_SETCONTEXT = 0x0281
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(393,37) : ERROR: $WM_IME_NOTIFY previously declared as a 'Const'.
Global Const $WM_IME_NOTIFY = 0x0282
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(394,38) : ERROR: $WM_IME_CONTROL previously declared as a 'Const'.
Global Const $WM_IME_CONTROL = 0x0283
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(395,46) : ERROR: $WM_IME_COMPOSITIONFULL previously declared as a 'Const'.
Global Const $WM_IME_COMPOSITIONFULL = 0x0284
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(396,37) : ERROR: $WM_IME_SELECT previously declared as a 'Const'.
Global Const $WM_IME_SELECT = 0x0285
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(397,35) : ERROR: $WM_IME_CHAR previously declared as a 'Const'.
Global Const $WM_IME_CHAR = 0x0286
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(399,38) : ERROR: $WM_IME_REQUEST previously declared as a 'Const'.
Global Const $WM_IME_REQUEST = 0x0288
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(400,38) : ERROR: $WM_IME_KEYDOWN previously declared as a 'Const'.
Global Const $WM_IME_KEYDOWN = 0x0290
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(401,36) : ERROR: $WM_IME_KEYUP previously declared as a 'Const'.
Global Const $WM_IME_KEYUP = 0x0291
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(402,39) : ERROR: $WM_NCMOUSEHOVER previously declared as a 'Const'.
Global Const $WM_NCMOUSEHOVER = 0x02A0
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(403,37) : ERROR: $WM_MOUSEHOVER previously declared as a 'Const'.
Global Const $WM_MOUSEHOVER = 0x02A1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(404,39) : ERROR: $WM_NCMOUSELEAVE previously declared as a 'Const'.
Global Const $WM_NCMOUSELEAVE = 0x02A2
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(405,37) : ERROR: $WM_MOUSELEAVE previously declared as a 'Const'.
Global Const $WM_MOUSELEAVE = 0x02A3
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(406,44) : ERROR: $WM_WTSSESSION_CHANGE previously declared as a 'Const'.
Global Const $WM_WTSSESSION_CHANGE = 0x02B1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(407,39) : ERROR: $WM_TABLET_FIRST previously declared as a 'Const'.
Global Const $WM_TABLET_FIRST = 0x02C0
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(408,38) : ERROR: $WM_TABLET_LAST previously declared as a 'Const'.
Global Const $WM_TABLET_LAST = 0x02DF
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(424,42) : ERROR: $WM_QUERYNEWPALETTE previously declared as a 'Const'.
Global Const $WM_QUERYNEWPALETTE = 0x030F
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(425,44) : ERROR: $WM_PALETTEISCHANGING previously declared as a 'Const'.
Global Const $WM_PALETTEISCHANGING = 0x0310
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(426,41) : ERROR: $WM_PALETTECHANGED previously declared as a 'Const'.
Global Const $WM_PALETTECHANGED = 0x0311
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(427,33) : ERROR: $WM_HOTKEY previously declared as a 'Const'.
Global Const $WM_HOTKEY = 0x0312
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(432,32) : ERROR: $WM_PRINT previously declared as a 'Const'.
Global Const $WM_PRINT = 0x0317
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(433,38) : ERROR: $WM_PRINTCLIENT previously declared as a 'Const'.
Global Const $WM_PRINTCLIENT = 0x0318
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(434,37) : ERROR: $WM_APPCOMMAND previously declared as a 'Const'.
Global Const $WM_APPCOMMAND = 0x0319
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(435,39) : ERROR: $WM_THEMECHANGED previously declared as a 'Const'.
Global Const $WM_THEMECHANGED = 0x031A
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(456,40) : ERROR: $WM_HANDHELDFIRST previously declared as a 'Const'.
Global Const $WM_HANDHELDFIRST = 0x0358
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(457,39) : ERROR: $WM_HANDHELDLAST previously declared as a 'Const'.
Global Const $WM_HANDHELDLAST = 0x035F
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(458,35) : ERROR: $WM_AFXFIRST previously declared as a 'Const'.
Global Const $WM_AFXFIRST = 0x0360
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(459,34) : ERROR: $WM_AFXLAST previously declared as a 'Const'.
Global Const $WM_AFXLAST = 0x037F
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(460,38) : ERROR: $WM_PENWINFIRST previously declared as a 'Const'.
Global Const $WM_PENWINFIRST = 0x0380
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(461,37) : ERROR: $WM_PENWINLAST previously declared as a 'Const'.
Global Const $WM_PENWINLAST = 0x038F
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(1424,40) : ERROR: $LOGON_WITH_PROFILE previously declared as a 'Const'.
Global Const $LOGON_WITH_PROFILE = 0x01
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(1425,47) : ERROR: $LOGON_NETCREDENTIALS_ONLY previously declared as a 'Const'.
Global Const $LOGON_NETCREDENTIALS_ONLY = 0x02
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(1823,36) : ERROR: $SecurityAnonymous previously declared as a 'Const'.
Global Const $SecurityAnonymous = 0
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(1824,41) : ERROR: $SecurityIdentification previously declared as a 'Const'.
Global Const $SecurityIdentification = 1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(1825,40) : ERROR: $SecurityImpersonation previously declared as a 'Const'.
Global Const $SecurityImpersonation = 2
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(1826,37) : ERROR: $SecurityDelegation previously declared as a 'Const'.
Global Const $SecurityDelegation = 3
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(1828,31) : ERROR: $TokenPrimary previously declared as a 'Const'.
Global Const $TokenPrimary = 1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(1829,37) : ERROR: $TokenImpersonation previously declared as a 'Const'.
Global Const $TokenImpersonation = 2
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(3354,55) : ERROR: $TOKEN_EXECUTE previously declared as a 'Const'.
Global Const $TOKEN_EXECUTE = $STANDARD_RIGHTS_EXECUTE
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(3358,70) : ERROR: $TOKEN_READ previously declared as a 'Const'.
Global Const $TOKEN_READ = BitOR($STANDARD_RIGHTS_READ, $TOKEN_QUERY)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(3359,129) : ERROR: $TOKEN_WRITE previously declared as a 'Const'.
Global Const $TOKEN_WRITE = BitOR($STANDARD_RIGHTS_WRITE, $TOKEN_ADJUST_DEFAULT, $TOKEN_ADJUST_GROUPS, $TOKEN_ADJUST_PRIVILEGES)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\APIConstants.au3(3360,274) : ERROR: $TOKEN_ALL_ACCESS previously declared as a 'Const'.
Global Const $TOKEN_ALL_ACCESS = BitOR($STANDARD_RIGHTS_REQUIRED, $TOKEN_ADJUST_DEFAULT, $TOKEN_ADJUST_GROUPS, $TOKEN_ADJUST_PRIVILEGES, $TOKEN_ADJUST_SESSIONID, $TOKEN_ASSIGN_PRIMARY, $TOKEN_DUPLICATE, $TOKEN_EXECUTE, $TOKEN_IMPERSONATE, $TOKEN_QUERY, $TOKEN_QUERY_SOURCE)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\WinAPI.au3(159,38) : ERROR: $TMPF_FIXED_PITCH previously declared as a 'Const'.
Global Const $TMPF_FIXED_PITCH = 0x01
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\WinAPI.au3(160,33) : ERROR: $TMPF_VECTOR previously declared as a 'Const'.
Global Const $TMPF_VECTOR = 0x02
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\WinAPI.au3(161,35) : ERROR: $TMPF_TRUETYPE previously declared as a 'Const'.
Global Const $TMPF_TRUETYPE = 0x04
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\WinAPI.au3(162,33) : ERROR: $TMPF_DEVICE previously declared as a 'Const'.
Global Const $TMPF_DEVICE = 0x08
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\WinAPI.au3(165,50) : ERROR: $DUPLICATE_CLOSE_SOURCE previously declared as a 'Const'.
Global Const $DUPLICATE_CLOSE_SOURCE = 0x00000001
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\WinAPI.au3(166,49) : ERROR: $DUPLICATE_SAME_ACCESS previously declared as a 'Const'.
Global Const $DUPLICATE_SAME_ACCESS = 0x00000002
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\WinAPIEx.au3(1044,399) : ERROR: $tagTEXTMETRIC previously declared as a 'Const'.
Global Const $tagTEXTMETRIC = 'long tmHeight;long tmAscent;long tmDescent;long tmInternalLeading;long tmExternalLeading;long tmAveCharWidth;long tmMaxCharWidth;long tmWeight;long tmOverhang;long tmDigitizedAspectX;long tmDigitizedAspectY;wchar tmFirstChar;wchar tmLastChar;wchar tmDefaultChar;wchar tmBreakChar;byte tmItalic;byte tmUnderlined;byte tmStruckOut;byte tmPitchAndFamily;byte tmCharSet;'
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\WinAPIEx.au3(8108,104) : ERROR: _WinAPI_DuplicateHandle() already defined.
Func _WinAPI_DuplicateHandle($hProcess, $hSource, $hTarget, $iAccess = 0, $iOptions = 2, $fInherit = 0)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\WinAPIEx.au3(18069,34) : ERROR: _WinAPI_GetTextMetrics() already defined.
Func _WinAPI_GetTextMetrics($hDC)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:Documents and SettingsManoDesktopAutoitwinAPIExtest.au3 - 96 error(s), 0 warning(s)

Share this post


Link to post
Share on other sites

Try include APIConstants.au3 first, before WinAPIEx.au3...

#Include <APIConstants.au3>

#Include <WinAPIEx.au3>

Share this post


Link to post
Share on other sites

Still 96 error(s), 0 warning(s) lol

Share this post


Link to post
Share on other sites

What version of APIConstants and WinAPIEx are you using?


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

Looks like you're including the constants file more than once. That's why you're getting the "previously declared as 'Const'" errors.


Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".

Share this post


Link to post
Share on other sites

Looks like you're including the constants file more than once. That's why you're getting the "previously declared as 'Const'" errors.

That shouldn't matter, because both have the #include-once line in them. It is more likely he has more than one copy of them in more than one location that might be causing issues. Or he's using different versions than are currently posted.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

Make sure you are using the latest release version of autoit3

My autoit is latest version as i downloaded it for my pc last week.

I dont know about icludes. Maybe any1 can try to send me copied code from includes which you have?

Share this post


Link to post
Share on other sites

Did you download the right version of WinAPIEx? Probably not. If you have AutoIt V3.3.8.1 then you need WinAPIEx for V3.3.8.1.


_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

Open the WinAPIEX.au3 file and the APIConstants .au3 file and look at the header, there's a version number in both of them. If they aren't 3.7 or above, upgrade by downloading the latest version from the link above. Neither of those are included in the standard AutoIt downloads, but are in the Beta downloads.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

#18 ·  Posted (edited)

@Edgaras if u dont mind, please post your script,,, let the others help u :)

Try this "compile", check "Add required constant...", click button "Save Only"...

Edited by rvn

Share this post


Link to post
Share on other sites

Open the WinAPIEX.au3 file and the APIConstants .au3 file and look at the header, there's a version number in both of them. If they aren't 3.7 or above, upgrade by downloading the latest version from the link above. Neither of those are included in the standard AutoIt downloads, but are in the Beta downloads.

Both are Version: 3.8 / 3.3.6.1

Share this post


Link to post
Share on other sites

Use version 3.8 for AutoIt 3.3.8.x instead, the constants that cause the issue in the 3.3.6.1 version have been commented out in the other version, or just comment them out yourself.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Similar Content

    • BrewManNH
      By BrewManNH
      The function _ArrayUnique in the Array UDF has some serious design flaws in it, not to mention it's incredibly slow. This is a rewrite of that function. Practically nothing from the original function has remained.
      This version...
      doesn't rely upon using _ArrayAdd, not using that shaved 4 seconds off when using this with a 4100+ row array. has extensive bounds checking on all parameters of the function, something the original didn't do at all. streamlines the error checking process so it returns quicker when something sent to it isn't set correctly, all done at the top of the function doesn't use Dim eliminates the $vDelim parameter, which even the documentation says about it, "However, cannot forsee its usefullness" adds the ability to return a 2D array if sent a 2D array, and the $bReturn2 parameter is set to true. This will search the column requested, finding any duplicated entries, removing those duplicate entries, but returning all the rows that were found first. I don't know if anyone will find any use for this part of the function, but it was surprisingly easy to implement it, so I figured I'd leave it in. This version is approximately 50 - 80% faster than the original, and won't crash your script if you send it the wrong values in the parameters. Please play around with this to see if you can break it, or improve it. There is an example script inside the archive that uses the MusicList file as input. The MusicList file is just a text file with 4104 lines and 6 columns, try running the new and original versions using the 6th column as a search and see the difference in execution time.
      Returning a 2D array on a large array is going to take a lot longer than just returning a single dimension of the array. Using it on the 6th column of this array is still faster than returning a 1D array using the original function.
      __ArrayUnique.zip
    • czardas
      By czardas
      After some insightful input by kylomas in >this topic, I decided to make a general resusable function using the same ideas. It handles up to 24 arrays. Zero based arrays go in, and the target array is returned ByRef. Before passing arrays to this function, you need to delete element 0 if it contains the item count; and you need to use Ubound to get the new size of the target array after using the function. If processing large arrays it is a good idea to delete the arrays you no longer need after the concatenation.
      The function returns the number of removed duplicates. Set case sensitivity using the second parameter 0 = case insensitive, 1 = case sensitive.
      ;
      Func _ArrayUniqueConcatenate(ByRef $aTarget, $iCasesense = 0, _ ; up to 23 more arrays can be included     $a0 = 0, $a1 = 0, $a2 = 0, $a3 = 0, $a4 = 0, $a5 = 0, $a6 = 0, $a7 = 0, $a8 = 0, $a9 = 0, $a10 = 0, $a11 = 0, _     $a12 = 0, $a13 = 0, $a14 = 0, $a15 = 0, $a16 = 0, $a17 = 0, $a18 = 0, $a19 = 0, $a20 = 0, $a21 = 0, $a22 = 0)     #forceref $a0, $a1, $a2, $a3, $a4, $a5, $a6, $a7, $a8, $a9, $a10, $a11, $a12, $a13, $a14, $a15, $a16, $a17, $a18, $a19, $a20, $a21, $a22     If Not IsArray($aTarget) Or UBound($aTarget, 0) <> 1 Then Return SetError(1)     Local $iTotalSize = UBound($aTarget), $iItems = 0, $tVarName     If $iCasesense Then         For $i = 0 To $iTotalSize -1             $tVarName = "_" & StringToBinary($aTarget[$i], 2)             If IsDeclared($tVarName) = -1 Then ContinueLoop             Assign($tVarName, "", 1)             $aTarget[$iItems] = $aTarget[$i]             $iItems += 1         Next     Else         For $i = 0 To $iTotalSize -1             $tVarName = "_" & StringToBinary(StringLower($aTarget[$i]), 2)             If IsDeclared($tVarName) = -1 Then ContinueLoop             Assign($tVarName, "", 1)             $aTarget[$iItems] = $aTarget[$i]             $iItems += 1         Next     EndIf     Local $iParams = @NumParams     If $iParams > 2 Then         Local $aNextArray, $iBound         For $i = 0 To $iParams -3             $aNextArray = Eval('a' & $i)             If Not IsArray($aNextArray) Or UBound($aNextArray, 0) <> 1 Then Return SetError(2, $i +3) ; Sets @Extended to the parameter which failed             $iBound = UBound($aNextArray)             $iTotalSize += $iBound             ReDim $aTarget[$iItems + $iBound]             If $iCasesense Then                 For $j = 0 To $iBound -1                     $tVarName = "_" & StringToBinary($aNextArray[$j], 2)                     If IsDeclared($tVarName) = -1 Then ContinueLoop                     Assign($tVarName, "", 1)                     $aTarget[$iItems] = $aNextArray[$j]                     $iItems += 1                 Next             Else                 For $j = 0 To $iBound -1                     $tVarName = "_" & StringToBinary(StringLower($aNextArray[$j]), 2)                     If IsDeclared($tVarName) = -1 Then ContinueLoop                     Assign($tVarName, "", 1)                     $aTarget[$iItems] = $aNextArray[$j]                     $iItems += 1                 Next             EndIf             Execute('_FreeMemory($a' & $i & ')')         Next     EndIf     ReDim $aTarget[$iItems]     Return $iTotalSize - $iItems ; Return the number of duplicates removed EndFunc ; _ArrayUniqueConcatenate Func _FreeMemory(ByRef $vParam)     $vParam = 0 EndFunc ;
      In the following test, after randomly filling 24 arrays of 50000 elements (each with 2 ascii characters),  the function searches (case insensitive) through 1200000 elements removing all duplicates in just a few seconds. Filling the arrays takes a few seconds to begin with (watch the SciTE console). It should hit the expected limit of 38416 possible 2 case insensitive character combinations and remove 1161584 duplicates. It takes about 13 12 seconds on my machine. Also works with unicode.
      ;
      #include <Array.au3> #include <String.au3> Global $a1[50000], $a2[50000], $a3[50000], $a4[50000], $a5[50000], $a6[50000], $a7[50000], $a8[50000], _ $a9[50000], $a10[50000], $a11[50000], $a12[50000], $a13[50000], $a14[50000], $a15[50000], $a16[50000], _ $a17[50000], $a18[50000], $a19[50000], $a20[50000], $a21[50000], $a22[50000], $a23[50000], $a24[50000] ConsoleWrite("Populating Arrays" & @LF) For $i = 1 To 24     Execute('_Fill($a' & $i & ')') Next ConsoleWrite("Starting Timer" & @LF) Local $iTimer = TimerInit() Local $ret = _ArrayUniqueConcatenate($a1, 0, $a2, $a3, $a4, $a5, $a6, $a7, $a8, $a9, $a10, $a11, $a12, $a13, $a14, $a15, $a16, $a17, $a18, $a19, $a20, $a21, $a22, $a23, $a24) ConsoleWrite("Error = " & @error & @lf & "Seconds = " & TimerDiff($iTimer)/1000 & @LF & "Unique Items = " & UBound($a1) & @LF & "Duplicates removed = " & $ret & @LF) For $i = 2 To 24     Execute('_FreeMemory($a' & $i & ')') Next _ArrayDisplay($a1) Func _FreeMemory(ByRef $vParam)     $vParam = 0 EndFunc Func _Fill(ByRef $aArray)     For $i = 0 To UBound($aArray) -1         $aArray[$i] = _HexToString(_RandomHexStr(4))     Next EndFunc Func _RandomHexStr($sLen)     Local $sHexString = ""     For $i = 1 To $sLen         $sHexString &= StringRight(Hex(Random(0, 15, 1)), 1)     Next     Return $sHexString EndFunc ;==> _RandomHexStr Func _ArrayUniqueConcatenate(ByRef $aTarget, $iCasesense = 0, _ ; up to 23 more arrays can be included     $a0 = 0, $a1 = 0, $a2 = 0, $a3 = 0, $a4 = 0, $a5 = 0, $a6 = 0, $a7 = 0, $a8 = 0, $a9 = 0, $a10 = 0, $a11 = 0, _     $a12 = 0, $a13 = 0, $a14 = 0, $a15 = 0, $a16 = 0, $a17 = 0, $a18 = 0, $a19 = 0, $a20 = 0, $a21 = 0, $a22 = 0)     #forceref $a0, $a1, $a2, $a3, $a4, $a5, $a6, $a7, $a8, $a9, $a10, $a11, $a12, $a13, $a14, $a15, $a16, $a17, $a18, $a19, $a20, $a21, $a22     If Not IsArray($aTarget) Or UBound($aTarget, 0) <> 1 Then Return SetError(1)     Local $iTotalSize = UBound($aTarget), $iItems = 0, $tVarName     If $iCasesense Then         For $i = 0 To $iTotalSize -1             $tVarName = "_" & StringToBinary($aTarget[$i], 2)             If IsDeclared($tVarName) = -1 Then ContinueLoop             Assign($tVarName, "", 1)             $aTarget[$iItems] = $aTarget[$i]             $iItems += 1         Next     Else         For $i = 0 To $iTotalSize -1             $tVarName = "_" & StringToBinary(StringLower($aTarget[$i]), 2)             If IsDeclared($tVarName) = -1 Then ContinueLoop             Assign($tVarName, "", 1)             $aTarget[$iItems] = $aTarget[$i]             $iItems += 1         Next     EndIf     Local $iParams = @NumParams     If $iParams > 2 Then         Local $aNextArray, $iBound         For $i = 0 To $iParams -3             $aNextArray = Eval('a' & $i)             If Not IsArray($aNextArray) Or UBound($aNextArray, 0) <> 1 Then Return SetError(2, $i +3) ; Sets @Extended to the parameter which failed             $iBound = UBound($aNextArray)             $iTotalSize += $iBound             ReDim $aTarget[$iItems + $iBound]             If $iCasesense Then                 For $j = 0 To $iBound -1                     $tVarName = "_" & StringToBinary($aNextArray[$j], 2)                     If IsDeclared($tVarName) = -1 Then ContinueLoop                     Assign($tVarName, "", 1)                     $aTarget[$iItems] = $aNextArray[$j]                     $iItems += 1                 Next             Else                 For $j = 0 To $iBound -1                     $tVarName = "_" & StringToBinary(StringLower($aNextArray[$j]), 2)                     If IsDeclared($tVarName) = -1 Then ContinueLoop                     Assign($tVarName, "", 1)                     $aTarget[$iItems] = $aNextArray[$j]                     $iItems += 1                 Next             EndIf             Execute('_FreeMemory($a' & $i & ')')         Next     EndIf     ReDim $aTarget[$iItems]     Return $iTotalSize - $iItems ; Return the number of duplicates removed EndFunc ; _ArrayUniqueConcatenate
    • Command3r
      By Command3r
      Hello i have made a text contains "1000 porn site" and most of sites are repeated, i wanted to read the file and search for repeated sites and delete them "but keep 1 " i just want to know how many sites have i collected cause i want to block them in my computer.

      is it possible?

      All helps are appreciated.