[Gambas-user] Shell or DesktopFile.RunExec()

PICCORO McKAY Lenz mckaygerhard at gmail.com
Mon Jul 23 14:55:56 CEST 2018


well i guess desktoip file its to support the desktop entry's so it's
normal that args[1] will be the command that the desktop file wil have
in the "exec" line and no more

while in shell each args are well defined...


if not it's a bug in desktop file.. but i guess not!

Lenz McKAY Gerardo (PICCORO)
http://qgqlochekone.blogspot.com


2018-07-22 15:17 GMT-04:00 CD <claude.dessere at orange.fr>:
> 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
>
>
> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
>


More information about the User mailing list