Where to put a script?

Discuss and share scripts and script files...
Post Reply
chavlji
Posts: 29
Joined: 12 Feb 2012 10:18

Where to put a script?

Post by chavlji »

I'm still wondering from where is the best to access certain xys script of mine?

1. Catalog ? If there's no other option...
2. User buttons ? I'll run out of toolbar space to fast.
3. Main menu > User > Load Script File ? To much time consuming.
4. Special shortcut created in Manage commands ? Hard to remember for rarely scripts.

Is there any other way to run a script? On a daily bases I mean...

Is it possible to put it into the file context menu? Is it possible to set filter for which extensions should this context menu item be showed?

j_c_hallgren
XY Blog Master
Posts: 5826
Joined: 02 Jan 2006 19:34
Location: So. Chatham MA/Clearwater FL
Contact:

Re: Where to put a script?

Post by j_c_hallgren »

chavlji wrote:2. User buttons ? I'll run out of toolbar space to fast.

Is there any other way to run a script? On a daily bases I mean...
How about having some nested within one user button? I believe that's how some users do it.
BTW, I think you meant basis, yes?
Is it possible to put it into the file context menu? Is it possible to set filter for which extensions should this context menu item be showed?
AFAIK: No -and- No.
Maybe in future but not now...
Still spending WAY TOO much time here! But it's such a pleasure helping XY be a treasure!
(XP on laptop with touchpad and thus NO mouse!) Using latest beta vers when possible.

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

Re: Where to put a script?

Post by highend »

One of my scripts helped you out? Please donate via Paypal

serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: Where to put a script?

Post by serendipity »

chavlji wrote:I'm still wondering from where is the best to access certain xys script of mine?

1. Catalog ? If there's no other option...
2. User buttons ? I'll run out of toolbar space to fast.
3. Main menu > User > Load Script File ? To much time consuming.
4. Special shortcut created in Manage commands ? Hard to remember for rarely scripts.

Is there any other way to run a script? On a daily bases I mean...

Is it possible to put it into the file context menu? Is it possible to set filter for which extensions should this context menu item be showed?
The above comments from others hold true but there are some more options you can explore:
5. Alias: @myscript= load myscript; you can create any number of aliases but again its a matter of remembering them. Its still better than shortcuts because you can input your own user-friendly names.
To assign an alias use: @cof=::makecoffee; and then to use it just use @cof. Easy right?
6. PFA: You can set Portable file associations if you are trying to load a script for certain file extensions and not other. For example the script can contain an IF argument to load only if the file you are clicking in a .jpg. But this is not the regular right-click context menu, its a double-click thing where when you double click the appropriate file extension a particular script can be triggered. But in future Custom even actions will let you use right-click context menu.
7. You can directly click on menu User>Run script or load script file to get to your scripts.

chavlji
Posts: 29
Joined: 12 Feb 2012 10:18

Re: Where to put a script?

Post by chavlji »

Thanks for the ides. I like the aliases, since I'm long Autocad user ;)
For now I'll probbably go for one xys file with all my functions that will be triggered on some shortcut and will display the menu with all of my functions...

Post Reply