• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Lion versus regex
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Lion versus regex


  • Subject: Lion versus regex
  • From: Robert Poland <email@hidden>
  • Date: Wed, 14 Sep 2011 18:38:29 -0600

Hi,

This handler is failing for me in Lion. Has worked for ages with Snow Leopard.

The error <Expected end of line, etc. but found""".> occurs at the quote at the end here set mainMonitor to change " both occurrences.

Is there another way to accomplish this?

on getMonitorSize() -- Get monitor size and dimensions
set originalDelimiters to AppleScript's text item delimiters
set AppleScript's text item delimiters to return
set screenData to do shell script "CScreen -L"
set mainMonitor to text item 1 of screenData -- get line 1
set mainMonitor to change "^[[:space:]]+" into "" in mainMonitor with regexp
-- remove leading space
set mainMonitor to change "[[:space:]]+" into " " in mainMonitor with regexp
-- change all multiple spaces into one space
set AppleScript's text item delimiters to space
set original_R to text item 3 of mainMonitor
set original_B to text item 4 of mainMonitor
set AppleScript's text item delimiters to originalDelimiters
end getMonitorSize

TIA,


Robert Poland - Fort Collins, CO



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Lion versus regex
      • From: "Mark J. Reed" <email@hidden>
    • Re: Lion versus regex
      • From: Christopher Stone <email@hidden>
  • Prev by Date: Re: entire contents
  • Next by Date: Re: [ANN] ModuleLoader 2.3
  • Previous by thread: Re: Changes to Address Book?
  • Next by thread: Re: Lion versus regex
  • Index(es):
    • Date
    • Thread