Jump to content

Recommended Posts

Posted
5 hours ago, Melba23 said:

R0G,

Worked straight off the bat - image in the same folder as the script:

#AutoIt3Wrapper_Res_File_Add=test.jpg, RT_RCDATA, JPG_1, 0

#include <GUIConstantsEx.au3>

#include "ResourcesEx.au3"

$hGUI = GUICreate("Test", 500, 500)

$cPic = GUICtrlCreatePic("", 10, 10, 480, 480)
_Resource_SetToCtrlID($cPic, "JPG_1")

GUISetState()

While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            _Resource_DestroyAll()
            Exit
    EndSwitch
WEnd

M23

Strange.. Can't seem to get it working. Must be a problem on my end.

Procedure:

1. Used above script, image next to script. Image used: (jpg_1.jpg) that came with the UDF example and renamed to (test.jpg)

2. (Ctrl+F7) to compile script.

3. Ran test.exe - No image displayed?

Other info:

SciTE-Lite: V3.5.4

ResourcesEx UDF: Latest, Installed UDF contents to Include folder at Autoit dir.

  • Developers
Posted
7 hours ago, R0G said:

SciTE-Lite: V3.5.4

That will not work as it doesn't run AutoIt3Wrapper. Install the separate SciTE4AutoIt3 installer and you should be good.

Jos 

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted
10 hours ago, Jos said:

That will not work as it doesn't run AutoIt3Wrapper. Install the separate SciTE4AutoIt3 installer and you should be good.

Jos 

I thought AutoIt3Wrapper came with Autoit automatically.. guess i was mistaken.. Thanks Jos and Melba23 for your help :)

Posted (edited)

I have added a massive warning to the first post, as I assumed people would understand that the SciTE included with AutoIt was limited, but seems I was mistaken.

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

  • 1 month later...
Posted (edited)

i have some dll with about 113 $RT_RCDATA resources

and script extracts only about 70-80 and get error ($RESOURCE_ERROR_LOADLIBRARY)

on second run it successfuly extracts remain resources

may be some memory leak ?

This bug only on 32-bit os (WinXP, Win7)

on Win7X64 - all ok.

#include "ResourcesEx.au3"

Local $j, $sk, $sTmp, $AutoItDll = "vanLotery.dll"
$sTmp = ".\JPG_GAL_"
$j = 0

Do

  $j += 1
  $sk = StringFormat("%03s", $j)
  If Not FileExists($sTmp & $sk & ".jpg") Then
    _Resource_SaveToFile($sTmp & $sk & ".jpg", "JPG_GAL_" & $sk, $RT_RCDATA, Default, 1, $AutoItDll)
    ;_Resource_GetAsBytes("JPG_GAL_" & $sk, $RT_RCDATA, Default, $AutoItDll)
    ;_Resource_GetAsRaw("JPG_GAL_" & $sk, $RT_RCDATA, Default, $AutoItDll)
    If @error = 0 Then
      ;
    Else
      MsgBox(0, "", @error & '|' & $j)
      ExitLoop
    EndIf
  EndIf

Until 0

 

Edited by Adm682860
  • 5 months later...
Posted (edited)

hello, great asset!

but I have a problem with _Resource_LoadSound, when i set flag $SND_ASYNC for mp3 file - music just not playing and code skips to next line. Code below -->

#AutoIt3Wrapper_UseX64=n
;#AutoIt3Wrapper_Res_File_Add=c:\Files\a2002011001-e02.wav, SOUND, GBMP3; working for WAV files
#AutoIt3Wrapper_Res_File_Add=c:\Files\DJ ENZOOOO - Lotus Turbo Challenge 2.mp3, RT_RCDATA, GBMP3

#include <ResourcesEx.au3>


$playthissong = _Resource_LoadSound('GBMP3', $SND_ASYNC); when I set $SND_SYNC it's working for MP3, but of course script freezes until mp3 is finished, for WAVE sync and async works perfectly

SplashTextOn("Info", "if you set $SND_ASYNC, mp3 music should be played right now?", 300, 100, -1, 100, -1, "", 12)
   Sleep(8000)
   SplashOff()

Am I doing something wrong?

Edited by beeria
  • Moderators
Posted

beeria,

That code snippet runs perfectly with one of my mp3 files - the splash is shown while the mp3 plays.

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

 

Posted

hmm, that's weird... I've tried 4 or 5 different mp3 with the same bad results... Could you please send me (or upload somewhere) mp3 which is working for you?

  • Moderators
Posted

beeria,

PM sent.

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

 

  • Moderators
Posted

beeria,

If you look at post 44 of this thread you will see that the function which plays the music files (originally written by myself)  actually converts mp3 files into hybrid wav files so that they can be played. It might well be the case that your mp3 files do not become valid wav files when altered by the function - a place to start looking certainly.

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

 

Posted (edited)

yeah, already saw this post. Weird thing is, that my mp3 converted to hybrid wave plays fine in sync mode, but doesn't play at all in async mode:(

i'll try to save wave file as mp3 with various encoding settings and present the results in this topic.

edit:

it definitely was the problem with my mp3 files

i've played around with goldwave editor and encoded mp3 with LAME codec: various settings - from 128kbps to 320kbps, mono/stereo/joint stereo - all works fine

Edited by beeria
  • 1 month later...
Posted (edited)

Hi,

Using  _Resource_SetToCtrlID to set an png image, as I understand it $bResize is set to
"Resize the image based on the controlid's dimensions. Default is False"

In the UDF function I couldn't find anything in respect to the image resizing if (True)

So actually if I am switching an image with another image on to the same controlID, the image loads to its own size rather then what is set by the controlID 

what can be a suggested work-around for doing this ?

Thanks

Edit : resolved:

Local $State = ControlGetPos(GUICtrlGetHandle($ControlID),"",0)
_Resource_SetToCtrlID($ControlID, 'PNG_4')
GUICtrlSetPos($ControlID, $State)
;if having other settings as in my case, needed to add;->
GUICtrlSetPos($ControlID,'left' *$DPI_var,'top' *$DPI_var,'width' *$DPI_var,'height' *$DPI_var)

 

Edited by Deye
  • 4 weeks later...
Posted (edited)

@guinness i have a problem-request.

I have multiple audio file, and i'll combine based on the situation. So i need to use $SND_SYNC so i can play file1.mp3 and when the first finish the file2.mp3 but that will pause the script. I have try to use AdlibRegister without success, still pause the script. The question is:

Is possible to avoid that behaviour? Yes-No

EDIT: Yes, is possible. It was easier than I thought :)

Edited by Terenz

Nothing is so strong as gentleness. Nothing is so gentle as real strength

 

  • 4 weeks later...
Posted

Hey,

I have an issue with the ResourcesEX include and don't know what I'm doing wrong.

My script works fine but as soon as I include ResourcesEX or ResourcesEX_PE I get a lot of error messages when trying to compile the script.

 

Spoiler
C:\Program Files (x86)\AutoIt3\Include\WinAPIInternals.au3(581,16) : ERROR: syntax error (illegal character)
    Return $bTest ?
    ~~~~~~~~~~~~~~^
C:\Program Files (x86)\AutoIt3\Include\WinAPIGdi.au3(25,71) : WARNING: $tagBITMAPINFOHEADER: possibly used before declaration.
Global Const $tagDIBSECTION = $tagBITMAP & ';' & $tagBITMAPINFOHEADER &
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files (x86)\AutoIt3\Include\ResourcesEX.au3(16,39) : ERROR: syntax error (illegal character)
OnAutoItExitRegister(_GDIPlus_Shutdown)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files (x86)\AutoIt3\Include\ResourcesEX.au3(17,42) : ERROR: syntax error
OnAutoItExitRegister(_Resource_DestroyAll)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files (x86)\AutoIt3\Include\ResourcesEX.au3(242,75) : ERROR: syntax error
    Return __Resource_Storage($RESOURCE_STORAGE_DESTROY, $sDllOrExePath, Null,
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files (x86)\AutoIt3\Include\ResourcesEX.au3(242,129) : ERROR: syntax error
    Return __Resource_Storage($RESOURCE_STORAGE_DESTROY, $sDllOrExePath, Null, $sResNameOrID, $iResType, $iResLang, $iResType, Null)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files (x86)\AutoIt3\Include\ResourcesEX.au3(259,62) : ERROR: syntax error
    Return __Resource_Storage($RESOURCE_STORAGE_DESTROYALL, Null,
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files (x86)\AutoIt3\Include\ResourcesEX.au3(339,29) : ERROR: syntax error
    Local $dBytes = Binary(Null)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files (x86)\AutoIt3\Include\ResourcesEX.au3(625,58) : ERROR: syntax error (illegal character)
            $iCreatePath = (IsBool($bCreatePath) And $bCreatePath ?
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files (x86)\AutoIt3\Include\ResourcesEX.au3(625,60) : ERROR: unbalanced paranthesis expression.
            $iCreatePath = (IsBool($bCreatePath) And $bCreatePath ? $FO_CREATEPATH
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files (x86)\AutoIt3\Include\ResourcesEX.au3(791,107) : ERROR: syntax error (illegal character)
                            __Resource_Storage($RESOURCE_STORAGE_ADD, $sDllOrExePath, $hHBITMAP, $sResNameOrID, $iResType, Null,
                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files (x86)\AutoIt3\Include\ResourcesEX.au3(952,140) : ERROR: syntax error
Func __Resource_Get($sResNameOrID, $iResType = $RT_RCDATA, $iResLang = Default, $sDllOrExePath = Default, $iCastResType = Default, $aPos = Null
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files (x86)\AutoIt3\Include\ResourcesEX.au3(952,145) : ERROR: __Resource_Get() called by a previous line with 6 arg(s). Max = 0. First previous line calling this Func is 311.
Func __Resource_Get($sResNameOrID, $iResType = $RT_RCDATA, $iResLang = Default, $sDllOrExePath = Default, $iCastResType = Default, $aPos = Null)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files (x86)\AutoIt3\Include\ResourcesEX.au3(953,146) : ERROR: syntax error
    If $iResType = $RT_RCDATA And StringStripWS($sResNameOrID, $STR_STRIPALL) = '' Then Return SetError($RESOURCE_ERROR_INVALIDRESOURCENAME, 0, Null)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files (x86)\AutoIt3\Include\ResourcesEX.au3(960,79) : ERROR: syntax error
            $vResource = __Resource_Storage($RESOURCE_STORAGE_GET, $sDllOrExePath, Null,
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files (x86)\AutoIt3\Include\ResourcesEX.au3(960,137) : ERROR: syntax error
            $vResource = __Resource_Storage($RESOURCE_STORAGE_GET, $sDllOrExePath, Null, $sResNameOrID, $iResType, $iResLang, $iCastResType, Null)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files (x86)\AutoIt3\Include\ResourcesEX.au3(970,60) : ERROR: syntax error (illegal character)
    Local $hResource = (($iResLang <> $RESOURCE_LANG_DEFAULT) ?
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files (x86)\AutoIt3\Include\ResourcesEX.au3(970,62) : ERROR: unbalanced paranthesis expression.
    Local $hResource = (($iResLang <> $RESOURCE_LANG_DEFAULT) ? _WinAPI_FindResourceEx
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files (x86)\AutoIt3\Include\ResourcesEX.au3(970,106) : ERROR: $iResType already declared as parameter.
    Local $hResource = (($iResLang <> $RESOURCE_LANG_DEFAULT) ? _WinAPI_FindResourceEx($hInstance, $iResType,
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files (x86)\AutoIt3\Include\ResourcesEX.au3(970,121) : ERROR: $sResNameOrID already declared as parameter.
    Local $hResource = (($iResLang <> $RESOURCE_LANG_DEFAULT) ? _WinAPI_FindResourceEx($hInstance, $iResType, $sResNameOrID,
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files (x86)\AutoIt3\Include\ResourcesEX.au3(970,132) : ERROR: syntax error
    Local $hResource = (($iResLang <> $RESOURCE_LANG_DEFAULT) ? _WinAPI_FindResourceEx($hInstance, $iResType, $sResNameOrID, $iResLang)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files (x86)\AutoIt3\Include\WinAPIGdi.au3(25,71) : ERROR: $tagBITMAPINFOHEADER: undeclared global variable.
Global Const $tagDIBSECTION = $tagBITMAP & ';' & $tagBITMAPINFOHEADER &
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\_GIT_alfaboot\ACS\acs\acs.au3(15,29) : ERROR: _Exit(): undefined function.
OnAutoItExitRegister("_Exit")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files (x86)\AutoIt3\Include\ResourcesEX.au3(242,129) : ERROR: __Resource_Storage(): undefined function.
    Return __Resource_Storage($RESOURCE_STORAGE_DESTROY, $sDllOrExePath, Null, $sResNameOrID, $iResType, $iResLang, $iResType, Null)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files (x86)\AutoIt3\Include\ResourcesEX.au3(564,71) : ERROR: __Resource_LoadModule(): undefined function.
    Local $hInstance = __Resource_LoadModule($sDllOrExePath, $bIsInternal)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files (x86)\AutoIt3\Include\ResourcesEX.au3(599,50) : ERROR: __Resource_UnloadModule(): undefined function.
    __Resource_UnloadModule($hInstance, $bIsInternal)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files (x86)\AutoIt3\Include\ResourcesEX.au3(672,90) : ERROR: __Resource_SetToCtrlID(): undefined function.
    Local $bReturn = __Resource_SetToCtrlID($iCtrlID, $hHBITMAP, $RT_BITMAP, False, $bResize)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files (x86)\AutoIt3\Include\ResourcesEX.au3(770,38) : ERROR: __Resource_GetCtrlId(): undefined function.
    __Resource_GetCtrlId($hWnd, $iCtrlID)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files (x86)\AutoIt3\Include\ResourcesEX.au3(909,59) : ERROR: _GDIPlus_BitmapCreateFromStream(): undefined function.
    Local $hBitmap = _GDIPlus_BitmapCreateFromStream($pStream)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

 

 

Other includes that I use in the script are:

 

#include <Date.au3>
#include <WinAPI.au3>
#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>
#include <Misc.au3>
#include <String.au3>
#include <MsgBoxConstants.au3>
#include <Timers.au3>

I hope someone can help me to get the functions included in the UDF working because I need to use the _Resource_SetImageToCtrl function in my script.

I have AutoIT 3.3.8.1 and Scite 3.2.0.0 running.

The whole script would be too much to post here but if you need any more information just let me know.

 

Thanks in advance!

Cheers htrd

  • 3 months later...
Posted

Can someone know how to get an enumeration of all string resources in the DLL? I tried to implement as follows, but the resulting row names are different from the actual ones:

#include <APIResConstants.au3>
#include <Array.au3>
#include <WinAPIRes.au3>

Local $aData = _WinAPI_EnumResourceNames(@SystemDir & '\shell32.dll', $RT_STRING)
Local $hInstance = _WinAPI_LoadLibraryEx(@SystemDir & '\shell32.dll', $LOAD_LIBRARY_AS_DATAFILE)
Local $StringData[0][2]
;_ArrayDisplay($aData, '_WinAPI_EnumResourceNames')
For $i = 2 To $aData[0]
    _ArrayAdd($StringData, $aData[$i] & '|' & _WinAPI_LoadString($hInstance, $aData[$i]))
Next
_ArrayDisplay($StringData)

 

  • 6 months later...
Posted

@guinness, thanks for the great work. But when I compiled my script on the new AutoIT version, the ResourcesEx.au3 needs an include file:

#include <WinAPISysWin.au3> needed by _WinAPI_SetWindowLong

Regards,

Jowy

  • 7 months later...
  • 5 months later...
Posted
On 6/2/2016 at 8:50 PM, Melba23 said:

R0G,

Worked straight off the bat - image in the same folder as the script:

#AutoIt3Wrapper_Res_File_Add=test.jpg, RT_RCDATA, JPG_1, 0

#include <GUIConstantsEx.au3>

#include "ResourcesEx.au3"

$hGUI = GUICreate("Test", 500, 500)

$cPic = GUICtrlCreatePic("", 10, 10, 480, 480)
_Resource_SetToCtrlID($cPic, "JPG_1")

GUISetState()

While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            _Resource_DestroyAll()
            Exit
    EndSwitch
WEnd

M23

Line 12195  (File "C:\Users\wWw\Desktop\ResourcesEx\Examples\Yeni AutoIt v3 Script.exe"):


Error: Unknown function name.

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
  • Recently Browsing   0 members

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