[Gambas-user] Gambas app calling a PERL Script which calls a program (rtmpdump)

EA7DFH ea7dfh at ...2382...
Fri Sep 2 20:32:39 CEST 2011


El 02/09/11 08:43, John Rose escribió:
> it calls a routine containing a statement of the form:
> EXEC ["get_iplayer", "--force", "--type=" & sType] TO sOutput
> where sType & sOutput are both strings with sType having the value "TV".
> This is equivalent to "get_iplayer --force --type="TV" run in a Gnome
> Terminal 

Well, as I've seen, there is a subtle difference in the way you wrote
the command in gambas: there are missing quotes in the --type argument,
compared as you have wrote it in the console:

get_iplayer --force --type="TV"

so the gambas part should read:

EXEC ["get_iplayer", "--force", "--type=\"" & sType & "\""] TO sOutput

or the other way:

arg = Subst("--type=\"&1\"", sType)
EXEC ["get_iplayer", "--force", arg] TO sOutput

You might escape the quotes in gambas, in case your script is expecting
a quoted string.

Hope this helps, regards
-- 
Jesus, EA7DFH




More information about the User mailing list