• 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
Re: Find text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Find text


  • Subject: Re: Find text
  • From: Thomas Fischer <email@hidden>
  • Date: Fri, 20 Apr 2012 15:17:22 +0200

Hi Javi,

if diskOffset ≠ 0 then
is the same as
if diskOffset is not 0 then

(You get the '≠' as option+=.)

This line prevents the script from trying to fetch line 0 which would create a (rather nasty) error message if nothing was found.

Thomas


Am 20.04.2012 um 13:54 schrieb Javi Pérez:

that's exactly what I were looking for

what's ≠ for?

-- 
Javi Pérez
Enviado con

El viernes 20 de abril de 2012 a las 13:47, Thomas Fischer escribió:

set myList to "SMART Disk Hitachi HTS545050B9SA02 (100826PBL40017J9VZTV): 32 C\rSMB NORTHBRIDGE CHIP DIE: 51 C\rSMC BATTERY: 35 C\rSMC BATTERY POSITION 2: 35 C\rSMC BATTERY POSITION 3: 32 C\rSMC BATTERY POSITION 4: 37 C\rSMC CPU A DIODE: 52 C\rSMC CPU A PROXIMITY: 48 C\rSMC LEFT PALM REST: 32 C\rSMC MAIN HEAT SINK 2: 48 C\rSMC MAIN HEAT SINK F: 48 C\rSMC NORTHBRIDGE POS 1: 46 C\rSmart Battery bq20z451 (19457): 35 C\r"
set diskOffset to offset of "Disk" in myList
if diskOffset ≠ 0 then
set lineNr to the (count of paragraphs in (text 1 thru diskOffset in myList))
set myLine to paragraph lineNr of myList
end if


 _______________________________________________
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

References: 
 >Find text (From: Javi Pérez <email@hidden>)
 >Re: Find text (From: Thomas Fischer <email@hidden>)
 >RE: Find text (From: Javi Pérez <email@hidden>)

  • Prev by Date: RE: Find text
  • Next by Date: Re: Find text
  • Previous by thread: RE: Find text
  • Next by thread: Re: Find text
  • Index(es):
    • Date
    • Thread