New Text File Extension for Scripts Folder

Features wanted...
Post Reply
VeeGee

New Text File Extension for Scripts Folder

Post by VeeGee »

Good morning,
Is it possible via an option or tweak to have the "New Text File (CTRL+SHIFT+N) command default to .XYS when the command is run in the Scripts folder ? Not really a big deal having to rename the TXT to XYS now, but seeing as smart as XY is, it would now know I want an XYS file when I'm in that folder.

or should I just make a portable XYS extension/template and have it show in the New Items menu. Off to read the manual...

UPDATE : added it to New Items, works really slick !
Image-193.png
Image-193.png (5.2 KiB) Viewed 641 times

jupe
Posts: 2803
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: New Text File Extension for Scripts Folder

Post by jupe »

You seem happy with that solution already, but you could have it work how you originally described too (assuming you use the shortcut key usually), you'd just need to clear the Ctrl+Shift+N shortcut through CKS, and then setting the following script to use the same shortcut via UDC.

Code: Select all

if (<curpath> == <xyscripts>) { new("New Script.xys", , , "r"); } else { #234; }

VeeGee

Re: New Text File Extension for Scripts Folder

Post by VeeGee »

This is great too - thanks ! I like having options and both work really well.

Side question, I have been collecting snippets of scripts from various posts - from highend, you, SammySarkar, etc. Currently I save them as XYS files in the Scripts folder and name them accordingly. Some I use, some I don't (yet), I just don't want to forget them.

Is there a better place/way to store script snippets inside XY ? or is my current way the "norm". Also, my XY data is backed up through various methods, so I shouldn't lose them.

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

Re: New Text File Extension for Scripts Folder

Post by highend »

I would store non-used in a subfolder of <xyscripts> but apart of that...
One of my scripts helped you out? Please donate via Paypal

bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: New Text File Extension for Scripts Folder

Post by bdeshi »

VeeGee wrote: 17 Feb 2019 17:11 Is there a better place/way to store script snippets inside XY ? or is my current way the "norm".
Yes, keeping scripts in <xyscripts> is the right method of storage. In fact, I'd recommend you try to move all substantial scripts in udc, ctb, custom columns, alias, pfas etc to <xyscripts>. Makes them more manageable. You can use a bare load statement in all those script fields, and later when you need to edit the script, directly edit a file in <xyscripts> instead of having to dig through multiple menu items.
My <xyscripts> is more or less like this:

Code: Select all

_alias\
_cat\
_cc\
_cea\
_closet\
_ctb\
_inc\
_pfa\
_udc\
_wip\
tmp\
<standalone-and-uncategorized-script-files>.xys
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

Post Reply