TheQwerty wrote:With regards to an attachment mod, I'm sure Don could write a decent interface for allowing us to share them, but I think we'd all agree his time is better spent on XY directly. I suggested the mod only half-seriously. I think a fine method would be a separate sub-forum. That way each script can have its own thread and separate dialog, and if needed a sticky thread could be created to act as an index to everything.
Yes, I agree. I'm not even sure we need a new forum, at least not for now. There's a "Tips & Tricks" already, and it suits the present needs quite fine I would say. If we were to see lots of scripts being posting, then a new separated forum might come in handy, but not even required yet I would say.
About a GUI for the scripts, I think TheQwerty's idea of using a new UDC for loadscriptfile is just great : it very simple & easy to use, it allows a user to have his scripts listed on a menu, it doesn't clutter the Go to category, and if you don't want (all) your scripts showing up there, you can have it. You decide.
Regarding the extension : I agree that it might be a good thing, for all the reasons TheQwerty already explained. And you can say that .XYS is the default/recommended extension for scripts, without making it a requirement nor registering it, hell no! It's just an "alternative" extension to TXT that allows easy recognition of those files, should be be for text editor and script highlight, or even us to define a color filter !
No need to touch the registry, just have XY come with a default Portable File Association : "xys>notepad"
TheQwerty wrote:I think the number of users that are frustrated by new formats is probably in the minority and of that they'll be more accepting of it when they realize it's just a text file with a different extension. They can edit it however they want, and even write their own programs to create/modify/use them.
More importantly, this isn't really a new format. I mean :
- the file is nothing but a plain text file, editable with any text editor. No need for a specific additional tool or anything. And no registry changes.
- yes, there's a syntax. Even if we use TXT files, that syntax remains the same, quite obviously !
TheQwerty wrote:admin wrote:BTW, conc. those XYS files. Did I get you folks right that you want to enter just ::loadscriptfile filebase and XY should auto-append the .xys when attempting to open those files?? Could be done.
That was one thought with it. The loadScriptFile function could be updated to first check for the exact file provided and if not found try with an appended .xys. Or check for xys first, I'm not sure which might be better.
I would say check for <name>.XYS first, if it fails look for <name> - Besides, is one wants to load "foobar" he can just say so: "::loadscriptfile foobar."
Of course, this actually leaves "the" question : what is an extension ? I mean, how would XY deal with "some script" (no ext), "some script.txt", and "some script v1.1" ?
Plus, it shouldn't mess with the relative syntax support. So maybe it would be simple, like : when a name only (ie. no path, or no "") is given it will be tried first in subfodler "Scripts" with extension .XYS auto-added. If it fails, or when there's a path, it's tried like today using relative syntax.
Since we're on that subject, one thing I might find interesting would be a parameter for loadscriptfile to execute the script, as in no menu. What I mean is, when you work on a "complicated" script, or just one with more than 2 commands, you might want to use an XYS. It's just much better to use, especially with tabs, comments and all. But you might also want to be able to execute that script by one click on you Catalog for example (or one key, thanks to an UDC). Right now it pops up a menu with one item (the script).
Or instead of a paramater it could depend on the content of the file ? Like if there's no caption and only one "script batch" then execute ?