Re: [OT] Getting the labels of a record
Re: [OT] Getting the labels of a record
- Subject: Re: [OT] Getting the labels of a record
- From: Gary Lists <email@hidden>
- Date: Wed, 18 Jun 2003 18:41:54 -0400
On or about 6/18/03 5:39 PM, Emmanuel wrote:
>
At 10:12 PM +0200 18/06/03, Jean-Baptiste LE STANG wrote:
>
> Here is a handler that will split a record using regular expressions, so you
>
> need satimage.osax :
>
>
>
> it will only work if your record does not contain any record. I'm still
>
> working on it.
>
>
JB's handlers is elegant and fast.
I was only able to run the script one time.
Since then, even after quitting Smile and rebooting, I can compile the
script but get a "Can't make some data into the expected type" error every
time I run it.
Why once and then ... caput?
This compiles, and is what I ran:
set oResult to find text theRegExp in myRecordAsString using groupList
--
-- but this _original_ version did NOT compile:
-- with whole word and string result
--
-- highlights the word 'word' and says
-- 'Expected end of line but found class'.
I don't even see those parameters in the Satimage dictionary along with the
'find text' command.
The first time I tried with this data:
set recX to {a:"a car", b:"be kind", c:"see the world", d:"do not go
gentle", e:"everything is connected", f:{"f1","f2","f3"}}
Which gave me (strangely, at the end):
--> {matchPos:0, matchLen:116, matchResult:{"a", "\"a car\"", "b", "\"be
kind\"", "c", "\"see the world\"", "d", "\"do not go gentle\"", "e", "a0",
"a1", "a2"}}
So, I removed the f item list and tried with:
set recX to {a:"a car", b:"be kind", c:"see the world", d:"do not go
gentle", e:"everything is connected"}
and now I get the unexpected type error.
Jean-Baptiste, or Emmanuel, any ideas?
This seems very useful for the Meta Miner tag collector that I was working
on with BB Edit and Smile.
>
The standard Smile distribution includes a cinetically and elegancewise
>
challenged script that splits records using a loop. It's slow but it eats
>
records, it eats chevrons, you can feed it anything really (I think). You find
>
somewhere in the "Object eXpert" dialog's script.
>
>
Emmanuel
I'm going to check that out right now, too.
--
Gary
MacOS 9.1 / "9 is Fine"
OMM: osa:AS 183 / osa:JS 103 / FM 55 / BB 612 / Smile 188
______________________________________________________________
Please reply directly to the list.
Incoming messages are auto-deleted. (It's anti-spam, that's all.)
_______________________________________________
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.