Notes or Descriptions Field for Scripts

Features wanted...
Post Reply
saint
Posts: 10
Joined: 04 Jun 2025 19:56
Location: XY 32-bit on Windows 11 Home @150%

Notes or Descriptions Field for Scripts

Post by saint »

Hi,

I just created my first script to quickly navigate to two window panes that I pair/use often and it's great! However, when I went to add some notes or a description to the Script, I couldn't find a place to do so.

Would like to submit a feature request to have a place for us to add instructions/notes/description for a script.

Thank you.

Edit: To add context, I create a "Scripts" folder in a Catalog, and this is what I am referring to when I'm talking about having some type of notes or desc. inline with the Script name.
Last edited by saint on 12 Sep 2025 07:52, edited 1 time in total.

phred
Posts: 575
Joined: 26 Dec 2021 02:10
Location: XY 64bit on Windows 10 at 100% from Boston USA

Re: Notes or Descriptions Field for Scripts

Post by phred »

If you preface each line of instructions, notes, description, or whatever) with two forward slashes, (//) the line will not be executed. The double-slash tells XY that the following is a comment. See the example below.

Code: Select all

    // ========================================================================
    // == DO NOT CHANGE ANYTHING BELOW IF YOU DO NOT KNOW WHAT YOU ARE DOING ==
    // ========================================================================

PeterH
Posts: 2826
Joined: 21 Nov 2005 20:39
Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%

Re: Notes or Descriptions Field for Scripts

Post by PeterH »

you should read:
XY Help / Advanced Topics / Scripting / Comments

And you could have a look in other users scripts - you could always learn something.
(This never ends ... ... )

saint
Posts: 10
Joined: 04 Jun 2025 19:56
Location: XY 32-bit on Windows 11 Home @150%

Re: Notes or Descriptions Field for Scripts

Post by saint »

Hi @phred,

That is great, I'll go ahead and do that!

@PeterH - Thank you for the suggestion, the main reason why I'm asking for this is that for a small number of scripts, the UX/workflow might be manageable (e.g. open up .xys script, view comments.)

But for my use case, I'm using it in a Catalog, and if/when you have a lot of scripts, the experience would be quite cumbersome if you have to open up each .xys script in an editor just to read the comments/desc/notes for each and every one.

It would be much easier to open up the script in the dialogue modal, and see the notes/desc/comments right there as you navigate between scripts, and if you want to add a longer or more detailed comment, you could do so in the .xys script itself.

eil
Posts: 1821
Joined: 13 Jan 2011 19:44

Re: Notes or Descriptions Field for Scripts

Post by eil »

Well here is a variant how you can do it:

Code: Select all

	/*
	[Description]
	Info=This script does this and that.
	*/
It's multiline comment with INI node in it that can be placed anywhere inside script = as a result script doesn't execute this lines, BUT you actually can read exactly that node with XY script commands. SO you can add some script to read such "commented INI node" and place descriptions of scripts there.
Win 7 SP1 x64 100% 1366x768|1900x1080

bossi
Posts: 144
Joined: 30 Jul 2022 11:09
Location: Win11-latest, XYx64 latest, 4K@100%

Re: Notes or Descriptions Field for Scripts

Post by bossi »

you hit the bottleneck of having to click trough the cat items ...

just do it like this :
- make 1 main.xys file in xyscripts folder

- create a script in that file like :

Code: Select all

"_ : somefx"{
    echo "helooo"
}
- create a Catalog entry with name : somefx
- paste that code into that script field of that somefx catalog item :

Code: Select all

$caption = gettoken(self("caption"));
 load "main",$caption
now you can do this with all catalog items and better maintain your functions

highend
Posts: 14583
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Notes or Descriptions Field for Scripts

Post by highend »

No clue what the problem is, just give these captions a meaningful name...
One of my scripts helped you out? Please donate via Paypal

Post Reply