make a list with : choose from list ABC with prompt
make a list with : choose from list ABC with prompt
- Subject: make a list with : choose from list ABC with prompt
- From: "Clem'Sail" <email@hidden>
- Date: Fri, 20 May 2005 16:47:18 +0200
Hello,
i want use a script to make a list of choose with a list.
this list it's composed to : nameoflist {"None", "Title 1", "Content of Title1", "Title 2", "Content of Title2", etc...}
the list of choose work very fine, but when i choose in this list, the result are not in a list but it's a string and i can't use to detect wath title are choose to make a mail with all content of title choose.
Thank.
Clém's
Ps: Sorry for my english but i'm french and i never learn english at school.
The script are :
repeat
log " create list"
set r to "
set ListeType to "None" as list
set b to 1
repeat with crealist from 1 to nbrcampagne
set b to b + 1
set ListeType to ListeType & {item b of CAMPAGNE}
set b to b + 1
end repeat
set ResultType to {} as list
set ResultType to (choose from list ListeType with prompt ¬
"Choose the transaction" default items {"None"} with multiple selections allowed) as list
set b to 0
log "try to find what's choose"
if ResultType is not equal to false then
repeat with n from 1 to (count items of ResultType as list)
log "seeing choose"
repeat with creamailtyp from 1 to nbrcampagne
set b to b + 1
if b > (nbrcampagne * 2) + 1 then exit repeat
log "n =" & n
log "resulttype ="
log ResultType
log "b =" & b
log "on calcule"
if (item n of ResultType as list) is equal to (item b of CAMPAGNE as list) then
set b to b + 1
set Mailtype to Mailtype & return & (item b of CAMPAGNE as list) as styled text
log "on a ajouté"
log "b = " & b
log "mailtype = " & Mailtype
else
set b to b + 1
log "b =" & b
log "mailtype =" & Mailtype
end if
end repeat
end repeat
exit repeat
end if
-- nothing ask again
end repeat
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden