App launcher

Discuss and share scripts and script files...
highend
Posts: 7645
Joined: 06 Feb 2011 00:33

App launcher

Post by highend » 06 Jul 2018 11:51

Loving the new "user defined icon" possibilities for inputselect() and finally it makes sense to use XY for launching apps...

So, here is v0.9 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 486 times
Current version:
App launcher v0.9.xys
(19.69 KiB) Downloaded 71 times
Old version(s):
App launcher v0.8.xys
(15.46 KiB) Downloaded 27 times
App launcher v0.7.xys
(13.65 KiB) Downloaded 37 times
App launcher v0.6.xys
(12.55 KiB) Downloaded 27 times
App launcher v0.5.xys
(10.9 KiB) Downloaded 39 times
App launcher v0.4.xys
(7.27 KiB) Downloaded 26 times
App launcher v0.3.xys
(6.92 KiB) Downloaded 35 times
App launcher v0.2.xys
(5.8 KiB) Downloaded 35 times
App launcher v0.1.xys
(5.68 KiB) Downloaded 33 times
One of my scripts helped you out? Please donate via Paypal or highend (at) web (dot) de

highend
Posts: 7645
Joined: 06 Feb 2011 00:33

Re: App launcher

Post by highend » 06 Jul 2018 13:54

New version, changelog:

Code: Select all

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

One of my scripts helped you out? Please donate via Paypal or highend (at) web (dot) de

klownboy
Posts: 2579
Joined: 28 Feb 2012 19:27

Re: App launcher

Post by klownboy » 06 Jul 2018 15:31

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.

highend
Posts: 7645
Joined: 06 Feb 2011 00:33

Re: App launcher

Post by highend » 06 Jul 2018 23:18

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...
One of my scripts helped you out? Please donate via Paypal or highend (at) web (dot) de

klownboy
Posts: 2579
Joined: 28 Feb 2012 19:27

Re: App launcher

Post by klownboy » 07 Jul 2018 14:06

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

highend
Posts: 7645
Joined: 06 Feb 2011 00:33

Re: App launcher

Post by highend » 07 Jul 2018 18:16

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...
One of my scripts helped you out? Please donate via Paypal or highend (at) web (dot) de

jupe
Posts: 883
Joined: 20 Oct 2017 21:14
Location: 1809 x64

Re: App launcher

Post by jupe » 08 Jul 2018 00:48

@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.

klownboy
Posts: 2579
Joined: 28 Feb 2012 19:27

Re: App launcher

Post by klownboy » 08 Jul 2018 08:00

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.

highend
Posts: 7645
Joined: 06 Feb 2011 00:33

Re: App launcher

Post by highend » 08 Jul 2018 21:30

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="!
One of my scripts helped you out? Please donate via Paypal or highend (at) web (dot) de

highend
Posts: 7645
Joined: 06 Feb 2011 00:33

Re: App launcher

Post by highend » 09 Jul 2018 13:16

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

One of my scripts helped you out? Please donate via Paypal or highend (at) web (dot) de

LittleBiG
Posts: 1529
Joined: 08 Apr 2011 12:57
Location: Win10x64

Re: App launcher

Post by LittleBiG » 11 Jul 2018 11:52

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.

highend
Posts: 7645
Joined: 06 Feb 2011 00:33

Re: App launcher

Post by highend » 11 Jul 2018 12:44

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

One of my scripts helped you out? Please donate via Paypal or highend (at) web (dot) de

LittleBiG
Posts: 1529
Joined: 08 Apr 2011 12:57
Location: Win10x64

Re: App launcher

Post by LittleBiG » 11 Jul 2018 13:08

Thanks, great indeed!

Regmos
Posts: 252
Joined: 22 Dec 2012 07:27
Location: Copenhagen

Re: App launcher

Post by Regmos » 13 Jul 2018 16:35

Brilliant :tup: :tup:
Kind regards
Regmos

highend
Posts: 7645
Joined: 06 Feb 2011 00:33

Re: App launcher

Post by highend » 13 Jul 2018 19:00

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...
One of my scripts helped you out? Please donate via Paypal or highend (at) web (dot) de

Post Reply