Re: Simple question
Re: Simple question
- Subject: Re: Simple question
- From: "Marc K. Myers" <email@hidden>
- Date: Thu, 15 Feb 2001 01:25:07 -0500
- Organization: [very little]
email@hidden wrote:
>
>
Send applescript-users mailing list submissions to
>
email@hidden
>
>
To subscribe or unsubscribe via the World Wide Web, visit
>
http://www.lists.apple.com/mailman/listinfo/applescript-users
>
or, via email, send a message with subject or body 'help' to
>
email@hidden
>
>
You can reach the person managing the list at
>
email@hidden
>
>
When replying, please edit your Subject line so it is more specific
>
than "Re: Contents of applescript-users digest..."
>
>
Today's Topics:
>
>
1. Re: A little off topic (Michelle Steiner)
>
2. Re: Re: Repeat With question (newbie level) (John W Baxter)
>
3. 'explode' quark document into pages (email@hidden)
>
4. Re: Repeat With question (newbie level) (g3pb)
>
5. Re: Simple question (Marc K. Myers)
>
>
--__--__--
>
>
Message: 1
>
Subject: Re: A little off topic
>
Date: Wed, 14 Feb 2001 19:42:41 -0800
>
From: Michelle Steiner <email@hidden>
>
To: <email@hidden>
>
>
On 2/14/01 6:56 PM, Terry Howard <email@hidden> wrote:
>
>
>I know this is pretty off topic, but can anyone explain to me how I can
>
>inverse my stereo in OS 9? The sound control panel has no control for this
>
>that I can tell.
>
>
Depending on the speakers, you might be able to reverse the connectors.
>
>
--Michelle
>
>
----------------------------------------------------------------------
>
| Michelle Steiner | We're not human beings having a spiritual |
>
| | experience. We're spirtual beings |
>
| email@hidden | having a human experience. |
>
----------------------------------------------------------------------
>
>
--__--__--
>
>
Message: 2
>
Date: Wed, 14 Feb 2001 20:21:18 -0800
>
To: <email@hidden>
>
From: John W Baxter <email@hidden>
>
Subject: Re: Re: Repeat With question (newbie level)
>
>
At 18:11 -0800 2/14/01, Michelle Steiner wrote:
>
>On 2/14/01 5:52 PM, email@hidden <email@hidden> wrote:
>
>
>
>>There is a caveat with this approach (which is a correct and very good
>
>>approach BTW, being standard Applescript and all). A script will demonstrate:
>
>>
>
>>set alphaList to {"a", "b", "c"}
>
>>
>
>>repeat with aLetter in alphaList
>
>> if aLetter is equal to "b" then beep 1
>
>> if aLetter is "b" then beep 1
>
>> if aLetter = "b" then beep 1
>
>> if aLetter is equal to "b" then beep 1
>
>> if (aLetter as string) is equal to "b" then beep 1 -- only this line
>
>>makes a beep
>
>>end repeat
>
>
>
>This is true, but I don't understand why. Look at this:
>
>
>
>set alphaList to {"a", "b", "c"}
>
>
>
>repeat with aLetter in alphaList
>
> if aLetter is equal to "b" then beep 1
>
> if aLetter is "b" then beep 1
>
> if aLetter = "b" then beep 1
>
> if aLetter is equal to "b" then beep 1
>
> if (aLetter as string) is equal to "b" then beep 1 -- only this line
>
>makes a beep
>
>end repeat
>
>
We've done this before. The variable aLetter does not become in turn "a"
>
then "b" then "c" as it appears it should. Instead, it becomes
>
item 1 of alphaList
>
then item 2 of alphaList
>
then item 3 of alphaList
>
>
We need to turn those into the actual letter. In the above code, only the
>
as string
>
does that job.
>
>
We can change the script just a little and it will be a lot noisier:
>
>
set alphaList to {"a", "b", "c"}
>
>
repeat with aLetterItem in alphaList
>
set aLetter to contents of aLetterItem
>
if aLetter is equal to "b" then beep 1
>
if aLetter is "b" then beep 1
>
if aLetter = "b" then beep 1
>
if aLetter is equal to "b" then beep 1
>
if (aLetter as string) is equal to "b" then beep 1
>
end repeat
>
>
Now, aLetter really is a one letter string each time.
>
>
--John
>
>
--
>
John Baxter email@hidden Port Ludlow, WA, USA
>
>
--__--__--
>
>
Message: 3
>
Subject: 'explode' quark document into pages
>
Date: Wed, 14 Feb 2001 23:29:24 -0500
>
From: "email@hidden" <email@hidden>
>
To: "AppleScript-Users Mail" <email@hidden>
>
>
I am trying to open a n page long quark document and create n documents
>
from it, each a single page. I looked in the archives (finding useful
>
but not related info as always) and looked at quarks site etc
>
>
I want to save a multipage quark document as multiple single page
>
documents.
>
>
If I write: save document 1 in ThePath it is fine. But it is the entire
>
document.
>
>
As soon as I enter anything about page, I get an EPS not a .qxd doc. eg
>
>
save page 1 of document 1 as "XDOC" in ThePath
>
>
gives me an EPS even though I ask for XDOC and do not say EPS. Anyone
>
have a workaround?
>
>
tia
>
>
Doug
>
>
--__--__--
>
>
Message: 4
>
Date: Wed, 14 Feb 2001 19:40:11 -0900
>
Subject: Re: Repeat With question (newbie level)
>
From: g3pb <email@hidden>
>
To: John W Baxter <email@hidden>,
>
<email@hidden>
>
>
set alphaList to {"a", "b", "c"}
>
>
repeat with i from 1 to number of items in alphaList
>
if item i of alphaList is "b" then beep
>
if item i of alphaList = "b" then beep
>
if item i of alphaList is equal to "b" then beep
>
if item i of alphaList = "b" then beep
>
end repeat
>
>
-- hcir
>
mailto:email@hidden
>
Made with a Mac!
>
>
> set alphaList to {"a", "b", "c"}
>
>
>
> repeat with aLetterItem in alphaList
>
> set aLetter to contents of aLetterItem
>
> if aLetter is equal to "b" then beep 1
>
> if aLetter is "b" then beep 1
>
> if aLetter = "b" then beep 1
>
> if aLetter is equal to "b" then beep 1
>
> if (aLetter as string) is equal to "b" then beep 1
>
> end repeat
>
>
--__--__--
>
>
Message: 5
>
Date: Wed, 14 Feb 2001 23:59:58 -0500
>
From: "Marc K. Myers" <email@hidden>
>
Reply-To: email@hidden
>
Organization: [very little]
>
To: email@hidden
>
Subject: Re: Simple question
>
>
set nameList to name of every item of the folder newImagesFolder
>
set {od, AppleScript's text item delimiters} to {AppleScript's text item
>
delimiters, {", "}}
>
set nameText to name of every item of the folder newImagesFolder as text
>
set AppleScript's text item delimiters to od
The first line of this snippet was an oops. Fuggedaboudit!
Marc [2/15/01 1:24:45 AM]