• 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: Select some item of...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Select some item of...


  • Subject: Re: Select some item of...
  • From: Peter Beentje <email@hidden>
  • Date: Tue, 4 Nov 2003 00:16:47 +0000

Repeat isn't in the script - whenever the script is opened, it runs...

set xyz to (some paragraph of document whose name is abc.txt) -- done a distinct 3 times within the script

an example file has 1600 different paragraphs, and running the script selects the same 3 paragraphs (different from each other, but the same paragraphs every time the script is opened)

Leaving the script open could be used as a workaround, but the document would have to be edited manually every time something froze, crashed or quit unless some way was found to link it an independent seed eg the date.

-P

On 3 Nov 2003, at 22:36, Michelle Steiner wrote:
On Nov 3, 2003, at 2:00 PM, Peter Beentje wrote:
In Panther, the same 'random' lines from the documents are generated every time - the RNG resets every time I use the script.

I don't have that problem; each time I get a different line.

repeat
display dialog (some paragraph of (read (choose file)))
end repeat

Even if I choose and read the file once:

set bar to read (choose file)
repeat
display dialog (some paragraph of bar)
end repeat

--Michelle

--
"Beware the march of ideas."
_______________________________________________
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.

  • Follow-Ups:
    • Re: Select some item of...
      • From: Michelle Steiner <email@hidden>
References: 
 >Select some item of... (From: Peter Beentje <email@hidden>)
 >Re: Select some item of... (From: Michelle Steiner <email@hidden>)

  • Prev by Date: Re: How to get every message that meets a condition in Mail
  • Next by Date: Re: Problem with text items and german umlauts
  • Previous by thread: Re: Select some item of...
  • Next by thread: Re: Select some item of...
  • Index(es):
    • Date
    • Thread