Don't understand contains.
Don't understand contains.
- Subject: Don't understand contains.
- From: Robert Nicholson <email@hidden>
- Date: Sun, 17 Dec 2006 14:03:08 -0600
I don't understand why this code enters the same value to the list
twice.
if mids contains k then
log "mids " & mids
beep
--move eachMessage to mailbox named "Duplicates"
copy eachMessage to end of selected_messages
else
log "Adding k " & k
copy k to end of mids
end if
at the end of this mids contains
(*Adding k Saturday, September 30, 2000 9:43:44 PM///1997-2000///
<user@host>///I didn't go to see movie*)
(*mids Saturday, September 30, 2000 9:43:44 PM///username///
001501c02b51$984cf6e0$58839bcb@justine*)
(*mids Saturday, September 30, 2000 9:43:44 PM///username///
001501c02b51$984cf6e0$58839bcb@justine*)
(*mids Saturday, September 30, 2000 9:43:44 PM///1997-2000///
<user@host>///I didn't go to see movie*)
now why/how is it possible that this has duplicate values?
It seems that it depends on how I construct k
for instance
when I run this with
set k to mid & (date sent of eachMessage)
get message viewer 1
message viewer id 366213184
get selected messages of message viewer id 366213184
{message id 242300 of mailbox "Duplicates", message id 242301 of
mailbox "Duplicates"}
get message id of message id 242300 of mailbox "Duplicates"
"000801bfc414$6b8791a0$3e839bcb@justine"
get date sent of message id 242300 of mailbox "Duplicates"
date "Monday, May 22, 2000 12:36:56 PM"
(*Adding k 000801bfc414$6b8791a0$3e839bcb@justineMonday, May 22,
2000 12:36:56 PM*)
get message id of message id 242301 of mailbox "Duplicates"
"000801bfc414$6b8791a0$3e839bcb@justine"
get date sent of message id 242301 of mailbox "Duplicates"
date "Monday, May 22, 2000 12:36:56 PM"
(*mids 000801bfc414$6b8791a0$3e839bcb@justineMonday, May 22, 2000
12:36:56 PM*)
beep
(*mids 000801bfc414$6b8791a0$3e839bcb@justineMonday, May 22, 2000
12:36:56 PM*)
set selected messages of message viewer id 366213184 to {message id
242301 of mailbox "Duplicates"}
beep
here it's correct
now if I reverse those fields
ie.
set k to (date sent of eachMessage) & mid
here contains didn't work as it's added the value twice
why is that?
get message viewer 1
message viewer id 366213184
get selected messages of message viewer id 366213184
{message id 242300 of mailbox "Duplicates", message id 242301 of
mailbox "Duplicates"}
get message id of message id 242300 of mailbox "Duplicates"
"000801bfc414$6b8791a0$3e839bcb@justine"
get date sent of message id 242300 of mailbox "Duplicates"
date "Monday, May 22, 2000 12:36:56 PM"
(*Adding k Monday, May 22, 2000 12:36:56 PM:000801bfc414$6b8791a0
$3e839bcb@justine*)
get message id of message id 242301 of mailbox "Duplicates"
"000801bfc414$6b8791a0$3e839bcb@justine"
get date sent of message id 242301 of mailbox "Duplicates"
date "Monday, May 22, 2000 12:36:56 PM"
(*Adding k Monday, May 22, 2000 12:36:56 PM:000801bfc414$6b8791a0
$3e839bcb@justine*)
(*mids Monday, May 22, 2000 12:36:56 PM:000801bfc414$6b8791a0
$3e839bcb@justine*)
(*mids Monday, May 22, 2000 12:36:56 PM:000801bfc414$6b8791a0
$3e839bcb@justine*)
set selected messages of message viewer id 366213184 to {}
beep
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/mailman//archives/applescript-users
This email sent to email@hidden