Page 1 of 1

Where to put a script?

Posted: 16 Feb 2012 21:28
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?

Re: Where to put a script?

Posted: 16 Feb 2012 21:57
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...

Re: Where to put a script?

Posted: 16 Feb 2012 22:06
by highend

Re: Where to put a script?

Posted: 16 Feb 2012 23:42
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.

Re: Where to put a script?

Posted: 17 Feb 2012 19:12
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...