jpm Posted July 28, 2013 Share Posted July 28, 2013 No it's not a valid expression, but It's not working as I expect a ternary operator to work. I thought it would merge like this : Local $aArray[2] = [0, 1] the expression is only valy if affected to an array. In fact I think that ternary just return non array result Link to comment Share on other sites More sharing options...
FireFox Posted July 28, 2013 Share Posted July 28, 2013 It's not working as I expect a ternary operator to work.I'm wrong on this, I would say that it would be better if it worked for this case too Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted July 28, 2013 Moderators Share Posted July 28, 2013 (edited) Jon,I have found a bug with 3.3.9.13 which is not present in 3.3.8.1 or 3.3.9.4. It comes in 2 parts: - 1. The standard icon order has changed since 3.3.9.4. It used to be blank, red X, + in a box - and is now red X, blank, + in a box. As I use the blank icon from time to time this is annoying - could it be changed back please.- 2. More seriously, if you have #NoTrayIcon in the script, the first 2 of these are not present in the compiled exe. This means that any added icons begin at index -3 and not at index -5. The icons are removed when #NoTrayIcon is present regardless of whether you do or not add icons, and whether you use #pragma or AutoIt3Wrapper directives. In every case the red X and blank icons are not present in the compiled exe if the #NoTrayIcon directive is used. All icons are present in exes compiled with 3.3.8.1 and 3.3.9.4 (all I have installed at present).The various scripts I have tested are as follows:#NoTrayIcon : Comment this out to see the difference Sleep(10)#NoTrayIcon : Comment this out to see the difference #pragma compile(Icon, M:\Program\Au3 Scripts\test.ico) Sleep(10)#NoTrayIcon : Comment this out to see the difference #AutoIt3Wrapper_Icon=M:\Program\Au3 Scripts\test.ico Sleep(10)#NoTrayIcon : Comment this out to see the difference #AutoIt3Wrapper_Icon=M:\Program\Au3 Scripts\test.ico #AutoIt3Wrapper_Res_Icon_Add=M:\Program\Au3 Scripts\test2.ico Sleep(10)#NoTrayIcon : Comment this out to see the difference #pragma compile(Icon, M:\Program\Au3 Scripts\test.ico) #AutoIt3Wrapper_Res_Icon_Add=M:\Program\Au3 Scripts\test2.ico Sleep(10)I inspected the exes with ResHacker and ran then in scripts displaying the icons with their index numbers - every time the same result when the #NoTrayIcon directive was present. M23Edit: The icons are indeed stored in a different order in the "Icon" section, but in fact still appear in the same order in the "Icon Group" section and when accessed by the index. Sorry about that. Edited July 28, 2013 by Melba23 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...
Ascend4nt Posted July 28, 2013 Share Posted July 28, 2013 Firefox, the ability to conditionally create different arrays is interesting, but that doesn't work successfully in most languages. You could theoretically do conditionals for each element though.. something like: Local $bBool = True Local $aArray[2] = [($bBool ? 0 : 1), ($bBool ? 1 : 0) ] ConsoleWrite("[0] = " & $aArray[0] & " [1] = " & $aArray[1] & @CRLF) My contributions: Performance Counters in Windows - Measure CPU, Disk, Network etc Performance | Network Interface Info, Statistics, and Traffic | CPU Multi-Processor Usage w/o Performance Counters | Disk and Device Read/Write Statistics | Atom Table Functions | Process, Thread, & DLL Functions UDFs | Process CPU Usage Trackers | PE File Overlay Extraction | A3X Script Extract | File + Process Imports/Exports Information | Windows Desktop Dimmer Shade | Spotlight + Focus GUI - Highlight and Dim for Eyestrain Relief | CrossHairs (FullScreen) | Rubber-Band Boxes using GUI's (_GUIBox) | GUI Fun! | IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) | Magnifier (Vista+) Functions UDF | _DLLStructDisplay (Debug!) | _EnumChildWindows (controls etc) | _FileFindEx | _ClipGetHTML | _ClipPutHTML + ClipPutHyperlink | _FileGetShortcutEx | _FilePropertiesDialog | I/O Port Functions | File(s) Drag & Drop | _RunWithReducedPrivileges | _ShellExecuteWithReducedPrivileges | _WinAPI_GetSystemInfo | dotNETGetVersions | Drive(s) Power Status | _WinGetDesktopHandle | _StringParseParameters | Screensaver, Sleep, Desktop Lock Disable | Full-Screen Crash Recovery Wrappers/Modifications of others' contributions: _DOSWildcardsToPCRegEx (original code: RobSaunder's) | WinGetAltTabWinList (original: Authenticity) UDF's added support/programming to: _ExplorerWinGetSelectedItems | MIDIEx UDF (original code: eynstyne) (All personal code/wrappers centrally located at Ascend4nt's AutoIT Code) Link to comment Share on other sites More sharing options...
FireFox Posted July 28, 2013 Share Posted July 28, 2013 You could theoretically do conditionals for each element though.. something like:Local $bBool = True Local $aArray[2] = [($bBool ? 0 : 1), ($bBool ? 1 : 0) ] ConsoleWrite("[0] = " & $aArray[0] & " [1] = " & $aArray[1] & @CRLF)Yeah that's what I did Link to comment Share on other sites More sharing options...
FireFox Posted July 28, 2013 Share Posted July 28, 2013 (edited) @JonThe #pragma directives do not work when I have the Run_Obfuscator directive. ;there is no icon on the compiled script (this is a pragma example, it's the same for any pragma directive) #pragma compile(Icon, icon.ico) #AutoIt3Wrapper_Run_Obfuscator=y #include <Constants.au3> MsgBox($MB_SYSTEMMODAL, @AutoItVersion, FileGetVersion(@ScriptFullPath));works fine #pragma compile(Icon, icon.ico) #include <Constants.au3> MsgBox($MB_SYSTEMMODAL, @AutoItVersion, FileGetVersion(@ScriptFullPath))icon.ico Edited July 28, 2013 by FireFox Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted July 28, 2013 Moderators Share Posted July 28, 2013 FireFox,I get the icon in the exe when I run your script using one of my icons. ResHacker shows it present as does this script:#include <GUIConstantsEx.au3> #include <Constants.au3> #include <ButtonConstants.au3> $hGUI = GUICreate("Test", 500, 500) GUICtrlCreateButton("", 10, 10, 40, 40, $BS_ICON) GUICtrlSetImage(-1, "icon_test.exe", 0) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEndM23 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...
guinness Posted July 28, 2013 Share Posted July 28, 2013 FireFox, Do you mind if you include the ico file? 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...
FireFox Posted July 28, 2013 Share Posted July 28, 2013 (edited) @Melba23I posted here because I've talked with guinness and it worked fine for him.@guinnessDone. Edited July 28, 2013 by FireFox Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted July 28, 2013 Moderators Share Posted July 28, 2013 FireFox,I have no problem with the icon you posted. 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...
wraithdu Posted July 28, 2013 Share Posted July 28, 2013 (edited) Get the latest Obfuscator beta. The old versions don't support the pragma directives obviously, and they get stripped out. Edited July 28, 2013 by wraithdu Link to comment Share on other sites More sharing options...
FireFox Posted July 29, 2013 Share Posted July 29, 2013 (edited) Get the latest Obfuscator beta. The old versions don't support the pragma directives obviously, and they get stripped out.Good catch! I thought of this but it seemed irrevelant. Edited July 29, 2013 by FireFox Link to comment Share on other sites More sharing options...
wraithdu Posted July 29, 2013 Share Posted July 29, 2013 I reported the bug originally Link to comment Share on other sites More sharing options...
guinness Posted July 29, 2013 Share Posted July 29, 2013 Argh! I forgot to say to FireFox about Obfuscator. 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...
Moderators Melba23 Posted July 29, 2013 Moderators Share Posted July 29, 2013 (edited) Jon,I have just reinstalled some of the other Betas to check on the #NoTrayIcon bug I reported yesterday. It seems that it was introduced in .13 - .12 and earlier Beta releases still have all the icons when using that directive. I hope that helps in locating the errant code. M23And here are 2 exes just to show the results I get with .13:TrayIcon.exe has 11 icons - NoTrayIcon.exe has only 9 Edited July 29, 2013 by Melba23 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...
Administrators Jon Posted July 29, 2013 Author Administrators Share Posted July 29, 2013 Hmm, I don't see how it's a bug actually - the internal resources aren't documented. It's by design that unused resources (icons/dialogs) are stripped to save space. In this case it only saves 25KB when stripping them out so it's easy enough to not bother and add them back in. But we really can't be in the position of not being able to change the resources in AutoIt because someone has used reshacker to see what's there and then used them. Surely? Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted July 29, 2013 Moderators Share Posted July 29, 2013 Jon,When you add icons using AutoIt3Wrapper, you expect them to begin at -5 - having them begin at -3 when you use #NoTrayIcon is a script-breaking change (that is how I noticed). A fair number of scripts add icons to show their various states in the tray, so this is likely to affect others than just myself.We can easily add a line or 2 to the relevant sections of the AutoIt and Wrapper Help files to explain that the starting index changes when you use NoTrayIcon, but for the sake of a couple of icons I feel that it is an unnecessary annoyance. The difference is about 1k in compiled size after compression - do we really want to break scripts (or cause confusion for the users in the future) for so small a reduction in size? 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...
Moderators Melba23 Posted July 29, 2013 Moderators Share Posted July 29, 2013 Jon,I have just realised that my argument above is self-defeating - as you cannot show the icons in the tray when using #NoTrayIcon! But my script which broke with .13 used the additional icons on buttons in a toolbar and had the #NoTrayIcon directive - that is how I noticed the "new feature" (as you say it is not a bug). So I believe the argument for retaining the full icon set when the directive is used is still valid, even if not correctly expressed in the post above. 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...
Administrators Jon Posted July 29, 2013 Author Administrators Share Posted July 29, 2013 There's no way I can guarantee the order and content of resources just to support undocumented use of what they might be. Unless it's in the main help file saying "compiled exes will have icons resources with these IDs and they never change" it can't be relied upon. If you need a particular icon then you need to add it yourself though the wrapper (and on that point I think this needs to be brought into Aut2Exe natively so it doesn't accidentally break when I change things - should be fairly straightforward now). That said, do all your functions have to be index based? You should really be accessing icons by ID to protect from changes. I did some tests like this: #pragma compile(Icon, C:\Program Files (x86)\AutoIt3\Icons\au3.ico) #AutoIt3Wrapper_Res_Icon_Add=C:\Users\Jonathan\Downloads\AutoIt\test.ICO #AutoIt3Wrapper_Res_Icon_Add=C:\Program Files (x86)\AutoIt3\Icons\au3.ico #AutoIt3Wrapper_Res_Icon_Add=C:\Users\Jonathan\Downloads\AutoIt\test.ICO TraySetIcon(@AutoItExe, "201") Sleep(2000) And it worked fine. Of course this is also undocumented because it "looks" like 201 is used as the first resource hacked icon, but I don't know how that range was generated. More reason to bring this into aut2exe where the range can be set. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
trancexx Posted July 29, 2013 Share Posted July 29, 2013 i detect bug on autoit beta: in beta version inputbox dialog and something will add to resource after compiled, right? if i make inputbox as this way Execute(BinaryToString("0x696E707574626F782820226773222C20226773672229")) the compiler not recognize and not add resource inputbox... inputbox() will be skip (sorry my bad English) I don't know what's current logic on this, but I know that at one point of development the idea was to give users ability to force compiler to add necessary resources. That's why this pragmatic directive: #pragma compile(inputboxres, true) ...was added. Normally all of the resources are added if script code requires it. Special casses are string code evaluations when compiler has no way of knowing what the code needs. This is when programmers should say the compiler what to add. I see some more changes that happened lately which I can't explain becuase they don't make much sense to me. Still that doesn't mean there isn't sense in them, it could be just me not seing the bigger picture (which probably is the case). Your code should still compile and run correctly unless you have strictly forbidden execution of other scripts for your executable. If your exe is allowed to run other scripts (using /AutoIt3ExecuteScript command line option) then all of the resources should be added to your compiled script anyway. I'm sure you will get proper explanation one way or the other. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Recommended Posts