Running macros with spaces in the filename from the command line.

Started by Lar, December 09, 2006, 10:03:44 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Lar

If your macro names have spaces in them, to run them from the Command Line (spacebar) you have to enclose the name in quotation marks.

For example:
I have a macro named Sys Check.d3m in my default Macro folder. I also have an old one named Sys.bsc. If I type sys check at the Command Line Sys.bsc will run because the Command Line only read as far as the 1st space. To get the correct macro I have to type "sys check" (with quotes). The extension and complete path name is optional once the macro is in the default Macro folder.

Lar

DrollTroll

That's the reason I tend not to use spaces in my macro names. Instead of "Macro name with spaces.d3m" I'll typically use MacroNameWithoutSpaces.d3m.

Windows is one of the few operating systems that allows the use of spaces in filenames, and I've always considered it an abomination. But then, I'm an Old School Troll...
25 years with DesignCAD

Lar

In my case I have so many macros that I have to name new ones in a way that I can search for them by logic and deduction... and also recognize what one can do by its name alone (at the moment my macros folder have 445 BSC files and 404 D3M files, some of which are backups). This leads to long  names with spaces and caps.

When 17.0 came out with its Custom Toolbox problem I resorted to using the Command Line for my frequent macros. I edited DC_ListItem.ini, putting the 20-most-used for mouse access, but the 3-letter ones I would type in and it actually became a habit. Some macros did not run from the Command Line and I finally figured out that those had long names. Back then I had to make duplicates with short  names. Since then, the Custom Toolbox bug was fixed but every now and then I would find myself using the command line. A few days ago, out of the blue while either drifting off to sleep or waking up, the idea popped in my head that maybe quotes would help for long names. I later tried it and it worked.

Lar