exec(".",".","with complicated parameters")?

Discuss PocketC for CE (including Desktop Edition)

Postby philhickling on Thu Apr 12, 2001 4:30 pm

How do I code an exec statement with complicated parameters, please. (I'm not a C programmer!).

I want to dial up and log in to my office network from within my PocketC app. The command: \Windows\rnaapp.exe -e"tester" -p does the job. But how do I code this into an exec("action","\Windows\rnaapp.exe","????") I think I need to replace "action" with open, or run, or ... and the parameters ???? with -e"tester" -p but I cant get it to run!

I've tried:
exec("open","\Windows\rnaapp.exe","-e'tester' -p");
but get a command line parameter error?

(Incidentally, remnet (instead of rnaapp) brings up the remote networking screen, but I want to actually dial, so users cant do anything wrong).
Posts: 5
Joined: Tue Dec 12, 2000 8:10 am
Location: United Kingdom

Postby wolfgang on Thu Apr 12, 2001 11:14 pm


try replacing the single quotes with backslash plus double quote, i.e. \" instead of '
The backslash will tell PocketC that the double quote is not the end of the text string, but shall be taken literally as a double quote.

To verify that this indeed inserts double quotes in your string you can try the following:

alert ("in doublequotes: \"hello\"");

Composing music on the PocketPC! - http://www.pdamusician.com
Posts: 281
Joined: Tue Dec 12, 2000 4:22 am
Location: USA

Postby philhickling on Tue Apr 17, 2001 3:44 pm

Thanks Wolfgang. This worked a dream. I now have a one-button click to dial up and connect to my office network, for copying files!
Posts: 5
Joined: Tue Dec 12, 2000 8:10 am
Location: United Kingdom

Return to PocketC for CE

Who is online

Users browsing this forum: No registered users and 4 guests