Changing the screen resolution...

Peter Reid preid at reidit.co.uk
Fri Apr 7 19:18:05 EDT 2006


Thanks Ken, just the ticket!

Cheers

Peter

>On 4/7/06 2:37 PM, "Peter Reid" <preid at reidit.co.uk> 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: kray at sonsothunder.com

-- 
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)8700 527576
E-mail: preid at reidit.co.uk
Web: http://www.reidit.co.uk



More information about the use-livecode mailing list