BigDaddyO Posted October 30, 2018 Share Posted October 30, 2018 So, after Jos told me about an amazing new (Compile to .a3x) feature in AutoIt, I've been using it successfully. But it's confusing as the .a3x icon is the same as the .au3 files. I used a simple Registry update to change that icon on my system, but shouldn't the AutoIt3 installer be using a different icon for these files by default? Thanks #RequireAdmin RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AutoIt3XScript\DefaultIcon", "", "REG_SZ", "C:\Program Files (x86)\AutoIt3\Icons\au3script_v9.ico") Link to comment Share on other sites More sharing options...
Developers Jos Posted October 30, 2018 Developers Share Posted October 30, 2018 Why? The a3x extension is associated with AutoIt3.exe, so it will show its Icon.... or am I missing something? 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...
BigDaddyO Posted October 30, 2018 Author Share Posted October 30, 2018 Yes it's associated with AutoIt3.exe but it's a totally different file than a normal .au3 Similar to how a .xls icon is different than a .xlsx icon. Link to comment Share on other sites More sharing options...
Developers Jos Posted October 30, 2018 Developers Share Posted October 30, 2018 (edited) There is no separate ico for a3x at this moment so it indeed uses the default autoit3.exe ico, Actually it uses "C:\Program Files (x86)\AutoIt3\Icons\au3script_v11.ico" Jos Edited October 30, 2018 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...
xSunLighTx3 Posted January 28, 2020 Share Posted January 28, 2020 (edited) Would be a good feature to use the icon declared as #AutoIt3Wrapper_Icon=. If you use a3x instead of an compiled autoit script you have some advantages: 1. false positive virus detection would be not exist expect from the autoit.exe interpreter file 2. if you have more than one autoit scripts on this pc (which has no autoit installed), you only have one autoit.exe. This is the logic behind the question I guess. And I just want to try out this method. Edit: A third launcher application (like c++) would execute the autoit3.exe with parameter (a3x file name). Edited January 28, 2020 by xSunLighTx3 Link to comment Share on other sites More sharing options...
Developers Jos Posted January 28, 2020 Developers Share Posted January 28, 2020 4 hours ago, xSunLighTx3 said: Would be a good feature to use the icon declared as #AutoIt3Wrapper_Icon=. How would this help? Jos xSunLighTx3 1 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...
xSunLighTx3 Posted January 29, 2020 Share Posted January 29, 2020 21 hours ago, Jos said: How would this help? Jos So you are able to set an individual icon for the a3x file within the config file. :) My guess was that you could see a specified software icon instead of the autoit icon on the GUI or in the windows taskbar. Link to comment Share on other sites More sharing options...
Developers Jos Posted January 29, 2020 Developers Share Posted January 29, 2020 12 minutes ago, xSunLighTx3 said: So you are able to set an individual icon for the a3x file within the config file. Do not think that works as the Icon is stored in the PE header of a program, which the a3x file doesn't have. Did you actually try? xSunLighTx3 1 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...
BobMerit Posted May 15 Share Posted May 15 (edited) Just my two cents. I just tried this and I could not get it to work. Registry entry had no effect on the program icon for a .a3x. I even tried rebuilding icon cache. No dice. A few years back I tried changing the icon within the AutoIt3.exe, It worked sorta. But that just broke the fact that it is a signed exe which defeats the main purpose of using an .a3x FOUND THIS HERE. IT CAN BE DONE!!! Years I have been trying to find this. ioa747 posted this #NoTrayIcon #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Outfile_type=a3x #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <GUIConstants.au3> #include <WinAPIShellEx.au3> #include <TrayConstants.au3> ; Required for the $TRAY_ICONSTATE_SHOW constant. Opt("TrayMenuMode", 3) ; 1+2 ;0=append, 1=no default menu, 2=no automatic check, 4=menuitemID not return _WinAPI_SetCurrentProcessExplicitAppUserModelID(_WinAPI_CreateGUID()) ; ensure a unique ID, neded for TaskBar icon TraySetIcon("shell32.dll", 239) ; Set the tray menu icon GUICreate("My Custom GUI", 300, 200) GUISetIcon(@SystemDir & "\shell32.dll", 239) ; Set the Window & TaskBar icon icon GUISetState(@SW_SHOW) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Edited May 15 by BobMerit Link to comment Share on other sites More sharing options...
argumentum Posted May 15 Share Posted May 15 (edited) 1 hour ago, BobMerit said: Not being able to change the icon within a .a3x is just a sad situation. Look, a file type, say: .pdf or .txt, is no different from .au3 or a3x. If you would like an specific icon for your running script ( au3 or a3x ) just declare it. Use _WinAPI_SetCurrentProcessExplicitAppUserModelID() to separate your scripts from one another: #include <WinAPIShellEx.au3> _WinAPI_SetCurrentProcessExplicitAppUserModelID('MyScript-' & @AutoItPID) If StringInStr($CmdLineRaw, "/reRunLikeOnTV") Then $hGui = GUICreate("", 0, 0, 0, 0) GUISetIcon(StringLeft(@AutoItExe, StringInStr(@AutoItExe, "\", 0, -1)) & 'icons\MyAutoIt3_' & $CmdLine[2] & '.ico') GUISetState() TraySetIcon(StringLeft(@AutoItExe, StringInStr(@AutoItExe, "\", 0, -1)) & 'icons\MyAutoIt3_' & $CmdLine[2] & '.ico') MsgBox(262144, $CmdLine[2] & ' Script', $CmdLine[2] & ' icon', 60, $hGui) GUIDelete() Exit EndIf ShellExecute(@AutoItExe, '"' & @ScriptFullPath & '" /reRunLikeOnTV Green') ShellExecute(@AutoItExe, '"' & @ScriptFullPath & '" /reRunLikeOnTV Red') Edited May 15 by argumentum better code Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
argumentum Posted May 15 Share Posted May 15 53 minutes ago, BobMerit said: Edited 20 minutes ago by BobMerit ...glad you found it. Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. 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