Page 1 of 2

App launcher

Posted: 06 Jul 2018 11:51
by highend
Loving the new "user defined icon" possibilities for inputselect() and finally it makes sense to use XY for launching apps...

So, here is v1.0 of "App laucher"...

On it's first start it will write an .ini file with the same base name of the script into the same folder.
It contains a few sample entries to see how it works. Uncomment them if you want them and read
the annotations in this .ini file (or in the script)!

It looks like this:
app_launcher.png
app_launcher.png (11.5 KiB) Viewed 5292 times
Current version:
App launcher v1.0.xys
(19.81 KiB) Downloaded 104 times
Old version(s):
App launcher v0.9.xys
(19.69 KiB) Downloaded 370 times
App launcher v0.8.xys
(15.46 KiB) Downloaded 176 times
App launcher v0.7.xys
(13.65 KiB) Downloaded 194 times
App launcher v0.6.xys
(12.55 KiB) Downloaded 192 times
App launcher v0.5.xys
(10.9 KiB) Downloaded 193 times
App launcher v0.4.xys
(7.27 KiB) Downloaded 204 times
App launcher v0.3.xys
(6.92 KiB) Downloaded 190 times
App launcher v0.2.xys
(5.8 KiB) Downloaded 194 times
App launcher v0.1.xys
(5.68 KiB) Downloaded 196 times

Re: App launcher

Posted: 06 Jul 2018 13:54
by highend
New version, changelog:

Code: Select all

v0.2
  ! Eval() was necessary to resolve environment variables from inside the .ini file


Re: App launcher

Posted: 06 Jul 2018 15:31
by klownboy
Hi highend, nice script. I didn't have much time to test (cruising the Baltic Sea), but I did make up a couple of new sections. I don't know what you may have planned for future updates, but it might be nice to not see the "exe" extension displayed for exec files as you have done for lnk files (e.g., Remove_Exe_Extension=1). Also, would it be possible to display the section headers minus the brackets [...] like Tools or possibly as an option to display the section header in lieu of a separator.

Re: App launcher

Posted: 06 Jul 2018 23:18
by highend
New version posted, changelog:

Code: Select all

v0.3
  + Added "Remove_Exe_Extension=" setting. Default = 1
  * Changed default value for "Separator_String=" to:
    "---------- [#SectionName#] ----------"
    "#SectionName#" will be replaced with the belonging .ini section name...
  + Added "Separator_Above=" setting. Default = 1. When using 0, the separator
    line comes after the entries
If you are upgrading from v0.2 to v0.3 you need to change the .ini file yourself:
These lines need to be in the [General] section:

Code: Select all

Remove_Exe_Extension=1
Separator_Above=1
Separator_String=---------- [#SectionName#] ----------


@Ken
If you want it without the bracket, remove them from the Separator_String= line in your .ini file...

Re: App launcher

Posted: 07 Jul 2018 14:06
by klownboy
Hey highend, the changes are working great.

One more request or option suggestion, would it be possible to have an option to not show a icon for the section header lines. When you use a section header as a separator, you really don't need to have an icon. Not having an icon for the headers would actually make the header standout in the listings a bit more. I tried leaving Seperator_Icon=blank, but that of course didn't work.

By the way that line, Seperator_Icon=:queue is misspelled. Separator is correct in other places in the script, but it must be consistently incorrect for the icon specification since it works. That same line for Seperator_Icon= doesn't seem to work if you use a path\filename icon in lieu of XY built-in icons (the icon name is displayed with a ? icon).

Thanks,
Ken

Re: App launcher

Posted: 07 Jul 2018 18:16
by highend
One more request or option suggestion, would it be possible to have an option to not show a icon for the section header lines
Only by using a real icon (a blank one), XY does not provide one internally atm

I will take a look at the non-working icon issue and the misspelling once I get home tomorrow evening...

Re: App launcher

Posted: 08 Jul 2018 00:48
by jupe
@klownboy: I haven't tested this script yet, but while testing the new inputselect abilities I have found that any unused internal button names like :whatever, display a blank icon instead of a :?: when an icon resource isn't located, so in theory Seperator_Icon=:blank should work.

Re: App launcher

Posted: 08 Jul 2018 08:00
by klownboy
Yes, you are right Jupe, that works fine. Thanks. Looking back, I shouldn't have written my post above as "Seperator_Icon=blank" as not working. What I meant was "Seperator_Icon=" I know there's also a blank.ico around that's used on some utilities to hide the shortcut arrow on lnks. I have it on my desktop computer at home. Thanks again.

Too bad the inputselect box couldn't be cleaned up a little by removing the numbering on the left side as an option. In many cases the numbers just aren't necessary in the display.

Thanks highend.

Re: App launcher

Posted: 08 Jul 2018 21:30
by highend
v0.4 is online

Changelog

Code: Select all

v0.4
  ! Fixed a bug regarding the wrong spelling of "separator"
    Existing .ini files need a manual replacement of "Seperator_Icon="
    with "Separator_Icon="!
  ! Fixed a regex bug reguarding the building of the "Caption|Data|Icon" stuff
  * Changed the default value of "Separator_Icon=" to ":blank" which will lead
    to an empty icon
Let me rephrase this:
Existing .ini files need a manual replacement of "Seperator_Icon=" with "Separator_Icon="!

Re: App launcher

Posted: 09 Jul 2018 13:16
by highend
v0.5 is online

The necessary additions to the .ini file are handled by the script, no manual intervention necessary

Code: Select all

v0.5
  + Added three new settings in the "General" section:
    "Ask_For_Args=". Default = 1
    "Detect_Args_Via=". Options = "file/name/tag". Default = "file"
    "Args_Keyword=". Default = "[cli]"
    These default settings allow it to execute command line apps with arguments
    If "Detect_Args_Via" is set to "name", the script will look for
    "<Args_Keyword>" in the name of the file. If set to "tag", it will query
    the XY tag database to see if the file is tagged with "<Args_Keyword>".
    Both options do NOT allow to set default arguments!
    The last option is "file". If the file ".\<base name of this script_CLI.txt"
    exists (UTF-8, no BOM, each entry on it's own line), it will look for a
    line with the file name (full path) + a trailing "=". If it is found, the
    script will ask for arguments (while you can set default values after the
    "="). Lines that begin with a ";" are treated as comments
    Examples:
    C:\Windows\System32\cmd.exe=/k dir "%USERPROFILE%"
    ; This would display the arguments '/k dir "C:\Users\<user name>"' in the
    input field for the command line arguments
    C:\Windows\notepad.exe="""C:\Windows\System32\drivers\etc\hosts"""
    ; This would display the argument "C:\Windows\System32\drivers\etc\hosts"

    A note on these quoting rules: If a parameter which needs double quotes
    comes directly after the "=" it needs to be TRIPLE double quoted!
    If it comes later (as in the first example) it only needs single double
    quotes


Re: App launcher

Posted: 11 Jul 2018 11:52
by LittleBiG
Nice script! :appl:

Please improve it by limiting the depth of the recursion. Using the Recursive value in the ini would be sufficient. 1,2,3... = the depth of search. Zero could still mean no recursion. It could make the collecting much faster in cases. I ran it on a folder with a massive file structure, however only the executables of the main folders would have been important to me.

Re: App launcher

Posted: 11 Jul 2018 12:44
by highend
Please improve it by limiting the depth of the recursion
Ok

v0.6 is online

Code: Select all

v0.6
  + When "Ctrl + Shift" is hold while using the left mouse button to click the
    "OK" button the selected entry is started with admin permissions
  * "Recursive=" feature changed. All values larger than 0 mean: Limit
    recursion to that depth. The character "u" (for "u"nlimited) can be used
    to impose no limit to the recursion depth. "0" (NO recursion) is still the
    internal default value unless specified otherwise for a section entry


Re: App launcher

Posted: 11 Jul 2018 13:08
by LittleBiG
Thanks, great indeed!

Re: App launcher

Posted: 13 Jul 2018 16:35
by Regmos
Brilliant :tup: :tup:

Re: App launcher

Posted: 13 Jul 2018 19:00
by highend
I was not really content with the change to the "Recursive=" option, so I changed
it again (this time hopefully for the last time...)

Code: Select all

v0.7
  * "Recursive=" feature changed (again)! All values larger than 0 mean: Limit
    recursion to that scan depth (note: this was NOT changed). From now on, "0"
    will NOT turn off recursion (as in <= 0.6) but set recursion to on with NO
    limit to the recursion depth. -1 is now the internal default (if not
    defined in a section) and acts as the "NO recursion" switch. Changes to the
    .ini file should be handled automatically once you upgrade to v0.7...