Is there a way to make a plugin run an external
application? (just start it, no need to communicate
with it).
If now from within a plugin - maybe with some hack using a script?
Does it make sense?
Starting shell application
Is there anyone in this forum???
Starting shell application
Not many, but people do come by. Now, I'm not a Photoshop plug-in
developer, I develop Acrobat plug-ins. But I find your question
puzzling. Since plug-ins are written in C/C++, what could possibly
stop you from starting a process?
Aandi Inston
Hey!
so nice to see there are others....
I don't know what stops it ... but I tried running a
process (liek notepad) and nothing happened so
I wonder if it is possible at all.
Hope to find out a way to fix it.
Tnx
david_chinask@adobeforums.com wrote:
%26gt; I don't know what stops it ... but I tried running a
%26gt; process (liek notepad) and nothing happened so
%26gt; I wonder if it is possible at all.
How were you trying to run the process? Regardless of platform specific APIs,
you should be able to use system() or something from the exec() family of functions.
-X
--
for photoshop scripting solutions of all sorts
contact: xbytor@gmail.com
Hi xbytor and thanks for the help,
system() did work, I wonder why all the other exec functions
didn't work...
Is there a way to prevent system() from opening the shell (cmd)
window though? sorry if its a common knowledge - didn't get a chance
to use this method before.
Thanks again!
david_chinask@adobeforums.com wrote:
%26gt; system() did work, I wonder why all the other exec functions
%26gt; didn't work...
%26gt;
%26gt; Is there a way to prevent system() from opening the shell (cmd)
%26gt; window though?
Not that I know of. I get the same thing when making the same type of call in
other languages. It's annoying and unavoidable as far as I know. You may want to
look into Windows-specific functions. There may be something in there that does
what you want.
-X
--
for photoshop scripting solutions of all sorts
contact: xbytor@gmail.com
If you are in Windows, use CreateProcess instead. This is fairly
complex, but it does start an asychronous process directly. ''system''
is an untidy option ported half-heartedly from Unix.
Aandi Inston
Thanks Aandi,
CreateProcess did work.
I was afraid using this system() method, and was glad
to hear that CreateProcess is safe.
Bye :)
Aandi_Inston@adobeforums.com wrote:
%26gt; If you are in Windows, use CreateProcess instead. This is fairly
%26gt; complex, but it does start an asychronous process directly. ''system''
%26gt; is an untidy option ported half-heartedly from Unix.
Good to here that there's a better way of doing this. But I'm glad MS did the
right thing with 'system'.
This reminds me of an old geek-myth. Once back in the early days of glibc
someone was implementing a part of the C library where the spec said that
calling a certain function with some unusual parameter would be 'implementation
defined' or some such. So, the developer had the function launch emacs whenever
that happened.
-X
--
for photoshop scripting solutions of all sorts
contact: xbytor@gmail.com
Subscribe to:
Post Comments
(Atom)
No comments:
Post a Comment