legend Posted January 2, 2016 Share Posted January 2, 2016 What I did:_Crypt_EncryptFile(@scriptdir & "\resources\config.ini", @scriptdir & "\resources\encrypted_config.ini", "123", $CALG_RC4)And when reading it, I first use Crypt_DecryptData and then I use _Resource_GetAsString For reading the a file in binary mode (16) I haven't figured out yet, I will think more about that one Link to comment Share on other sites More sharing options...
guinness Posted January 2, 2016 Author Share Posted January 2, 2016 Great @legend 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...
legend Posted January 25, 2016 Share Posted January 25, 2016 (edited) not possible way that I can compile from aut2exe, without having to use SciTE to compile it? Edited January 25, 2016 by legend Link to comment Share on other sites More sharing options...
Developers Jos Posted January 25, 2016 Developers Share Posted January 25, 2016 Yes you can compile scripts without SciTE as it ONLY requires aut2exe.exe. 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. Link to comment Share on other sites More sharing options...
legend Posted January 25, 2016 Share Posted January 25, 2016 Hi Jos, It's only adding the resources if you compile from SciTE Link to comment Share on other sites More sharing options...
Developers Jos Posted January 25, 2016 Developers Share Posted January 25, 2016 (edited) Not when you use the #pragma statements which are executed by aut2exe! Also, it isn't SciTE that performs the #AutoIt3wrapper_directives, but rather AutoIt3Wrapper, which also doesn't require SciTE! Jos Edited January 25, 2016 by 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. Link to comment Share on other sites More sharing options...
legend Posted January 25, 2016 Share Posted January 25, 2016 Thank's for your reply But i'm very unsure of how to compile it with resources, using https://www.autoitscript.com/autoit3/docs/keywords/pragma.htm https://www.autoitscript.com/autoit3/docs/directives/pragma-compile.htm Link to comment Share on other sites More sharing options...
Developers Jos Posted January 25, 2016 Developers Share Posted January 25, 2016 Have you tried? What is the question? 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. Link to comment Share on other sites More sharing options...
legend Posted January 25, 2016 Share Posted January 25, 2016 I tried with #pragma compile(AutoItExecuteAllowed, true) but no luck Link to comment Share on other sites More sharing options...
Developers Jos Posted January 25, 2016 Developers Share Posted January 25, 2016 Please try to be more explicit and explain better what the issues or question is. So, What do you mean with: No luck? what did you do to check whether that was performed by aut2exe or not? 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. Link to comment Share on other sites More sharing options...
legend Posted January 26, 2016 Share Posted January 26, 2016 (edited) edit figured it out thanks. Edited January 26, 2016 by legend Link to comment Share on other sites More sharing options...
legend Posted January 26, 2016 Share Posted January 26, 2016 (edited) I can't seem to get __resource_destroy to work properly: __Resource_Destroy This is what i'm trying: MsgBox("","",_Resource_GetAsString("TXT_1")) ;_Resource_Destroy("TXT_1", $iResType = $RT_RCDATA) _Resource_Destroy("TXT_1", 10) MsgBox("","",_Resource_GetAsString("TXT_1")) Regarding this https://www.autoitscript.com/trac/autoit/attachment/ticket/494/Some_WinAPI_ResourceFunctions.au3 $iResType should be 10: $RT_RCDATA = 10 But the resource type is unknown, http://prntscr.com/9v8y14 But After destroying it, I will still get the string from the txt file resource, If I use _Resource_DestroyAll then it will work fine, but I don't want to destroy all, only 1 specific resource Edited January 26, 2016 by legend Link to comment Share on other sites More sharing options...
guinness Posted January 27, 2016 Author Share Posted January 27, 2016 (edited) I see no issues in the tests I have conducted. Of course it works like that, using destroy only removes from memory, but you read the resource again so it's added to the memory again. Edited January 27, 2016 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 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...
legend Posted January 27, 2016 Share Posted January 27, 2016 That gives sense, thank you :). It is possible to verify if it destroyed the resource or not Link to comment Share on other sites More sharing options...
shotiko Posted May 9, 2016 Share Posted May 9, 2016 (edited) #AutoIt3Wrapper_Res_File_Add=sources\test.mp3, SOUND, mp3_1, 0 #include "ResourcesEx.au3" _Resource_LoadSound('mp3_1') _Resource_LoadSound('mp3_1', $SND_ASYNC) Sleep(5000) does this really play mp3 as UDF states? I tried wav instead and it worked but not mp3 example file also includes wav file which works. Edit: Quote _ResourcePlaySound() plays only WAV files (not MP3 files) [FIXED] on the first page seems it doesn't really play mp3 Edited May 9, 2016 by shotiko reread first post Link to comment Share on other sites More sharing options...
R0G Posted May 28, 2016 Share Posted May 28, 2016 (edited) #AutoIt3Wrapper_Res_File_Add=jpg_1.jpg, RT_RCDATA, JPG_1, 0 #include "ResourcesEx.au3" #include <GUIConstantsEx.au3> Local Const $iHeight = 450, $iWidth = 470 $g_hGUI = GUICreate('JPG Example', $iWidth, $iHeight, Default, Default, BitOR($GUI_SS_DEFAULT_GUI, $WS_MAXIMIZEBOX, $WS_SIZEBOX)) GUISetState(@SW_SHOW, $g_hGUI) Local $iPic_3 = GUICtrlCreatePic('', 0, 0, 200, 100) _Resource_SetToCtrlID($iPic_3, 'JPG_1') While 1 If GUIGetMsg() = -3 Then _Resource_DestroyAll() GUIDelete($g_hGUI) Exit EndIf WEnd Can't get image to display? Any help is appreciated. Code taken directly from the ResourcesEx UDF example.au3. jpg_1.jpg is right next to scriptdir. Edited May 29, 2016 by R0G Link to comment Share on other sites More sharing options...
Developers Jos Posted May 29, 2016 Developers Share Posted May 29, 2016 9 hours ago, R0G said: Can't get image to display? Any help is appreciated. You are compiling the script first...right? 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. Link to comment Share on other sites More sharing options...
R0G Posted May 30, 2016 Share Posted May 30, 2016 On 5/29/2016 at 3:18 AM, Jos said: You are compiling the script first...right? Jos Yes, with Ctrl + F7 within Scite. If i change this line Local $iPic_3 = GUICtrlCreatePic('', 0, 0, 200, 100) to this Local $iPic_3 = GUICtrlCreatePic('jpg_1.jpg', 0, 0, 200, 100) I can see the image. Link to comment Share on other sites More sharing options...
R0G Posted June 2, 2016 Share Posted June 2, 2016 If anyone can make a script that uses this UDF to store and display a .jpg image, i would appreciate it. Tried again and again but to no avail. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 2, 2016 Moderators Share Posted June 2, 2016 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 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 columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area 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