in reply to Re: (Not Quite Perl) Running Scripts from Right-Click Context Menu in Windows
in thread (Not Quite Perl) Running Scripts from Right-Click Context Menu in Windows
What I do for AutoCAD dwg files (under windows xp) is go to Folder Options->File Types->DWG->Advanced->New
Then in Action I put a description, like Print 11x17 and under Application used to perform action it would be:
"c:\program files\autocad 2004\acad.exe" "%1" /nologo /b plot11x17.scr
What it does may be irrelevant but it runs a script then closes. This means you can highlight many dwgs, right click and have 12 copies of autocad open, run a script, then close.
This brings me to a question I have.
This does exactly what I need to do, which is make a kind of queue. But how an I arrange it so I can highlight 20 file of only the dwgs I want and have it achieve the same thing without having to type in all the file names on the command line or make a batch file.#!perl -W use strict; die "Need Arguments." unless @ARGV; my $CADPath = join "", "\"", "c:/program files/autocad 2004/acad.exe", + "\" "; my $ScriptType = "hp5000"; foreach my $file (@ARGV) { if (-e $file) { my $RunIT = join "", $CADPath, $file, " /nologo /b ", $ScriptType; my $status = system($RunIT); die "$RunIT exited funny: $?" unless $status == 0; } }
I thought about doing the folder thing, where it would process all the dwgs in a folder, but this is not what I want. There will be drawings in the folder I do not want to run.
Thanks
|
---|