Jump to content

ResourcesEx UDF.


guinness
 Share

Recommended Posts

Is there a way to use this udf to retrieve the mp3 album art? Or is it too messy?

Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Link to comment
Share on other sites

Here the version which converts the MP3 resource to hybrid wave on the fly and plays it from memory:

 

#AutoIt3Wrapper_Run_Au3Stripper=y
#Au3Stripper_Parameters=/SO
#AutoIt3Wrapper_Run_After=del /f /q "%scriptdir%\%scriptfile%_stripped.au3"

#AutoIt3Wrapper_Res_File_Add=Sound.mp3, RT_RCDATA, SOUND

AutoItSetOption("MustDeclareVars", 1)

#include <Date.au3>
#include "ResourcesEx.au3"

_Play_Resource_Sound("SOUND")

Func _Play_Resource_Sound($sName)

    ; Read resource into memory
    Local $binWave = _Resource_GetAsBytes($sName)
    ; Get file size
    Local $iFileSize = @extended

    Local $sHdr_1 = "0x52494646"
    Local $sHdr_2 = "57415645666D74201E0000005500020044AC0000581B0000010000000C00010002000000B600010071056661637404000000640E060064617461"
    Local $sAlign_Buffer = "00"
    Local $sMp3 = StringTrimLeft(Binary($binWave), 2)
    Local $iMp3Size = StringLen($sMp3)

    ; Convert to required format
    Local $iMp3Size = StringRegExpReplace(Hex($iFileSize, 8), "(..)(..)(..)(..)", "$4$3$2$1")
    Local $iWavSize = StringRegExpReplace(Hex($iFileSize + 63, 8), "(..)(..)(..)(..)", "$4$3$2$1")

    ; Construct hybrid wav file
    Local $sHybridWav = $sHdr_1 & $iWavSize & $sHdr_2 & $iMp3Size & $sMp3
    If Mod($iMp3Size, 2) Then
        $sHybridWav &= $sAlign_Buffer
    EndIf

    Local $tWave = DllStructCreate("byte[" & BinaryLen($sHybridWav) & "]")
    DllStructSetData($tWave, 1, $sHybridWav)

    $binWave = 0
    ; Play sound
    Local $SND_NODEFAULT = 2
    Local $iFlag = BitOR($SND_MEMORY, $SND_ASYNC, $SND_NODEFAULT)
    DllCall("winmm.dll", "int", "PlaySoundW", "struct*", $tWave, "ptr", 0, "dword", $iFlag)

    ; Show results
    MsgBox(0, "Test", "Close MsgBox to exit")
    Exit

EndFunc   ;==>_Play_Resource_Sound

Br,

UEZ

Edited 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

  • Moderators

guinness,

And after all that, here is a suggested function which will play both mp3 and wav files: :)

#AutoIt3Wrapper_Res_File_Add=Basic.mp3, RT_RCDATA, BASICMP3
#AutoIt3Wrapper_Res_File_Add=Basic.wav, SOUND, BASICWAV

#include "ResourcesEx.au3"

MsgBox($MB_SYSTEMMODAL, "Sound", "Play mp3")
$iRet = _Resource_PlaySound_Mod("BASICMP3")

MsgBox($MB_SYSTEMMODAL, "Sound", "Play wav")
$iRet = _Resource_PlaySound_Mod("BASICWAV")

Func _Resource_PlaySound_Mod($sResNameOrID, $iFlags = $SND_SYNC, $sDLL = Default)

    Local $bIsInternal = ($sDLL = Default Or $sDLL = -1)
    Local $hInstance = ($bIsInternal ? 0 : _WinAPI_LoadLibraryEx($sDLL, $LOAD_LIBRARY_AS_DATAFILE))
    If $iFlags = Default Then $iFlags = $SND_SYNC
    Local $bReturn

    ; Try to read resource into memory
    Local $binSound = _Resource_GetAsBytes($sResNameOrID) ; Assume mp3 so look in RT_RCDATA
    ; Get file size
    Local $iFileSize = @extended

    If $iFileSize = 0 Then
        ; Assume a wav
        $bReturn = _WinAPI_PlaySound($sResNameOrID, BitOR($SND_RESOURCE, $iFlags), $hInstance)
    Else
        ; Convert mp3 to hybrid wav
        $sHdr_1 = "0x52494646"
        Local $sHdr_2 = "57415645666D74201E0000005500020044AC0000581B0000010000000C00010002000000B600010071056661637404000000640E060064617461"
        Local $sAlign_Buffer = "00"
        Local $sMp3 = StringTrimLeft(Binary($binSound), 2)
        Local $iMp3Size = StringLen($sMp3)

        ; Convert to required format
        Local $iMp3Size = StringRegExpReplace(Hex($iFileSize, 8), "(..)(..)(..)(..)", "$4$3$2$1")
        Local $iWavSize = StringRegExpReplace(Hex($iFileSize + 63, 8), "(..)(..)(..)(..)", "$4$3$2$1")

        ; Construct hybrid wav file
        Local $sHybridWav = $sHdr_1 & $iWavSize & $sHdr_2 & $iMp3Size & $sMp3
        If Mod($iMp3Size, 2) Then
            $sHybridWav &= $sAlign_Buffer
        EndIf

        ; Create struct
        Local $tWave = DllStructCreate("byte[" & BinaryLen($sHybridWav) & "]")
        DllStructSetData($tWave, 1, $sHybridWav)

        ; Set flag
        $iFlags = BitOR($SND_MEMORY, $SND_NODEFAULT, $iFlags)

        ; Play sound
        DllCall("winmm.dll", "int", "PlaySoundW", "struct*", $tWave, "ptr", 0, "dword", $iFlags)
        $bReturn = (@error ? 0 : 1)

    EndIf

    If Not $bIsInternal Then _WinAPI_FreeLibrary($hInstance)
    Return $bReturn

EndFunc   ;==>_Resource_PlaySound_Mod
Note that an mp3 needs to be inserted as RT_RCDATA and a wav as SOUND - that acts as the switch in the code. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

I like the hybrid wave method because it doesn't require an external dll to play the mp3 file.

Thanks Melba23 for it!  :thumbsup:

Is there a way to use this udf to retrieve the mp3 album art? Or is it too messy?

This UDF isn't designed to extract any information from a mp3 file. What you can do is to read the mp3 file from the resource and use additional UDFs which can extract the information you want from a mp3.

 

Br,

UEZ

Edited 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

  • Moderators

mesale0077,

Do not forget UEZ's contribution. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

I like the hybrid wave method because it doesn't require an external dll to play the mp3 file.

Thanks Melba23 for it!  :thumbsup:

This UDF isn't designed to extract any information from a mp3 file. What you can do is to read the mp3 file from the resource and use additional UDFs which can extract the information you want from a mp3.

 

Br,

UEZ

 

Thank you, seems like a  job for ID3 udf, but it isn't working so well here, was looking for an alternative.

Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Link to comment
Share on other sites

Thanks all. I will look at the proposals next week.

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 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: 22/04/2018

Link to comment
Share on other sites

swf from resource

#AutoIt3Wrapper_UseX64=n
#AutoIt3Wrapper_UseUpx=y
#AutoIt3Wrapper_UPX_Parameters=--best --lzma
#AutoIt3Wrapper_Res_File_Add=example.swf, RT_RCDATA, SWF
#include "AutoitObject.au3"
#include <GDIPlus.au3>
#include <GUIConstantsEx.au3>
#include <Memory.au3>
#include "ResourcesEx.au3"
;===============================================================================
#interface "IPersist"
Global Const $sIID_IPersist = "{0000010c-0000-0000-C000-000000000046}"
; Definition
Global $dtagIPersist = $dtagIUnknown & _
        "GetClassID hresult(ptr*);"
; List
Global $ltagIPersist = $ltagIUnknown & _
        "GetClassID;"
;===============================================================================

;===============================================================================
#interface "IPersistStream"
Global Const $sIID_IPersistStream = "{00000109-0000-0000-C000-000000000046}"
; Definition
Global $dtagIPersistStream = $dtagIPersist & _
        "IsDirty hresult(ptr);" & _
        "Load hresult(ptr);" & _
        "Save hresult(ptr;bool);" & _
        "GetSizeMax hresult(uint64*);"
; List
Global $ltagIPersistStream = $ltagIPersist & _
        "IsDirty;" & _
        "Load;" & _
        "Save;" & _
        "GetSizeMax;"
;===============================================================================

;===============================================================================
#interface "IPersistStreamInit"
Global Const $sIID_IPersistStreamInit = "{7FD52380-4E07-101B-AE2D-08002B2EC713}"
; Definition
Global $dtagIPersistStreamInit = $dtagIPersistStream & _
        "InitNew hresult();"
; List
Global $ltagIPersistStreamInit = $ltagIPersistStream & _
        "InitNew;"
;===============================================================================

;===============================================================================
#interface "ISequentialStream"
Global Const $sIID_ISequentialStream = "{0C733A30-2A1C-11CE-ADE5-00AA0044773D}"
; Definition
Global $dtagISequentialStream = $dtagIUnknown & _
        "Read hresult(ptr;dword;dword*);" & _
        "Write hresult(ptr;dword;dword*);"
; List
Global $ltagISequentialStream = $ltagIUnknown & _
        "Read;" & _
        "Write;"
;===============================================================================

;===============================================================================
#interface "IStream"
Global Const $sIID_IStream = "{0000000C-0000-0000-C000-000000000046}"
; Definition
Global $dtagIStream = $dtagISequentialStream & _
        "Seek hresult(int64;dword;int64);" & _
        "SetSize hresult(int64);" & _
        "CopyTo hresult(ptr;int64;int64*;int64*);" & _
        "Commit hresult(dword);" & _
        "Revert none();" & _
        "LockRegion hresult(int64;int64;dword);" & _
        "UnlockRegion hresult(int64;int64;dword);" & _
        "Stat hresult(ptr;dword);" & _
        "Clone hresult(ptr*);"
; List
Global $ltagIStream = $ltagISequentialStream & _
        "Seek;" & _
        "SetSize;" & _
        "CopyTo;" & _
        "Commit;" & _
        "Revert;" & _
        "LockRegion;" & _
        "UnlockRegion;" & _
        "Stat;" & _
        "Clone;"
;===============================================================================

; Error monitoring
Global $oError = ObjEvent("AutoIt.Error", "_ErrFunc")

; Let's Start
_AutoItObject_Startup()

Global Const $sCLSID_ShockwaveFlash = "{D27CDB6E-AE6D-11CF-96B8-444553540000}"
Global Const $sIID_IShockwaveFlash = "{D27CDB6C-AE6D-11CF-96B8-444553540000}"
Global $oShockwaveFlash

; There are several available ways to create desired object:
; 1. Built-in function:
$oShockwaveFlash = ObjCreate("ShockwaveFlash.ShockwaveFlash") ;

; 2. AutoItObject's pandan:
;~ $oShockwaveFlash = _AutoItObject_ObjCreate("ShockwaveFlash.ShockwaveFlash")

; 3. The same function but this time passing CLSID:
;~ $oShockwaveFlash = _AutoItObject_ObjCreate($sCLSID_ShockwaveFlash)

; 4. _AutoItObject_ObjCreateEx. This one works from server file directly (doesn't require installed flash)
;~ $oShockwaveFlash = _AutoItObject_ObjCreateEx(@ScriptDir & "\Flash10m.ocx", $sCLSID_ShockwaveFlash, $sIID_IShockwaveFlash)

If Not IsObj($oShockwaveFlash) Then Exit -11

; GUI
Global $GUI = GUICreate("Akrofonoloji programı", 390, 400)

Global $hControl = GUICtrlCreateObj($oShockwaveFlash, -10, -10, 400, 400)

Global $iPos, $iSizeData
Global $vVar = _SWF_Anim("SWF")
Global $iSizeData = BinaryLen($vVar)

GUISetState()

_FlashLoadMemory($oShockwaveFlash, $vVar, $iSizeData, $iPos)

While 1
    If GUIGetMsg() = -3 Then

        Exit
    EndIf
WEnd




Func _FlashLoadMemory($oShockwaveFlash, ByRef $vData, ByRef $iSizeData, ByRef $iPos)
    #forceref $vData, $iSizeData, $iPos
    If Not IsObj($oShockwaveFlash) Then Return SetError(1, 0, False)
    _AutoItObject_IUnknownAddRef($oShockwaveFlash) ; Add reference
    Local $oFlashInterface = _AutoItObject_WrapperCreate(_AutoItObject_IDispatchToPtr($oShockwaveFlash), $dtagIUnknown)
    If Not IsObj($oFlashInterface) Then Return SetError(2, 0, False)
    Local $oFlashMemoryStream = _AutoItObject_ObjectFromDtag("_FlashMemoryStream_", $dtagIStream)
    Local $tIID_IPersistStreamInit = _AutoItObject_CLSIDFromString($sIID_IPersistStreamInit)
    Local $aCall = $oFlashInterface.QueryInterface(Number(DllStructGetPtr($tIID_IPersistStreamInit)), 0)
    Local $pPersistStreamInit = $aCall[2]
    Local $oPersistStreamInit = _AutoItObject_WrapperCreate($pPersistStreamInit, $dtagIPersistStreamInit)
    $oPersistStreamInit.InitNew()
    $oPersistStreamInit.Load(Number($oFlashMemoryStream.__ptr__))
    Return True
EndFunc   ;==>_FlashLoadMemory

; IStream definition, custom implementation:
Func _FlashMemoryStream_QueryInterface($pSelf, $pRIID, $pObj)
    #forceref $pSelf, $pRIID, $pObj
    Return 0x80004002 ; E_NOINTERFACE
EndFunc   ;==>_FlashMemoryStream_QueryInterface
Func _FlashMemoryStream_AddRef($pSelf)
    #forceref $pSelf
    Return 0x80004001 ; E_NOTIMPL
EndFunc   ;==>_FlashMemoryStream_AddRef
Func _FlashMemoryStream_Release($pSelf)
    #forceref $pSelf
    Return 0x80004001 ; E_NOTIMPL
EndFunc   ;==>_FlashMemoryStream_Release
Func _FlashMemoryStream_Read($pSelf, $pBuffer, $iCb, $pRead)
    #forceref $pSelf
    If $iPos = 0 And $iCb = 4 Then
        DllStructSetData(DllStructCreate("char[4]", $pBuffer), 1, "fUfU")
        $iPos += 4
    ElseIf $iPos = 4 And $iCb = 4 Then
        DllStructSetData(DllStructCreate("dword", $pBuffer), 1, $iSizeData)
        $iSizeData += 8
        $iPos += 4
    Else
        If $iPos + $iCb > $iSizeData Then $iCb = $iSizeData - $iPos
        If $iCb = 0 Then Return 1 ; S_FALSE
        DllStructSetData(DllStructCreate("byte[" & $iCb & "]", $pBuffer), 1, BinaryMid($vVar, 1 + $iPos - 8, $iCb))
        If $pRead Then DllStructSetData(DllStructCreate("dword", $pRead), 1, $iCb)
        $iPos += $iCb
    EndIf
    Return 0 ; S_OK
EndFunc   ;==>_FlashMemoryStream_Read
Func _FlashMemoryStream_Write($pSelf, $pBuffer, $iCb, $iWritten)
    #forceref $pSelf, $pBuffer, $iCb, $iWritten
    Return 0x80004001 ; E_NOTIMPL
EndFunc   ;==>_FlashMemoryStream_Write
Func _FlashMemoryStream_Seek($pSelf, $iMove, $iOrigin, $iNewPos)
    #forceref $pSelf, $iMove, $iOrigin, $iNewPos
    Return 0x80004001 ; E_NOTIMPL
EndFunc   ;==>_FlashMemoryStream_Seek
Func _FlashMemoryStream_SetSize($pSelf, $iNewSize)
    #forceref $pSelf, $iNewSize
    Return 0x80004001 ; E_NOTIMPL
EndFunc   ;==>_FlashMemoryStream_SetSize
Func _FlashMemoryStream_CopyTo($pSelf, $pStream, $iCb, $pRead, $pWritten)
    #forceref $pSelf, $pStream, $iCb, $pRead, $pWritten
    Return 0x80004001 ; E_NOTIMPL
EndFunc   ;==>_FlashMemoryStream_CopyTo
Func _FlashMemoryStream_Commit($pSelf, $iCommitFlags)
    #forceref $pSelf, $iCommitFlags
    Return 0x80004001 ; E_NOTIMPL
EndFunc   ;==>_FlashMemoryStream_Commit
Func _FlashMemoryStream_Revert($pSelf)
    #forceref $pSelf
    Return 0x80004001 ; E_NOTIMPL
EndFunc   ;==>_FlashMemoryStream_Revert
Func _FlashMemoryStream_LockRegion($pSelf, $iOffset, $iCb, $iLockSize)
    #forceref $pSelf, $iOffset, $iCb, $iLockSize
    Return 0x80004001 ; E_NOTIMPL
EndFunc   ;==>_FlashMemoryStream_LockRegion
Func _FlashMemoryStream_UnlockRegion($pSelf, $iOffset, $iCb, $iLockSize)
    #forceref $pSelf, $iOffset, $iCb, $iLockSize
    Return 0x80004001 ; E_NOTIMPL
EndFunc   ;==>_FlashMemoryStream_UnlockRegion
Func _FlashMemoryStream_Stat($pSelf, $pStatstg, $iFlag)
    #forceref $pSelf, $pStatstg, $iFlag
    Return 0x80004001 ; E_NOTIMPL
EndFunc   ;==>_FlashMemoryStream_Stat
Func _FlashMemoryStream_Clone($pSelf, $pStream)
    #forceref $pSelf, $pStream
    Return 0x80004001 ; E_NOTIMPL
EndFunc   ;==>_FlashMemoryStream_Clone


; On Error
Func _ErrFunc()
    ConsoleWrite("COM Error, ScriptLine(" & $oError.scriptline & ") : Number 0x" & Hex($oError.number, 8) & " - " & $oError.windescription & @CRLF)
EndFunc   ;==>_ErrFunc

;Code was generated by: File to Base64 String Code Generator
Func _SWF_Anim($name)
return  _Resource_GetAsBytes($name)
endfunc
Link to comment
Share on other sites

I hope everyone is holding on to their hats, because at 20:00 GMT a new version of ResourcesEx UDF will be coming.

 

>> http://wwp.greenwichmeantime.com/

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 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: 22/04/2018

Link to comment
Share on other sites

  • Moderators

guinness,

Hat firmly held! :D

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Today of course.

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 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: 22/04/2018

Link to comment
Share on other sites

Quite a bit of work has been done over the course of 7 days (thanks to UEZ and Melba23 for the Mp3 code snippet). I now feel this has surpassed the original (Zedna's) UDF and feel it's worth updating to given that it now includes many useful functions.

Changelog:
2014/07/14:
Added: _Resource_GetAsCursor(), for the loading of animated cursors and standard cursors which can then be used with _WinAPI_SetCursor().
Added: _Resource_GetAsIcon(), for loading icon resource types.
Added: _Resource_LoadFont(), which retrieves a font resource and adds to the current memory of the associated module.
Added: _Resource_SetCursorToCtrlID() and _Resource_SetIconToCtrlID().
Added: Additional resource types to destroy on exit, including $RT_FONT, $RT_ICON and $RT_MENU.
Added: Playing Mp3s to _Resource_LoadSound(). (Thanks to UEZ and Melba23 with changes made by me.)
Changed: _Resource_GetAsBitmap() returns a HTBITMAP handle without converting from hBitmap to HBITMAP.
Changed: _Resource_PlaySound() to _Resource_LoadSound()
Changed: _Resource_SetBitmapToCtrlID() to _Resource_SetImageToCtrlID().
Changed: _SendMessage() to GUICtrlSendMsg().
Changed: Example files.
Changed: Setting $iError in the internal get function.
Changed: Signature of _Resource_Destroy().
Changed: Updated example to reflect major changes to the ResourcesEx UDF.
Changed: Various UDF tweaks that I didn't document because I simply couldn't keep track of all the playing around I did in the last week.
Fixed: _Resource_GetAsImage() not returning an error when a bitmap couldn't be found in the resource table.
Fixed: Retrieving length of a string.
Fixed: Using the current module instead of zero in _Resource_LoadSound().
Fixed: Various comment changes. (Thanks mLipok)
Fixed: Loading resources multiple times. This is fixed thanks to using the internal storage array.
Edit: Typo.

PS. Download is in the original post.

Edited by guinness

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 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: 22/04/2018

Link to comment
Share on other sites

It would be nice to post changelog ...

See above and in the UDF.

Edited by guinness

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 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: 22/04/2018

Link to comment
Share on other sites

Sorry about the misspelling of your name, honest mistake! I know you're Zedna. I will add a changelog to the first post.

Edited by guinness

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 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: 22/04/2018

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...