open process

JB sundown at pacifier.com
Sat Sep 28 10:47:29 EDT 2019


Thank you very much!

That is what I suspected but I wanted to
have someone clarify it for me.

thanks again,
JB


> On Sep 28, 2019, at 7:46 AM, Paul Dupuis via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> passing information (arguments, commands, etc.) to another program using "open process" requires that the other program has a mechanism to listen to interprocess messages. Most programs designed to accept a set of command-line parameters do not have listeners for inter process communication (IPC), so the general answer to your question is you probably can not provide arguments via open process to the copy command.
> 
> 
> On 9/28/2019 10:05 AM, JB via use-livecode wrote:
>> 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.
>> 
>> JB
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list