Page 1 of 1

Notes or Descriptions Field for Scripts

Posted: 27 Aug 2025 19:59
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.

Re: Notes or Descriptions Field for Scripts

Posted: 27 Aug 2025 20:15
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 ==
    // ========================================================================

Re: Notes or Descriptions Field for Scripts

Posted: 27 Aug 2025 21:43
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 ... ... )

Re: Notes or Descriptions Field for Scripts

Posted: 28 Aug 2025 22:20
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.

Re: Notes or Descriptions Field for Scripts

Posted: 06 Sep 2025 12:03
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.

Re: Notes or Descriptions Field for Scripts

Posted: 07 Sep 2025 23:37
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

Re: Notes or Descriptions Field for Scripts

Posted: 08 Sep 2025 00:02
by highend
No clue what the problem is, just give these captions a meaningful name...