[Gambas-user] How to specify a string constant in an Exec statement
john.aaron.rose at gmail.com
Sun Jul 12 20:38:45 CEST 2020
1. There is no closing ]
Apologies: my typo.
2. Exec does NOT pre-process the arguments you give it. Try
get_iplayer '\".\"' --type=TV
in a terminal and see what it says. You have to understand exactly
what gambas sends to the exec system call. N.B. exec system call not
"Exec" system call.
There should be a * in the above. I tried it with & without. Didn't work
i.e. TextAreaOutput in attached TestApp2 didn't display anything.
3. try in gambas
Exec ["get_iplayer","'.*","--type=TV"] To sOutput
It's a guess
4. Pay particular attention to the single and double quotes in the above.
I have: see below for successful solution.
5. Is not going to work because there is NO SHELL to expand the .*
read the fine help.
I forgot about . and * being characters in a command that needed a Shell
statement rather than an Exec statement.
Now working with:
Shell "get_iplayer \".*\" --type=tv" To sOutput
Shell "get_iplayer --type=tv \".*\"" To sOutput
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 12353 bytes
Desc: not available
More information about the User