• 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: Questions on approach
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Questions on approach


  • Subject: Re: Questions on approach
  • From: Alex Zavatone <email@hidden>
  • Date: Tue, 16 Nov 2010 12:15:53 -0600

AHA.  Even though I know it's not the best way to go, there is an easier way to go to get the desired values out of a table in a scrolling field.

Since my desired values are in the last column and they are text values, I can ask for the "last" text field and create a list with all the values I need in 9 seconds.

And Applescript lets me do it in one line too.

set myTextFields to the value of the last text field of every row of table 1 of scroll area 1 of window 1

I wrapped it in a timer function 

tell me to CalcTime()
set myTextFields to the value of the last text field of every row of table 1 of scroll area 1 of window 1
tell me to CalcTime()

where CalcTime() is this:

on CalcTime()
set elapsedTime to (the (time of the (current date)) - pStartTime) as string
log elapsedTime
set pStartTime to (the (time of the (current date)) - pStartTime) as string
end CalcTime

It gets all the values in a nice list and just looping through the first 10 rows of the table original takes from 14 to 24 seconds.

Much muuuuuch nicer.  
 _______________________________________________
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: 
 >Questions on approach (From: Alex Zavatone <email@hidden>)
 >Re: Questions on approach (From: Brian Christmas <email@hidden>)
 >Re: Questions on approach (From: Christopher Stone <email@hidden>)
 >Re: Questions on approach (From: Brian Christmas <email@hidden>)
 >Re: Questions on approach (From: Brian Christmas <email@hidden>)

  • Prev by Date: Re: Outlook 2010
  • Next by Date: Re: Invisible Unix "Icon" File
  • Previous by thread: Re: Questions on approach
  • Next by thread: Copy/Paste in the Finder
  • Index(es):
    • Date
    • Thread