• 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
Rép: sometimes, true = false !
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Rép: sometimes, true = false !


  • Subject: Rép: sometimes, true = false !
  • From: Yvan KOENIG <email@hidden>
  • Date: Tue, 22 Sep 2009 13:14:18 +0200



…  as the second returns a list of records of properties.
I must use a loop to isolate the visible items.

tell application "AppleWorks 6"
activate
tell document 1
set props to get properties of records
end tell
set liste to {}
repeat with r from 1 to count of props
if visible of item r of props is true then copy r to end of liste
end repeat
end tell
log liste

So, I get the wanted result:

tell application "AppleWorks 6"
activate
get properties of every record of document 1
{{class:record, index:2, modification date:date "samedi 12 septembre 2009 19:41:41", creation date:date "samedi 12 septembre 2009 19:41:41", id:47812, visible:false}, {class:record, index:3, modification date:date "samedi 12 septembre 2009 19:41:41", creation date:date "samedi 12 septembre 2009 19:41:41", id:47813, visible:false}, {class:record, index:4, modification date:date "samedi 12 septembre 2009 19:41:41", creation date:date "samedi 12 septembre 2009 19:41:41", id:47814, visible:true}, {class:record, index:5, modification date:date "samedi 12 septembre 2009 19:41:41", creation date:date "samedi 12 septembre 2009 19:41:41", id:47815, visible:true}, {class:record, index:6, modification date:date "samedi 12 septembre 2009 19:41:41", creation date:date "samedi 12 septembre 2009 19:41:41", id:47816, visible:true}, {class:record, index:7, modification date:date "samedi 12 septembre 2009 19:41:41", creation date:date "samedi 12 septembre 2009 19:41:41", id:47817, visible:true}, {class:record, index:8, modification date:date "samedi 12 septembre 2009 19:41:41", creation date:date "samedi 12 septembre 2009 19:41:41", id:47818, visible:true}, {class:record, index:9, modification date:date "samedi 12 septembre 2009 19:41:41", creation date:date "samedi 12 septembre 2009 19:41:41", id:47819, visible:true}, {class:record, index:10, modification date:date "samedi 12 septembre 2009 19:41:41", creation date:date "samedi 12 septembre 2009 19:41:41", id:47820, visible:true}, {class:record, index:11, modification date:date "mercredi 18 mai 1904 1:12:33", creation date:date "dimanche 5 février 2040 12:16:00", id:32768, visible:false}}
(*3, 4, 5, 6, 7, 8, 9*)
end tell

I wished to be able to get this list without a loop.
With 10 records the loop is not a problem but with 5000 records, it's boring.

Yvan KOENIG (VALLAURIS, France) mardi 22 septembre 2009 12:25:06





 _______________________________________________
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: 
 >sometimes, true = false ! (From: Yvan KOENIG <email@hidden>)
 >Re: sometimes, true = false ! (From: Axel Luttgens <email@hidden>)
 >Re: sometimes, true = false ! (From: Yvan KOENIG <email@hidden>)
 >Re: sometimes, true = false ! (From: Axel Luttgens <email@hidden>)

  • Prev by Date: Rép: sometimes, true = false !
  • Next by Date: Re: Get selected text from non-cocoa application
  • Previous by thread: Re: sometimes, true = false !
  • Next by thread: Get selected text from non-cocoa application
  • Index(es):
    • Date
    • Thread