• 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: A Faster Script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A Faster Script


  • Subject: Re: A Faster Script
  • From: roy whelden <email@hidden>
  • Date: Wed, 7 Apr 2004 15:00:10 -0700

Hi Chip,
Although I don't know a fig about scripting Excel, I did notice this repeat structure in your code which may not be written optimally. Wouldn't it be better to use "set aVariable to (count of unSortedData/2)" before the repeat block, if possible, so that it is computed only once?

--Roy Whelden

P.S. My apologies if this suggestion has already been made.

On Apr 6, 2004, at 3:52 AM, email@hidden wrote:

repeat with n from 1 to ((count of unSortedData) / 2)
set yCoordinate to ColumnY & "$" & yCount as string
set yCount to yCount + 1
set xCoordinate to ColumnX & "$" & xCount as string
set xCount to xCount + 1
tell application "Microsoft Excel"
set Value of Cell xCoordinate to item (2 * n - 1) of unSortedData
set Value of Cell yCoordinate to item (2 * n) of unSortedData
end tell
end repeat
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.


  • Prev by Date: Re: which webbrowser (apart from safari) is very scriptable
  • Next by Date: Re: Unicode and languages
  • Previous by thread: Re: A Faster Script
  • Next by thread: Re: A Faster Script
  • Index(es):
    • Date
    • Thread