open process

JB sundown at
Sat Sep 28 10:05:32 EDT 2019

In a shell command I can execute a external program
using the following code:

on mouseUp
  set the defaultFolder to desktop
   put “myPic.jpg" into tFILE1
   put “myPic copy.jpg" into tFILE2
   put shell( "./copy" && quote & tFILE1 & quote && quote & tFILE2 & quote) into pData
   answer question pData  —will be success or failed
end mouseUp

The code above will execute a program that has two arguments which are
the source file and destination file.  It is a simple copy program.

I was reading about open process:
   --open process appName [for [text|binary] {read | write | update | neither}]

I can open a process and execute the above mentioned external program
but I am not able to supply the arguments.

Is it possible using open process to execute a program with arguments
and if it is would it be better to use the shell command or open process?

I know if you use a shell command it takes control until it is done and
open process might run in the background which I do not really need
that I know of in this instance.


More information about the use-livecode mailing list