Applescript "do shell script" invokes appliction:openfile

We've gotten a customer report (which we've confirmed) that the following Applescript doesn't work correctly:

do shell script "/Applications/ThinLinc\\ Client.app/Contents/MacOS/tlclient tl.example.com -u user -p password"

Instead of just running the shell expression as typed above, the application is instructed to open the file "tl.example.com".

After some debugging we can see that altough the command line is correctly passed on, Applescript also calls application:openFile. In our case this is incorrect as this is a hostname and not a file name.

Applescript also seems to have some heuristic for this as you can avoid this side effect by putting any flag argument before the hostname (e.g. "-a").

We have yet to find a workaround that permits the user to correctly invoke ThinLinc with arguments from Applescript.

Has anyone else seen this and/or found a way around it? I cannot find any mention of this behaviour in the documentation.
Applescript "do shell script" invokes appliction:openfile
 
 
Q