Jump to content

Changing .exe #properties dynamically based on @ScriptName with AutoIt3Wrapper

Recommended Posts

Hi All,

I'm not sure if its possible that I'm trying to achieve, I've looked into https://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/AutoIt3Wrapper.html and such resources for help, but I cant really find the answer to my question.

So upon compiling the script in SciTE, the exe file is given a Description under file Properties>Details. I understand, that  one can enter info manually there and it can even implement the version automatically with each compilation.


What I'm trying to achieve is to somehow include the "@ScriptName" in the Details>File Description Field. But as I see no variable can be taken after "#" in this case.


Do You think its achievable? (Win 10)


Much obliged for taking time on reading this.


Kind Regards,


2021-06-08 15_07_01-Create New Topic - AutoIt Forums.png

2021-06-08 15_07_51-C__Automation_Autonoti_AutomaticNotification_v2_Lebanon.au3 _ SciTE [1 of 2].png

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

    No registered users viewing this page.

  • Similar Content

    • By edubensa
      Hi! Can someone help me with this? I upgraded from SciTe Edit Lite to full version. Now every time I edit a script it opens on a new SciTe tab, but I want it opens on a new window like before the upgrade. Can someone help me with that? Thanks!!
    • By BugFix
      When posting scripts to platforms that use different tab settings (e.g. GitHub), they are ripped from their formatting.
      Thus, it is better to replace all tabs with spaces in the correct position before posting. I have created the following Lua script for this purpose. It replaces all tabs with the appropriate number of spaces in the document opened in SciTE. By default a tab width of 4 characters is used. But other values are also possible, details about this and the installation and usage are at the beginning of the script.
      -- TIME_STAMP 2022-05-01 11:28:55 v 0.1 --[[ == Installation == • Store the file to "YOUR-PATH/TabReplaceSciTE.lua" • New entry in your "SciTEUser.properties" (find a free command number, in example is "49" used, and a free shortcut) #49 Replace TAB with spaces command.name.49.*=Replace TAB with spaces command.49.*=dofile "YOUR-PATH/TabReplaceSciTE.lua" command.mode.49.*=subsystem:lua,savebefore:no command.shortcut.49.*=Ctrl+Alt+Shift+R • If your sources has different values for TAB width, you can modify the command call in this script (last line), "TabReplace_FileInSciTE(2)" or "TabReplace_FileInSciTE(8)". Or add a property to your "SciTEUser.properties" to have more flexibility: # The currently used tab.size, which is replaced by spaces # Without this property or with empty value "4" is used. tab.replace.width=2 Then change the last line in this script to: TabReplace_FileInSciTE(props['tab.replace.width']) == Usage == • Open any script. • Hit the shortcut. • In the opened document, all TAB will be replaced by the number of spaces corresponding to the TAB position in the line. ]] ---------------------------------------------------------------------------------------------------- --[[ in...: _line A line of text whose TAB are to be replaced by spaces. .....: _tabsize TAB size in number of characters. If it is omitted, 4 is used. out..: The line, with TAB replaced if necessary, and the number of replacements. ]] ---------------------------------------------------------------------------------------------------- TabReplace_Line = function(_line, _tabsize) if _line:find('^[\r\n]+$') then return _line, 0 end -- only a line break if _line == '' then return _line, 0 end -- only a empty string local posTab = _line:find('\t') if posTab == nil then return _line, 0 end -- no TAB included _tabsize = _tabsize or 4 -- default TAB width local tTab, s, sRep, iLen, sumLen = {}, ' ', '', 0, 0 while posTab ~= nil do -- calculation replacement string, taking into account characters to be inserted iLen = (_tabsize - ((posTab + sumLen -1) % _tabsize)) sumLen = sumLen + iLen -1 -- total length of the replacements sRep = s:rep(iLen) -- create replacement string table.insert(tTab, sRep) -- save to table posTab = _line:find('\t', posTab +1) -- find next TAB end local idx = 0 _line = _line:gsub('\t', function() idx = idx +1 return tTab[idx] end) return _line, idx end ---------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------- --[[ Replaces all TAB in the file currently open in SciTE ]] ---------------------------------------------------------------------------------------------------- TabReplace_FileInSciTE = function(_tabsize) local caret = editor.CurrentPos local fvl = editor.FirstVisibleLine local content = '' if _tabsize == '' then _tabsize = nil end for i=0, editor.LineCount -1 do local line = editor:GetLine(i) line = line or '' line = TabReplace_Line(line, _tabsize) content = content..line end editor:BeginUndoAction() editor:ClearAll() editor:InsertText(0, content) editor:EndUndoAction() editor.CurrentPos = caret editor:SetSel(caret, caret) editor.FirstVisibleLine = fvl end ---------------------------------------------------------------------------------------------------- TabReplace_FileInSciTE(4) -- If required: Change the TAB size here  
    • By WilliamasKumeliukas
      Hello everyone,
      I started this project alone in May 2020 as project in my spare time at work, I'm working for a IT company that started opening their services to residential customers few months ago and now my position in the company kind of drifted in the doom and gloom world of repetitive tasks like: Reinstallation + Configuration of Windows 10.
      The procedure is very repetitive and I started feeling like being a robot which is the main reason I started this project.
      1. Q: Do you want this project to be accomplished with the usage of AutoIt ONLY or 3rd party tools / Scripts (BATCH / POWERSHELL / VB) ? A: No, if I cannot find a way using AutoIt to accomplish a task I will move to my Plan B which consist of automating an 3rd party tool to accomplish the affected task until a solution is found. 2. Q: What do I get from helping/collaborating in this project? A: I will personally take the responsibility to mention you in the credits of this project. 3. Q: If I have more questions, can I ask? A: Certainly! feel free to ask any questions related to this project! 4. Q: What is the main goal of this project? A: Automating Windows 10 configuration without user interaction needed (as much as possible) ______________________________________________________________________________________________________________________________
      Current progression of the project (more will be added in future)
      « Blue = Info || Yellow = Unfinished/Untested || Purple = Could be better || Green = Done ||Red = Not Yet Started »
      ***Very early Stage ***
      Connect Network Attached Storage(NAS) (Work but missing configuration in GUI - AutoIt only)
      Download & Install up to 600+ softwares (Tested & Working - using 3rd party tool + 50/50 Powershell/AutoIt)
       Auto prediction of Apps name of text typed inside input (Tested & Working - AutoIt Only)
      Change OEM Informations (Tested & Working -  AutoIt)
      Disable hibernation (Tested & Working - AutoIt only)
      Change Computer Name (Work but require testing - AutoIt only) 
      Show Computer Information and Smart status on GUI (Tested & Working - AutoIt Only)
      Change .pdf / .pdfxml from Edge to Adobe Reader DC (Tested & Working - using 3rd party tool)
      Change Edge to Google Chrome as Default Browser (Tested & Working - using 3rd party tool)
      Windows Updater (Seems to work but require further testing - AutoIt only)
      Install Office 365 / 2013 + Activation (To Do)
      Add L2TP VPN Configuration for Windows Built-in VPN (To Do)
      Save / Load tasks configuration profile in (.ini file) to avoid repeating same configuration twice (In progress - AutoIt Only)
      (EXPERIMENTAL) Install Apps from Microsoft Store with UIAutomation UDF made by @junkew(Work if you know what your doing)
         P.S: Installing Apps from Microsoft Store will require usage of  UIA spy tool made by @LarsJ which you can download & learn how to use it on UIA Spy Tool thread.
      ***  If this project interest you, Reply here This will greatly help me to see if you'd like this project to become real  ***
      Best Regards,
    • By mrider
      Greetings all,
      I went looking around for dark themes for SciTE and didn't have much luck.  No wish to necro-post, but I found this post -> A dark theme for SciTE but it seems as if things were ended at a single change for AutoIt where I was hoping for a comprehensive dark theme.  I currently have a dark desktop in Mint where xed, the terminal emulator, vim, and etcetera do an acceptable job of showing the dark theme.  Then I load SciTE and get blinded.  To resolve this, I'm currently working on creating a set of lang.properties files that use the Solarized themes (both light and dark).  The mechanism is simple enough: I wrote a small Perl program which parsed all the properties files and extracted all the distinct color values.  Then I assigned indexes to all the distinct colors, and wrote the colors themselves out to a separate properties file.  Next I parsed that and I used the formula for reducing the color palette to fewer colors as a baseline for generating the Solarized light theme - which turned out surprisingly less awful than I would have guessed.  Next I generated a color theme where all the colors are reversed for the Solarized dark theme.  The result is dark, but the individual source files I look at still need more help (Perl was particularly bad).  At this point, it is possible on my computer to switch to either the Solarized light or dark theme with one line of text in my user options file.
      Now I'm working my way through source-code cleaning up the result.  My first stop is completing Perl, but AutoIt is my next stop.  I'm happy to put the modified files out there for all to use (if you want them).
      I'm willing to do all the legwork for all the properties files.  The problem is that I'm only familiar with some of the languages that SciTE recognizes (for example - I wouldn't know Baan if it bit me on the butt).  I looked all around both the Solarized website and the Scintilla/SciTE website, and I can't find any reference files that can be used to test the colors.  Which means that any language I don't understand will get the colors chosen by the algorithm, which is admittedly fairly rough. 
      Which leads me to this post: What would be particularly useful would be code samples in different languages.  The more of the style numbers that are touched in that language the better.  I don't care if the code is "quality" code, I'm more interested in whether the code snip is properly colorized (for some values of "proper").  I understand that nobody is obligated to help me with "my project".  However, I promise that I will do my best with any code snips in any language and I will post the results here.  I'm using xed and vim as my templates, so my results will (mostly) resemble results there.
      I'll post my work here as time progresses, I'll probably have a working version for Perl and AutoIt in the next few days, and I'll do my best with other languages going forward.  As I say, I welcome code snips in any language that SciTE colorizes using a properties file.
      Edit1: Attached is the first Solarized Version.  I have only tested this in the default install of SciTE.  I'm certain there are going to be differences between the default install and the full version, but I don't yet know what those differences will be.  To use this:
      Detach the zip file. Drop the folder into your profile directory.  For example: C:\Users\mrider\Solarized . Open your local options file in SciTE (Options -> Open User Options File). Add the line "import Solarized\SolarDark" (without the quotes) to your file. You can turn the dark theme on and off with a comment character (#) at the beginning of the statement. Enable "Solar Light" theme similarly using "import Solarized\SolarLight". As I say, this doesn't work in the full version, so only use this if you are using the basic version.  I'll chase the full version next.
      Edit2: Attached is the second Solarized Version.  This works with the full install of SciTe, but so far I've only tested it with Autoit, Batch Files, and Perl.  I'll keep expanding the languages as I go.  To use this:
      Detach the zip file. I had to navigate to "C:\Program Files (x86)\AutoIt3\SciTE" and relax the file permissions to perform the next step. Drop the folder in the SciTE install directory (it doesn't seem to work in one's profile directory). Open your local options file in SciTE (Options -> Open User Options File) - note that this opens the user properties file inside the SciTE directory, not your profile. Add the line "import Solarized\SolarDark" (without the quotes) to your file. You can turn the dark theme on and off with a comment character (#) at the beginning of the statement. Enable "Solar Light" theme similarly using "import Solarized\SolarLight".  
    • By argumentum
      In the console under the editor in SciTE: 
      if I add @@ Debug(line,column) then it goes there.
      if I add "script.au3" (line,column) then it goes there if loaded.
      if I add "c:\path\script.au3" (line,column) then it loads the file and goes there.
      ...so far so good.
      Since I don't know LUA, nor where that is at, my question is ... where is it at ?
      A silly question because once there I would not know what to do, since I don't know LUA.
      What I want to achieve is, that since there is something delimiting the script and editor position (li,co), a way to have, let's say:
      +I like this color and the text that I care for on the left ["c:\path\script.au3" (line,column)]
      and by having this ["" ()] format ( or anything else, it don't have to be this exact format ), the console would know to jump there.
      If DClick to jump/goto Line,Column can trigger an external EXE or script, I'd take it from there. If it all can be done from LUA then, I'd do it there.
      So I don't mind or know how. I just would like that functionality. In a way that don't require a recompile of SciTE.
  • Create New...