Thanks Ken, just the ticket!

Cheers

Peter

On 4/7/06 2:37 PM, "Peter Reid" <[EMAIL PROTECTED]> wrote:

 I get the result:

 /bin/sh: line 1: /Users/peter/Desktop/screen sizer/support/cscreen -x
 1600 -y 1200 -s 1: No such file or directory

The problem is you have a space in your path that needs to be escaped. Try
this:

put "/Users/peter/Desktop/screen\ sizer/support/cscreen -x 1600 -y 1200 -s
1" into tCmd
get shell(tCmd)

Here's a general purpose function you can use to format paths for use with
Unix (and Windows for that matter):

function stsFormatPath pPath,pPlatform
  -- assumes a full "/"-delimited path
  switch pPlatform
  case "MacOSX"
  case "Unix"
    put "\" & space & quote & "'`<>!;()[]?#$^&*=" into tSpecialChars
    repeat for each char tChar in tSpecialChars
      replace tChar with ("\" & tChar) in pPath
    end repeat
    break
  case "Win32"
    set the itemDel to "/"
    put item -1 of pPath into tFile
    put "\/:*?" & quote & "<>|" into tSpecialChars
    repeat for each char tChar in tSpecialChars
      replace tChar with ("-") in tFile
    end repeat
    put tFile into item -1 of pPath
    replace "/" with "\" in pPath
    break
  end switch
  return pPath
end stsFormatPath

Have fun!

Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: [EMAIL PROTECTED]

--
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)8700 527576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to