View Single Post
# 7 20-01-2007 , 11:30 PM
enhzflep's Avatar
Subscriber
Join Date: Oct 2006
Location: Melbourne
Posts: 313
Okay, so the batch file is being executed. The error you're getting appears to come from windows as it is executing the batch.

If it's saying that the file is not recognised as a command, this indicates to me that there's a problem somewhere else.

I not you write that Windows says:
"F:\Programfiler\Windows is not recognized......"

Notice how the path was cut off after the space in "Windows NT" - I think this is your problem. Is this an older version of windows? Perhaps the implementation of batch files used in your release doesn't like spaces in file names/paths.

You could always try it with a basic program put into a directory with a simpler name, e.g F:\Test..

But anyway, once you've used a file once that's associated with Photoshop, like a psd, you do get a button to automatically start photoshop - granted it's not a shelf button, but it's not that far away being in the attribute editor under the file name of the image file. I just use the View or Edit buttons and there I go - photoshop from maya.


EDIT:: It is more than likely the space that's causing you problems. I've just tried something else and it's worked fine.

Here's a dump of the script editor window.

system("C:/Program Files/GIMP-2.0/bin/gimp-2.2.exe");
// Result: 'C:/Program' is not recognized as an internal or external command,
operable program or batch file.
//
system("C:\\Progra~1\\GIMP-2.0\\bin\\gimp-2.2.exe");
// Result:
(gimp-2.2.exe:3460): LibGimpBase-WARNING **: gimp-2.2.exe: wire_read(): error

The Gimp then opened as it should, the gimp: wire_read():error is just something it chucked up because it was started in the wrong directory.

It looks like the solution to your problem is to USE SHORT FILENAMES. So that just means not going over 8 characters for any file or directory name, if the name's too long then use "~1" for the last 2 chars of the name or ~2 or ~3 etc if you've got a number of directory/filenames that are the same for the first 6 characters.

Okay, my last effort on the matter.
Try this

system ("F:\\Progra~1\\Window~1\\Pinball\\PINBALL.EXE" );

OR if you're lazy like me user added image

system ("F:/progra~1/window~1/pinball/pinball");

Oh, I should probably point out, that Maya stops responding until I close the program it started.....
Probly just better off with a short-cut on the desktop, anyway.

S.