Search found 14 matches

by russurquhart1
Fri Feb 05, 2010 4:51 pm
Forum: Suggestions/Questions
Topic: Another shell issue/question
Replies: 27
Views: 67900

Finally solved my problems by having the dplot macro call the .bat file from a directory that did NOT have any spaces in it. And then calling a Perl script to do the rest of the processing.

As someone asked, we are generating .ps files first. Using GS' ps2epsi.bat file to generate a .eps file, then ...
by russurquhart1
Tue Jan 19, 2010 11:27 am
Forum: Suggestions/Questions
Topic: Another shell issue/question
Replies: 27
Views: 67900

Some more info, hopefully this will help.

The Dplot file i am working on, G001_LOS600.grf is located on my desktop, C:\Documents and Settings\x0047930\Desktop\G001_LOS600.grf.

I want to tell epstools, from the dplot macro editor the equivalent of the following, which works from the command line to ...
by russurquhart1
Mon Jan 18, 2010 2:14 pm
Forum: Suggestions/Questions
Topic: Another shell issue/question
Replies: 27
Views: 67900

Well here are the two lines i tried:

Shell("cmd /k "C:\Program Files\epstool\bin\epstool.exe" --copy --bbox "VAR_AVAR_B_old.eps" "VAR_AVAR_B.eps"", 3)


Shell("cmd /k "C:\epstool.exe" --copy --bbox "VAR_AVAR_B_old.eps" "VAR_AVAR_B.eps"", 3)

The first line gives an error because it thinks C ...
by russurquhart1
Mon Jan 18, 2010 1:01 pm
Forum: Suggestions/Questions
Topic: Another shell issue/question
Replies: 27
Views: 67900

Getting further:

I have the following:

Shell(""cmd /k C:\Progra~1\epstool\bin\epstool.exe" --copy --bbox VAR_AVAR_B_old.eps VAR_AVAR_B.eps", 3)

Which i think should work, but i get a file not found error.

When i have:

Shell("cmd /k C:\Progra~1\epstool\bin\epstool.exe --copy --bbox VAR_AVAR_B ...
by russurquhart1
Mon Jan 18, 2010 9:43 am
Forum: Suggestions/Questions
Topic: Another shell issue/question
Replies: 27
Views: 67900

Thanks David, i'll give that a try.

What we do, or will do, is that the PS output of a Dplot graph, run that through Ghostscript to generate the EPS file. Now, for us, for some reason, the bounding box generated in that step is incorrect, to i take the new eps file and use epstool, to copy the EPS ...
by russurquhart1
Fri Jan 15, 2010 5:57 pm
Forum: Suggestions/Questions
Topic: Another shell issue/question
Replies: 27
Views: 67900

I had some problems with the double quotes working for me.

I had tried that and may have to again for something else.

Thanks,

Russ
by russurquhart1
Fri Jan 15, 2010 5:34 pm
Forum: Suggestions/Questions
Topic: Another shell issue/question
Replies: 27
Views: 67900

I'm getting further:

Failed to open "VAR_AVAR_B_old.eps".
Run "epstool --help" for more details.

It seems the expansion of the variables VAR_A and VAR_B don't seem to be happening.

Should there be some quoting around them?

Thanks,


Russ
by russurquhart1
Fri Jan 15, 2010 5:12 pm
Forum: Suggestions/Questions
Topic: Another shell issue/question
Replies: 27
Views: 67900

Well, that kept the window open, now i see:

'C:\Program' is not recognized as an internal or external command
operable program or batch file.

So this must be something with the quoting of the operands, right?
by russurquhart1
Fri Jan 15, 2010 4:45 pm
Forum: Suggestions/Questions
Topic: Another shell issue/question
Replies: 27
Views: 67900

Yes your right. I have that in mine. If i didn't i should at least get an error.
by russurquhart1
Fri Jan 15, 2010 4:15 pm
Forum: Suggestions/Questions
Topic: Another shell issue/question
Replies: 27
Views: 67900

Another shell issue/question

My updated macro is as follows:

VAR_A=Request("path")
VAR_B=Request("fname")
FileSaveAs(1,"VAR_AVAR_B.grf")
FileSaveAs("Graphics Interchange Format","VAR_AVAR_B.gif")

' Shell("C:\Program Files\epstool\bin\epstool.exe --copy -bbox VAR_AVAR_B_old.eps VAR_AVAR_B.eps", 3)

Pause


Everything works ...
by russurquhart1
Thu Nov 19, 2009 11:56 am
Forum: Suggestions/Questions
Topic: Retreiving the filename of current file and use in macro
Replies: 2
Views: 10760

Retreiving the filename of current file and use in macro

Along the lines of the macro, i'm currently working on, I want to save the current file. Export it as a .gif file. Call the printer to print it as a .ps file. And then pass this file to a bat file that runs Ghostscript to convert it to a .eps file.

To test, I am doing the following:

FileSaveAs(1 ...
by russurquhart1
Thu Nov 19, 2009 11:32 am
Forum: Suggestions/Questions
Topic: Execute a batch file with the Shell Macro command?
Replies: 7
Views: 19812

Thanks for you attention on this.

I had been working on a workaround, but had ran into another issue that, since you're looking at this, is an interesting anomaly.

In this bat file, an alternation of ps2epsi.bat that comes with ghostscript, in the middle of the bat file is the following line:

rem ...
by russurquhart1
Thu Nov 19, 2009 10:56 am
Forum: Suggestions/Questions
Topic: Execute a batch file with the Shell Macro command?
Replies: 7
Views: 19812

I'm still having a little problem.The full pathname to the bat file is:

Shell("C:\Program Files\gs\gs8.64\lib\rups2epsi.bat C:\testout.ps C:\testout.eps", 3)

It doesn't seem to be executing. I think it's getting stuck on Program Files, thinking those are two words. I tried putting single quotes ...
by russurquhart1
Wed Nov 18, 2009 2:35 pm
Forum: Suggestions/Questions
Topic: Execute a batch file with the Shell Macro command?
Replies: 7
Views: 19812

Execute a batch file with the Shell Macro command?

Hi,

I am trying to run a batch file (.bat) that has two arguments, from within a macro.

I was trying something like

Shell("run.bat file1 file2", "4")

but it doesn't seem to work. Can anyone help?

Any help is greatly appreciated!

Thanks,


Russ