[Gambas-user] How to specify a string constant in an Exec statement
John Rose
john.aaron.rose at gmail.com
Mon Jul 13 13:50:43 CEST 2020
As I understand it from a quick read of the man page, the ".*" is a
regular expression passed to get-iplayer itself. As such it does not
need to be expanded by a shell.
But, your Exec command is missing a single quote. It should be:
Exec ["get_iplayer","'.*'","--type=TV"] To sOutput
Lee,
Interestingly your solution gave less output (i.e. 4 programmes found)
with code of:
Shell "get_iplayer --type=tv \".*\"" To sOutput
compared to to the number found (i.e. 5441 programmes found) when using
Shell (see results of running TestApp2 in both FMain form & Console
output) with code of:
Shell "get_iplayer --type=tv \".*\"" To sOutput
(or the 5441 programmes found when using Shell with code of:
Shell "get_iplayer --type=tv \".*\"" Wait For Read As "getiplayerMessages"
and coding for the events getiplayerMessages_Read getiplayerMessages_Error).
So I am now using Shell rather than Exec.
BTW I have changed the input to Shell & Exec above (in the attached
TestApp.tar.gz) so as to follow the documentation for
.get-iplayer in the github get-iplayer wiki
John
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestApp2.tar.gz
Type: application/gzip
Size: 12330 bytes
Desc: not available
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20200713/6a102944/attachment.gz>
More information about the User
mailing list