[Gambas-user] Shell or DesktopFile.RunExec()
CD
claude.dessere at orange.fr
Sun Jul 22 21:15:45 CEST 2018
Hello,
I need to run a program from another program.
I first used "Shell":
sArgs = Shell$(sArgument1) & " " & Shell$(sArgument2)
hdlProcess = Shell "MyProg " & sArgs
everything is working properly and I find in the MyProg code,
Args.Count = 3:
Args[0] is equal to Application.Name
Args[1] is equal to sArgument1
Args[2] is equal to sArgument2
If I'm using DesktopFile.RunExec() :
sArgs = Shell $ (sArgument1) & "" & Shell $ (sArgument2)
hdlProcess = DesktopFile.RunExec ("MyProg", sArgs)
there a difference
Args.Count = 2
Args[0] is equal to Application.Name
Args[1] is equal to sArgument1 & "" & sArgument2
Which command should I prefer?
Shell or DesktopFile.RunExec ()
Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20180722/4393ea47/attachment.html>
More information about the User
mailing list