Popular Post funkey Posted May 11, 2012 Popular Post Share Posted May 11, 2012 (edited) Hello,I just added a few scripts together to get a function for creating a resource dll. You can add icons und pictures to the library for now.I hope you like it.expandcollapse popup#include <WinAPIEx.au3> #include <Array.au3> #include <APIConstants.au3> #include <GDIPlus.au3> #include <Memory.au3> #include <StaticConstants.au3> Global $sDLL = @ScriptDir & "Resourcen.dll" Global $sTempFile, $aFiles[1] Global Const $tagICONDIRENTRY = "BYTE bWidth;BYTE bHeight;BYTE bColorCount;BYTE bReserved;WORD wPlanes;WORD wBitCount;DWORD dwBytesInRes;DWORD dwImageOffset" Global Const $tagGRPICONDIRENTRY = "BYTE bWidth;BYTE bHeight;BYTE bColorCount;BYTE bReserved;WORD wPlanes;WORD wBitCount;DWORD dwBytesInRes;WORD nID" Global Const $SS_REALSIZECONTROL = 0x40 While 1 $sTempFile = FileOpenDialog("Select resource files", @ScriptDir, "All files (*.*)|Icons (*.ico)|Bitmaps (*.bmp)", 3) If @error Then ExitLoop If $aFiles[0] = "" Then $aFiles[0] = $sTempFile Else _ArrayAdd($aFiles, $sTempFile) EndIf WEnd _CreateResourceDLL($sDLL, $aFiles) Global $aIcon = _ArrayFindAll($aFiles, ".ico", 0, 0, 0, 1, 0) Global $aBitmap = _ArrayFindAll($aFiles, ".bmp", 0, 0, 0, 1, 0) Global $aJpg = _ArrayFindAll($aFiles, ".jpg", 0, 0, 0, 1, 0) GUICreate("Resource DLL", 800, 800) If IsArray($aIcon) Then For $i = 0 To UBound($aIcon) - 1 GUICtrlCreateIcon($sDLL, $aFiles[$aIcon[$i]], 10, 10 + 40 * $i, 32, 32, $SS_SUNKEN) GUICtrlCreateLabel($aFiles[$aIcon[$i]], 50, 10 + 40 * $i, 120, 32, $SS_CENTERIMAGE) Next EndIf If IsArray($aBitmap) Then For $i = 0 To UBound($aBitmap) - 1 GUICtrlCreatePic("", 200, 30 + 120 * $i, 100, 100, BitOR($SS_REALSIZECONTROL, $SS_SUNKEN)) _SetImagefromResource(-1, $aFiles[$aBitmap[$i]], $sDLL, $RT_BITMAP) GUICtrlCreatePic("", 310, 30 + 120 * $i, 100, 100, BitOR($SS_CENTERIMAGE, $SS_SUNKEN)) _SetImagefromResource(-1, $aFiles[$aBitmap[$i]], $sDLL, $RT_BITMAP) GUICtrlCreateLabel($aFiles[$aBitmap[$i]], 200, 10 + 120 * $i, 120, 20, 0x200) Next EndIf If IsArray($aJpg) Then For $i = 0 To UBound($aJpg) - 1 GUICtrlCreatePic("", 440, 30 + 120 * $i, 100, 100, BitOR($SS_REALSIZECONTROL, $SS_SUNKEN)) _SetImagefromResource(-1, $aFiles[$aJpg[$i]], $sDLL, $RT_RCDATA) GUICtrlCreatePic("", 550, 30 + 120 * $i, 100, 100, BitOR($SS_CENTERIMAGE, $SS_SUNKEN)) _SetImagefromResource(-1, $aFiles[$aJpg[$i]], $sDLL, $RT_RCDATA) GUICtrlCreateLabel($aFiles[$aJpg[$i]], 440, 10 + 120 * $i, 120, 20, 0x200) Next EndIf GUISetState() Do Until GUIGetMsg() = -3 Func _CreateResourceDLL($sDLL, ByRef $aFiles) If Not IsArray($aFiles) Or $aFiles[0] = "" Then Return SetError(1, 0, 0) _CreateEmptyDLL($sDLL) Local $hUpdate = _WinAPI_BeginUpdateResource($sDLL, 0) If @error Then Return SetError(2, 0, 0) Local $hFile, $bFile, $lFile, $tFile, $pFile, $sName, $sExt, $RT_TYPE, $Resource_ID = 0 Local $tICONDIR, $tICONDIRENTRY, $tGRPICONDIR, $pGRPICONDIR Local $Temp Local $nSize For $i = 0 To UBound($aFiles) - 1 If Not FileExists($aFiles[$i]) Then SetError(3, 0, 0) $hFile = FileOpen($aFiles[$i], 0) $bFile = FileRead($hFile) FileClose($hFile) $lFile = FileGetSize($aFiles[$i]) $tFile = DllStructCreate("char[" & $lFile & "]") DllStructSetData($tFile, 1, $bFile) $pFile = DllStructGetPtr($tFile) $sName = StringUpper(StringTrimLeft($aFiles[$i], StringInStr($aFiles[$i], "", 0, -1))) $sExt = StringTrimLeft($aFiles[$i], StringInStr($aFiles[$i], ".", 0, -1)) $aFiles[$i] = $sName Switch $sExt Case "bmp" $RT_TYPE = $RT_BITMAP $lFile = $lFile - 14 $pFile = Ptr($pFile + 14) Case "ico" $RT_TYPE = $RT_ICON Local $tB_Input_Header = DllStructCreate("short res;short type;short ImageCount;char rest[" & $lFile - 5 & "]", $pFile) Local $pB_Input_Header = DllStructGetPtr($tB_Input_Header) Local $IconType = DllStructGetData($tB_Input_Header, "Type") Local $IconCount = DllStructGetData($tB_Input_Header, "ImageCount") Local $tB_IconGroupHeader = DllStructCreate("short Res;short Type;short ImageCount;char Rest[" & $IconCount * 14 & "]") Local $pB_IconGroupHeader = DllStructGetPtr($tB_IconGroupHeader) DllStructSetData($tB_IconGroupHeader, "Res", 0) DllStructSetData($tB_IconGroupHeader, "Type", $IconType) DllStructSetData($tB_IconGroupHeader, "ImageCount", $IconCount) For $X = 1 To $IconCount Local $pB_Input_IconHeader = DllStructGetPtr($tB_Input_Header, 4) + ($X - 1) * 16 Local $tB_Input_IconHeader = DllStructCreate($tagICONDIRENTRY, $pB_Input_IconHeader) Local $IconWidth = DllStructGetData($tB_Input_IconHeader, "bWidth") Local $IconHeigth = DllStructGetData($tB_Input_IconHeader, "bHeight") Local $IconColors = DllStructGetData($tB_Input_IconHeader, "bColorCount") Local $IconPlanes = DllStructGetData($tB_Input_IconHeader, "wPlanes") Local $IconBitPerPixel = DllStructGetData($tB_Input_IconHeader, "wBitCount") Local $IconImageSize = DllStructGetData($tB_Input_IconHeader, "dwBytesInRes") Local $IconImageOffset = DllStructGetData($tB_Input_IconHeader, "dwImageOffset") $pB_IconGroupHeader = DllStructGetPtr($tB_IconGroupHeader, 4) + ($X - 1) * 14 Local $tB_GroupIcon = DllStructCreate($tagGRPICONDIRENTRY, $pB_IconGroupHeader) DllStructSetData($tB_GroupIcon, "bWidth", $IconWidth) DllStructSetData($tB_GroupIcon, "bHeigth", $IconHeigth) DllStructSetData($tB_GroupIcon, "bColorCount", $IconColors) DllStructSetData($tB_GroupIcon, "bReserved", 0) DllStructSetData($tB_GroupIcon, "wPlanes", $IconPlanes) DllStructSetData($tB_GroupIcon, "wBitCount", $IconBitPerPixel) DllStructSetData($tB_GroupIcon, "dwBytesInRes", $IconImageSize) $Resource_ID += 1 DllStructSetData($tB_GroupIcon, "nID", $Resource_ID) Local $PB_IconData = DllStructGetPtr($tB_Input_Header) + $IconImageOffset _WinAPI_UpdateResource($hUpdate, $RT_TYPE, $Resource_ID, Int("0x" & @OSLang), $PB_IconData, $IconImageSize) Next $pB_IconGroupHeader = DllStructGetPtr($tB_IconGroupHeader) Case "jpg", "jpeg", "gif" $RT_TYPE = $RT_RCDATA ;~ Case "cur" ;~ $RT_TYPE = $RT_CURSOR ;~ Case "txt", "au3", "ini", "c", "cpp", "h" ;~ $RT_TYPE = $RT_STRING Case Else ContinueLoop EndSwitch If $RT_TYPE = $RT_ICON Then _WinAPI_UpdateResource($hUpdate, $RT_GROUP_ICON, $sName, Int("0x" & @OSLang), $pB_IconGroupHeader, DllStructGetSize($tB_IconGroupHeader)) Else $Resource_ID += 1 _WinAPI_UpdateResource($hUpdate, $RT_TYPE, $sName, Int("0x" & @OSLang), $pFile, $lFile) EndIf ;~ If @error Then SetError(4, $i, 0) $tFile = 0 Next _WinAPI_EndUpdateResource($hUpdate) If @error Then Return SetError(5, @extended) Return 1 EndFunc ;==>_CreateResourceDLL Func _CreateEmptyDLL($sFilePath) Local $bEmptyDll = _Empty_DLL() Local $hFile = FileOpen($sFilePath, 18) ;Binary mode + Write mode (Erase old content!) FileWrite($hFile, $bEmptyDll) FileClose($hFile) EndFunc ;==>_CreateEmptyDLL Func _Empty_DLL() Local $Empty_DLL $Empty_DLL &= 'TVqQAAMAAAAEAAAA//8AALgAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAA4fug4AtAnNIbgBTM0hVGhpcyBwcm9ncmFtIGNhbm5vdCBiZSBydW4gaW4gRE9TIG1vZGUuDQ0KJAAAAAAAAABQRQAATAEFAP6WNU0AAAAAAAAAAOAADiELAQIyAAQAAAAGAAAAAAAAABAAAAAQAAAAMAAAAAAAEAAQAAAAAgAABAAAAAAAAAAEAAAAAAAAAABgAAAABAAAAAAAAAMAAAAAABAAABAAAAAAEAAAEAAAAAAAABAAAAAAAAAAAAAAAAAwAAA8AAAAAFAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAC' $Empty_DLL &= 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABUMAAAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC5jb2RlAAAAYwAAAAAQAAAAAgAAAAQAAAAAAAAAAAAAAAAAACAAAGAudGV4dAAAABgAAAAAIAAAAAIAAAAGAAAAAAAAAAAAAAAAAAAgAABgLmRhdGEAAADMAAAAADAAAAACAAAACAAAAAAAAAAAAAAAAAAAQAAAwC5yZWxvYwAAIAAAAABAAAAAAgAAAAoAAAAAAAAAAAAAAAAAAEAAAEIucnNyYwAAABAAAAAAUAAAAAIAAAAMAAAAAAAAAAAAAAAAAABAAAB' $Empty_DLL &= StringRepeat("A", 598) & 'IN8JAgBdQ6LRCQEo8QwABDoIgAAAIN8JAgCdQCDfCQIAHUF6CkAAACDfCQIA3UAuAEAAADCDABoAAAAAGgAEAAAaAAAAADouw8AAKPAMAAQw+gMAAAA/zXAMAAQ6KsPAADDww' $Empty_DLL &= StringRepeat("A", 550) & '/yVUMAAQ/yVcMAAQ/yVgMAAQ/yVkMAAQ' $Empty_DLL &= StringRepeat("A", 651) $Empty_DLL &= '8MAAAAAAAAAAAAAB2MAAAVDAAAEQwAAAAAAAAAAAAALIwAABcMAAAAAAAAAAAAAAAAAAAAAAAAAAAAABsMAAAAAAAAIIwAACQMAAAnjAAAAAAAABsMAAAAAAAAIIwAACQMAAAnjAAAAAAAACZAm1lbXNldAAATVNWQ1JULmRsbAAApAJIZWFwQ3JlYXRlAAClAkhlYXBEZXN0cm95APoBR2V0TW9kdWxlSGFuZGxlVwAAS0VSTkVMMzIuZGxs' $Empty_DLL &= StringRepeat("A", 431) & 'QAAAQAAAADDBMMFgwAAAAIAAAEAAAAAIwCDAOMBQw' $Empty_DLL &= StringRepeat("A", 645) & 'BSXNk0DAAc' $Empty_DLL &= StringRepeat("A", 668) & '=' Return Binary(_Base64Decode($Empty_DLL)) EndFunc ;==>_Empty_DLL Func _Base64Decode($input_string) Local $struct = DllStructCreate("int") Local $a_Call = DllCall("Crypt32.dll", "int", "CryptStringToBinary", "str", $input_string, "int", 0, "int", 1, "ptr", 0, "ptr", DllStructGetPtr($struct, 1), "ptr", 0, "ptr", 0) If @error Or Not $a_Call[0] Then Return SetError(1, 0, "") Local $a = DllStructCreate("byte[" & DllStructGetData($struct, 1) & "]") $a_Call = DllCall("Crypt32.dll", "int", "CryptStringToBinary", "str", $input_string, "int", 0, "int", 1, "ptr", DllStructGetPtr($a), "ptr", DllStructGetPtr($struct, 1), "ptr", 0, "ptr", 0) If @error Or Not $a_Call[0] Then Return SetError(2, 0, "") Return DllStructGetData($a, 1) EndFunc ;==>_Base64Decode Func StringRepeat($sChar, $nCount) $tBuffer = DllStructCreate("char[" & $nCount + 1 & "]") DllCall("msvcrt.dll", "ptr:cdecl", "memset", "ptr", DllStructGetPtr($tBuffer), "int", Asc($sChar), "int", $nCount) Return DllStructGetData($tBuffer, 1) EndFunc ;==>StringRepeat Func _SetImagefromResource($CtrlID, $Resname, $Resfile = -1, $ResType = 10) ;Raupi ;Diese Funktion basiert auf der UDF von Zedna@Autitscript.com und Code von Progandy@AutoIt.de Local Const $IMAGE_BITMAP = 0 Local Const $STM_SETIMAGE = 0x0172 Local $hmod, $hwnd, $InfoBlock, $ResSize, $Mem, $pMem, $dll, $dll2, $hData, $pData, $pStream, $ret, $hBitmap, $pBitmap If $Resfile = -1 Then $hmod = _WinAPI_GetModuleHandle("") Else $hmod = _WinAPI_LoadLibrary($Resfile) EndIf If $ResType = $RT_BITMAP Then $hBitmap = _WinAPI_LoadImage($hmod, $Resname, $IMAGE_BITMAP, 0, 0, 0) If @error Then Return SetError(1, 0, 0) $hwnd = GUICtrlGetHandle($CtrlID) If $hwnd = 0 Then Return SetError(2, 0, 0) DllCall("user32.dll", "hwnd", "SendMessage", "hwnd", $hwnd, "int", $STM_SETIMAGE, "int", $IMAGE_BITMAP, "int", $hBitmap) If @error Then Return SetError(3, 0, 0) Else $InfoBlock = DllCall("kernel32.dll", "int", "FindResourceA", "int", $hmod, "str", $Resname, "long", $ResType) If @error Then Return SetError(4, 0, 0) $InfoBlock = $InfoBlock[0] If $InfoBlock = 0 Then Return SetError(5, 0, 0) $ResSize = DllCall("kernel32.dll", "dword", "SizeofResource", "int", $hmod, "int", $InfoBlock) If @error Then Return SetError(6, 0, 0) $ResSize = $ResSize[0] If $ResSize = 0 Then Return SetError(7, 0, 0) $Mem = DllCall("kernel32.dll", "int", "LoadResource", "int", $hmod, "int", $InfoBlock) If @error Then Return SetError(8, 0, 0) $Mem = $Mem[0] If $Mem = 0 Then Return SetError(9, 0, 0) $pMem = DllCall("kernel32.dll", "int", "LockResource", "int", $Mem) If @error Then Return SetError(8, 0, 0) $pMem = $pMem[0] If $pMem = 0 Then Return SetError(10, 0, 0) If $Resfile <> -1 Then DllCall("Kernel32.dll", "int", "FreeLibrary", "str", $hmod) $hData = _MemGlobalAlloc($ResSize, 2) $pData = _MemGlobalLock($hData) _MemMoveMemory($pMem, $pData, $ResSize) _MemGlobalUnlock($hData) $ret = DllCall("ole32.dll", "int", "CreateStreamOnHGlobal", "int", $hData, "long", 1, "Int*", 0) $pStream = $ret[3] _GDIPlus_Startup() $pBitmap = DllCall($ghGDIPDll, "int", "GdipCreateBitmapFromStream", "ptr", $pStream, "int*", 0) $pBitmap = $pBitmap[2] $hBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($pBitmap) $hwnd = GUICtrlGetHandle($CtrlID) If $hwnd = 0 Then Return SetError(11, 0, 0) DllCall("user32.dll", "hwnd", "SendMessage", "hwnd", $hwnd, "int", $STM_SETIMAGE, "int", $IMAGE_BITMAP, "int", $hBitmap) If @error Then Return SetError(12, 0, 0) _GDIPlus_BitmapDispose($pBitmap) _GDIPlus_Shutdown() $dll = DllStructCreate("Uint", $pStream) $dll2 = DllStructCreate("uInt", DllStructGetData($dll, 1) + 8) DllCall("", "UInt", DllStructGetData($dll2, 1), "UInt", $pStream) _WinAPI_DeleteObject($pStream) $pStream = 0 _MemGlobalFree($hData) If $Resfile <> -1 Then _WinAPI_FreeLibrary($hmod) EndIf EndFunc ;==>_SetImagefromResourceDownload au3Download au3 with function for icons, pictures(bmp, jpg, gif), fonts(only ttf tested)Download new au3 without temp file creating in example part Edited May 15, 2012 by funkey JScript, yahaosoft, Mun and 3 others 6 Programming today is a race between software engineers striving tobuild bigger and better idiot-proof programs, and the Universetrying to produce bigger and better idiots.So far, the Universe is winning. Link to comment Share on other sites More sharing options...
ricky Posted May 11, 2012 Share Posted May 11, 2012 Hello, I try to compile it but I have 79 error's. Could you please create a zip with all needed files? Autoit v.3.3.8.1 Link to comment Share on other sites More sharing options...
guinness Posted May 11, 2012 Share Posted May 11, 2012 You need WinAPIEx. Search for it in the Examples section or use the latest beta. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _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 parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
ricky Posted May 11, 2012 Share Posted May 11, 2012 (edited) I have it, it's not a problem, I have the version 3.3, here are my error's :expandcollapse popupC:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3161,35) : ERROR: $WM_AFXFIRST previously declared as a 'Const'. Global Const $WM_AFXFIRST = 0x0360 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3162,34) : ERROR: $WM_AFXLAST previously declared as a 'Const'. Global Const $WM_AFXLAST = 0x037F ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3163,30) : ERROR: $WM_APP previously declared as a 'Const'. Global Const $WM_APP = 0x8000 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3164,37) : ERROR: $WM_APPCOMMAND previously declared as a 'Const'. Global Const $WM_APPCOMMAND = 0x0319 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3168,41) : ERROR: $WM_CAPTURECHANGED previously declared as a 'Const'. Global Const $WM_CAPTURECHANGED = 0x0215 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3197,39) : ERROR: $WM_DEVICECHANGE previously declared as a 'Const'. Global Const $WM_DEVICECHANGE = 0x0219 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3202,36) : ERROR: $WM_DROPFILES previously declared as a 'Const'. Global Const $WM_DROPFILES = 0x0233 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3210,37) : ERROR: $WM_ENDSESSION previously declared as a 'Const'. Global Const $WM_ENDSESSION = 0x0016 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3212,40) : ERROR: $WM_ENTERMENULOOP previously declared as a 'Const'. Global Const $WM_ENTERMENULOOP = 0x0211 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3213,40) : ERROR: $WM_ENTERSIZEMOVE previously declared as a 'Const'. Global Const $WM_ENTERSIZEMOVE = 0x0231 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3215,39) : ERROR: $WM_EXITMENULOOP previously declared as a 'Const'. Global Const $WM_EXITMENULOOP = 0x0212 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3216,39) : ERROR: $WM_EXITSIZEMOVE previously declared as a 'Const'. Global Const $WM_EXITSIZEMOVE = 0x0232 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3229,40) : ERROR: $WM_HANDHELDFIRST previously declared as a 'Const'. Global Const $WM_HANDHELDFIRST = 0x0358 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3230,39) : ERROR: $WM_HANDHELDLAST previously declared as a 'Const'. Global Const $WM_HANDHELDLAST = 0x035F ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3232,33) : ERROR: $WM_HOTKEY previously declared as a 'Const'. Global Const $WM_HOTKEY = 0x0312 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3236,35) : ERROR: $WM_IME_CHAR previously declared as a 'Const'. Global Const $WM_IME_CHAR = 0x0286 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3237,42) : ERROR: $WM_IME_COMPOSITION previously declared as a 'Const'. Global Const $WM_IME_COMPOSITION = 0x010F ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3238,46) : ERROR: $WM_IME_COMPOSITIONFULL previously declared as a 'Const'. Global Const $WM_IME_COMPOSITIONFULL = 0x0284 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3239,38) : ERROR: $WM_IME_CONTROL previously declared as a 'Const'. Global Const $WM_IME_CONTROL = 0x0283 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3240,45) : ERROR: $WM_IME_ENDCOMPOSITION previously declared as a 'Const'. Global Const $WM_IME_ENDCOMPOSITION = 0x010E ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3241,38) : ERROR: $WM_IME_KEYDOWN previously declared as a 'Const'. Global Const $WM_IME_KEYDOWN = 0x0290 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3242,38) : ERROR: $WM_IME_KEYLAST previously declared as a 'Const'. Global Const $WM_IME_KEYLAST = 0x010F ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3243,36) : ERROR: $WM_IME_KEYUP previously declared as a 'Const'. Global Const $WM_IME_KEYUP = 0x0291 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3244,37) : ERROR: $WM_IME_NOTIFY previously declared as a 'Const'. Global Const $WM_IME_NOTIFY = 0x0282 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3245,38) : ERROR: $WM_IME_REQUEST previously declared as a 'Const'. Global Const $WM_IME_REQUEST = 0x0288 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3246,37) : ERROR: $WM_IME_SELECT previously declared as a 'Const'. Global Const $WM_IME_SELECT = 0x0285 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3247,41) : ERROR: $WM_IME_SETCONTEXT previously declared as a 'Const'. Global Const $WM_IME_SETCONTEXT = 0x0281 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3248,47) : ERROR: $WM_IME_STARTCOMPOSITION previously declared as a 'Const'. Global Const $WM_IME_STARTCOMPOSITION = 0x010D ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3256,35) : ERROR: $WM_KEYFIRST previously declared as a 'Const'. Global Const $WM_KEYFIRST = 0x0100 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3257,34) : ERROR: $WM_KEYLAST previously declared as a 'Const'. Global Const $WM_KEYLAST = 0x0109 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3263,40) : ERROR: $WM_MBUTTONDBLCLK previously declared as a 'Const'. Global Const $WM_MBUTTONDBLCLK = 0x0209 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3266,38) : ERROR: $WM_MDIACTIVATE previously declared as a 'Const'. Global Const $WM_MDIACTIVATE = 0x0222 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3267,37) : ERROR: $WM_MDICASCADE previously declared as a 'Const'. Global Const $WM_MDICASCADE = 0x0227 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3268,36) : ERROR: $WM_MDICREATE previously declared as a 'Const'. Global Const $WM_MDICREATE = 0x0220 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3269,37) : ERROR: $WM_MDIDESTROY previously declared as a 'Const'. Global Const $WM_MDIDESTROY = 0x0221 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3270,39) : ERROR: $WM_MDIGETACTIVE previously declared as a 'Const'. Global Const $WM_MDIGETACTIVE = 0x0229 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3271,41) : ERROR: $WM_MDIICONARRANGE previously declared as a 'Const'. Global Const $WM_MDIICONARRANGE = 0x0228 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3272,38) : ERROR: $WM_MDIMAXIMIZE previously declared as a 'Const'. Global Const $WM_MDIMAXIMIZE = 0x0225 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3273,34) : ERROR: $WM_MDINEXT previously declared as a 'Const'. Global Const $WM_MDINEXT = 0x0224 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3274,41) : ERROR: $WM_MDIREFRESHMENU previously declared as a 'Const'. Global Const $WM_MDIREFRESHMENU = 0x0234 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3275,37) : ERROR: $WM_MDIRESTORE previously declared as a 'Const'. Global Const $WM_MDIRESTORE = 0x0223 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3276,37) : ERROR: $WM_MDISETMENU previously declared as a 'Const'. Global Const $WM_MDISETMENU = 0x0230 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3277,34) : ERROR: $WM_MDITILE previously declared as a 'Const'. Global Const $WM_MDITILE = 0x0226 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3286,37) : ERROR: $WM_MOUSEFIRST previously declared as a 'Const'. Global Const $WM_MOUSEFIRST = 0x0200 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3287,37) : ERROR: $WM_MOUSEHOVER previously declared as a 'Const'. Global Const $WM_MOUSEHOVER = 0x02A1 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3290,37) : ERROR: $WM_MOUSELEAVE previously declared as a 'Const'. Global Const $WM_MOUSELEAVE = 0x02A3 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3294,33) : ERROR: $WM_MOVING previously declared as a 'Const'. Global Const $WM_MOVING = 0x0216 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3306,39) : ERROR: $WM_NCMOUSEHOVER previously declared as a 'Const'. Global Const $WM_NCMOUSEHOVER = 0x02A0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3307,39) : ERROR: $WM_NCMOUSELEAVE previously declared as a 'Const'. Global Const $WM_NCMOUSELEAVE = 0x02A2 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3313,42) : ERROR: $WM_NCXBUTTONDBLCLK previously declared as a 'Const'. Global Const $WM_NCXBUTTONDBLCLK = 0x00AD ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3314,40) : ERROR: $WM_NCXBUTTONDOWN previously declared as a 'Const'. Global Const $WM_NCXBUTTONDOWN = 0x00AB ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3315,38) : ERROR: $WM_NCXBUTTONUP previously declared as a 'Const'. Global Const $WM_NCXBUTTONUP = 0x00AC ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3317,35) : ERROR: $WM_NEXTMENU previously declared as a 'Const'. Global Const $WM_NEXTMENU = 0x0213 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3324,41) : ERROR: $WM_PALETTECHANGED previously declared as a 'Const'. Global Const $WM_PALETTECHANGED = 0x0311 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3325,44) : ERROR: $WM_PALETTEISCHANGING previously declared as a 'Const'. Global Const $WM_PALETTEISCHANGING = 0x0310 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3326,39) : ERROR: $WM_PARENTNOTIFY previously declared as a 'Const'. Global Const $WM_PARENTNOTIFY = 0x0210 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3328,38) : ERROR: $WM_PENWINFIRST previously declared as a 'Const'. Global Const $WM_PENWINFIRST = 0x0380 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3329,37) : ERROR: $WM_PENWINLAST previously declared as a 'Const'. Global Const $WM_PENWINLAST = 0x038F ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3331,41) : ERROR: $WM_POWERBROADCAST previously declared as a 'Const'. Global Const $WM_POWERBROADCAST = 0x0218 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3332,32) : ERROR: $WM_PRINT previously declared as a 'Const'. Global Const $WM_PRINT = 0x0317 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3333,38) : ERROR: $WM_PRINTCLIENT previously declared as a 'Const'. Global Const $WM_PRINTCLIENT = 0x0318 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3335,42) : ERROR: $WM_QUERYENDSESSION previously declared as a 'Const'. Global Const $WM_QUERYENDSESSION = 0x0011 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3336,42) : ERROR: $WM_QUERYNEWPALETTE previously declared as a 'Const'. Global Const $WM_QUERYNEWPALETTE = 0x030F ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3337,36) : ERROR: $WM_QUERYOPEN previously declared as a 'Const'. Global Const $WM_QUERYOPEN = 0x0013 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3341,40) : ERROR: $WM_RBUTTONDBLCLK previously declared as a 'Const'. Global Const $WM_RBUTTONDBLCLK = 0x0206 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3353,40) : ERROR: $WM_SETTINGCHANGE previously declared as a 'Const'. Global Const $WM_SETTINGCHANGE = 0x001A ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3368,39) : ERROR: $WM_TABLET_FIRST previously declared as a 'Const'. Global Const $WM_TABLET_FIRST = 0x02C0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3369,38) : ERROR: $WM_TABLET_LAST previously declared as a 'Const'. Global Const $WM_TABLET_LAST = 0x02DF ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3371,39) : ERROR: $WM_THEMECHANGED previously declared as a 'Const'. Global Const $WM_THEMECHANGED = 0x031A ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3376,34) : ERROR: $WM_UNICHAR previously declared as a 'Const'. Global Const $WM_UNICHAR = 0x0109 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeAPIConstants.au3(3387,44) : ERROR: $WM_WTSSESSION_CHANGE previously declared as a 'Const'. Global Const $WM_WTSSESSION_CHANGE = 0x02B1 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ 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:Documents and SettingsrcBureauAutoIt SourceCodeWinAPIEx.au3(4932,104) : ERROR: _WinAPI_DuplicateHandle() already defined. Func _WinAPI_DuplicateHandle($hProcess, $hSource, $hTarget, $iAccess = 0, $iOptions = 2, $fInherit = 0) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeWinAPIEx.au3(11144,34) : ERROR: _WinAPI_GetTextMetrics() already defined. Func _WinAPI_GetTextMetrics($hDC) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:Documents and SettingsrcBureauAutoIt SourceCodeCreateDll.au3 - 79 error(s), 0 warning(s) Edited May 11, 2012 by ricky03 Link to comment Share on other sites More sharing options...
guinness Posted May 11, 2012 Share Posted May 11, 2012 When did you last update WinAPIEx and all the files included? As I don't get those errors. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _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 parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
UEZ Posted May 11, 2012 Share Posted May 11, 2012 (edited) Nice stuff Funkey. Might be useful. Thanks for sharing! Btw, the compression for the empty DLL is a nice workaround. I'm wondering why the built-in compression is not optimal for this file... Br, UEZ Edited May 11, 2012 by UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
Zedna Posted May 11, 2012 Share Posted May 11, 2012 Very nice!! Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
ricky Posted May 11, 2012 Share Posted May 11, 2012 Now it works, thanks. Now I use the version 3.7!!!! Link to comment Share on other sites More sharing options...
JScript Posted May 12, 2012 Share Posted May 12, 2012 Very, very niceeee, thanks!!! João Carlos. http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!) Somewhere Out ThereJames Ingram Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere! Link to comment Share on other sites More sharing options...
TheSaint Posted May 13, 2012 Share Posted May 13, 2012 Thanks for sharing! Make sure brain is in gear before opening mouth! Remember, what is not said, can be just as important as what is said. Spoiler What is the Secret Key? Life is like a Donut If I put effort into communication, I expect you to read properly & fully, or just not comment. Ignoring those who try to divert conversation with irrelevancies. If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it. I'm only big and bad, to those who have an over-active imagination. I may have the Artistic Liesense to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage) Link to comment Share on other sites More sharing options...
funkey Posted May 14, 2012 Author Share Posted May 14, 2012 Thanks for liking it! Now you can also import fonts to the dll. But there are still a lot of resource types missing. If someone has time, he could implement cursors, sounds or movies for me. Or just wait until I have next few free minutes. Download at post #1 Programming today is a race between software engineers striving tobuild bigger and better idiot-proof programs, and the Universetrying to produce bigger and better idiots.So far, the Universe is winning. Link to comment Share on other sites More sharing options...
wraithdu Posted May 14, 2012 Share Posted May 14, 2012 You can look at the AutoIt3Wrapper source for all the resource types I've implemented. I believe AVI and sounds are just stored as binary data. Cursors are similar to icons, and string tables are their own animal. Link to comment Share on other sites More sharing options...
funkey Posted May 14, 2012 Author Share Posted May 14, 2012 Thanks wraithdu. I already had a look into AutoIt3Wrapper, when I implemented the icons.By the way: I forgot to ask, if there is a (easy) way to get the name of a font direct from memory without writing a temp file and using _WinAPI_GetFontResourceInfo()??Thanks, funkey Programming today is a race between software engineers striving tobuild bigger and better idiot-proof programs, and the Universetrying to produce bigger and better idiots.So far, the Universe is winning. Link to comment Share on other sites More sharing options...
UEZ Posted May 14, 2012 Share Posted May 14, 2012 (edited) I'm a C/C++ novice but you can try this code to convert it to AutoIt (I know that you have C/C++ knowledge )It will read out the font name directly from the file:expandcollapse popuptypedef struct _tagTT_OFFSET_TABLE{ USHORT uMajorVersion; USHORT uMinorVersion; USHORT uNumOfTables; USHORT uSearchRange; USHORT uEntrySelector; USHORT uRangeShift; }TT_OFFSET_TABLE; typedef struct _tagTT_TABLE_DIRECTORY{ char szTag[4]; //table name ULONG uCheckSum; //Check sum ULONG uOffset; //Offset from beginning of file ULONG uLength; //length of the table in bytes }TT_TABLE_DIRECTORY; typedef struct _tagTT_NAME_TABLE_HEADER{ USHORT uFSelector; //format selector. Always 0 USHORT uNRCount; //Name Records count USHORT uStorageOffset; //Offset for strings storage, from start of the table }TT_NAME_TABLE_HEADER; typedef struct _tagTT_NAME_RECORD{ USHORT uPlatformID; USHORT uEncodingID; USHORT uLanguageID; USHORT uNameID; USHORT uStringLength; USHORT uStringOffset; //from start of storage area }TT_NAME_RECORD; #define SWAPWORD(x) MAKEWORD(HIBYTE(x), LOBYTE(x)) #define SWAPLONG(x) MAKELONG(SWAPWORD(HIWORD(x)), SWAPWORD(LOWORD(x))) CString GetFontNameFromFile(LPCTSTR lpszFilePath) { CFile f; CString csRetVal; if(f.Open(lpszFilePath, CFile::modeRead|CFile::shareDenyWrite)){ TT_OFFSET_TABLE ttOffsetTable; f.Read(&ttOffsetTable, sizeof(TT_OFFSET_TABLE)); ttOffsetTable.uNumOfTables = SWAPWORD(ttOffsetTable.uNumOfTables); ttOffsetTable.uMajorVersion = SWAPWORD(ttOffsetTable.uMajorVersion); ttOffsetTable.uMinorVersion = SWAPWORD(ttOffsetTable.uMinorVersion); //check is this is a true type font and the version is 1.0 if(ttOffsetTable.uMajorVersion != 1 || ttOffsetTable.uMinorVersion != 0) return csRetVal; TT_TABLE_DIRECTORY tblDir; BOOL bFound = FALSE; CString csTemp; for(int i=0; i< ttOffsetTable.uNumOfTables; i++){ f.Read(&tblDir, sizeof(TT_TABLE_DIRECTORY)); strncpy(csTemp.GetBuffer(5), tblDir.szTag, 4); csTemp.ReleaseBuffer(4); if(csTemp.CompareNoCase(_T("name")) == 0){ bFound = TRUE; tblDir.uLength = SWAPLONG(tblDir.uLength); tblDir.uOffset = SWAPLONG(tblDir.uOffset); break; } } if(bFound){ f.Seek(tblDir.uOffset, CFile::begin); TT_NAME_TABLE_HEADER ttNTHeader; f.Read(&ttNTHeader, sizeof(TT_NAME_TABLE_HEADER)); ttNTHeader.uNRCount = SWAPWORD(ttNTHeader.uNRCount); ttNTHeader.uStorageOffset = SWAPWORD(ttNTHeader.uStorageOffset); TT_NAME_RECORD ttRecord; bFound = FALSE; for(int i=0; i<ttNTHeader.uNRCount; i++){ f.Read(&ttRecord, sizeof(TT_NAME_RECORD)); ttRecord.uNameID = SWAPWORD(ttRecord.uNameID); if(ttRecord.uNameID == 1){ ttRecord.uStringLength = SWAPWORD(ttRecord.uStringLength); ttRecord.uStringOffset = SWAPWORD(ttRecord.uStringOffset); int nPos = f.GetPosition(); f.Seek(tblDir.uOffset + ttRecord.uStringOffset + ttNTHeader.uStorageOffset, CFile::begin); //bug fix: see the post by SimonSays to read more about it TCHAR lpszNameBuf = csTemp.GetBuffer(ttRecord.uStringLength + 1); ZeroMemory(lpszNameBuf, ttRecord.uStringLength + 1); f.Read(lpszNameBuf, ttRecord.uStringLength); csTemp.ReleaseBuffer(); if(csTemp.GetLength() > 0){ csRetVal = csTemp; break; } f.Seek(nPos, CFile::begin); } } } f.Close(); } return csRetVal; }Br,UEZ Edited May 14, 2012 by UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
FuryCell Posted May 14, 2012 Share Posted May 14, 2012 Very nice. This will come in handy for a multitude of reasons. HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code. Link to comment Share on other sites More sharing options...
funkey Posted May 15, 2012 Author Share Posted May 15, 2012 Thank you all and thank you UEZ! I ported the code to AutoIt and posted it here: Very usefull. Programming today is a race between software engineers striving tobuild bigger and better idiot-proof programs, and the Universetrying to produce bigger and better idiots.So far, the Universe is winning. Link to comment Share on other sites More sharing options...
yahaosoft Posted November 22, 2012 Share Posted November 22, 2012 great! thank you for sharing it. Thanksgiving... Link to comment Share on other sites More sharing options...
jazzyjeff Posted January 17, 2013 Share Posted January 17, 2013 I wondered if you could help me with this. I created a DLL with your script and have numerous icons in there. When I try to add these icons to buttons in my script, only the first icon I set is displayed. Here is what I have: #include #include #include #include #Region ### START Koda GUI section ### Form= $formMain = GUICreate("Form1", 615, 438, 192, 124) $btnInstall = GUICtrlCreateButton("", 1, 1, 33, 33, $BS_ICON) GUICtrlSetImage(-1,@ScriptDir & "\ico.dll","INSTALL_ICONS.ICO") $btnUninstall = GUICtrlCreateButton("", 34, 1, 33, 33, $BS_ICON) GUICtrlSetImage(-1,@ScriptDir & "\ico.dll","UNINSTALL_ICONS.ICO") $btnRequest = GUICtrlCreateButton("", 67, 1, 33, 33, $BS_ICON) GUICtrlSetImage(-1,@ScriptDir & "\ico.dll","EMAIL_ICON.ICO") $btnPrinter = GUICtrlCreateButton("", 100, 1, 33, 33, $BS_ICON) GUICtrlSetImage(-1,@ScriptDir & "\ico.dll","PRINTER (2).ICO") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Attached is a screenshot of what icons my dll contains. Any ideas how I can resolve this? I can point the image to the individual ico files and it will work fine, but I'd love to have it just work through this dll. Link to comment Share on other sites More sharing options...
jazzyjeff Posted January 18, 2013 Share Posted January 18, 2013 Guinness helped resolve this by suggesting I try a negative number. This is in the help file, but I over looked it. :-( Link to comment Share on other sites More sharing options...
guinness Posted January 18, 2013 Share Posted January 18, 2013 Indeed this could be a fun little project to expand the datatypes. trancexx has her resources project floating around the Forum, might be worth investigating. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _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 parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now