Re: Comparing lists
Re: Comparing lists
- Subject: Re: Comparing lists
- From: Emmanuel LEVY <email@hidden>
- Date: Sun, 08 Dec 2013 00:52:59 +0100
I think you may find the answer comparing these two scripts:
----
repeat with x in {"apple", "orange", "banana"}
if x is "orange" then display dialog "got an orange!!!"
end repeat
----
----
repeat with x in {"apple", "orange", "banana"}
set x to contents of x -- dereference the "item blah of blahblah" reference
if x is "orange" then display dialog "got an orange!!!"
end repeat
----
The first one doesn't work, while the second one does (OMM).
Best,
Emmanuel
On Dec 7, 2013, at 11:14 PM, Peter Baxter wrote:
> I am trying to check whether files printed to PDF from Filemaker Pro Databases have been printed.
>
> I wrote a script that creates an applescript list of all the records in a field.
> It then is supposed to check the contents of a folder for files that are not in both lists:
> set FilemakerList to the result -- the name of each file printed from the the records in the database
> -- ie. BAX0001.pdf
> end repeat
>
> set PrintedReports to {}
> -- this part of the script selects the names of all files from the folder
>
> set Uniquelist to {}
>
> repeat with a from 1 to (count FilemakerList)
> set thisUpdate to item a of FilemakerList
> if (text items of (thisUpdate) is not in text items of (PrintedReports)) then set end of Uniquelist to thisUpdate
> end repeat
>
> Uniquelist
>
> As one list is the name of files, and the other list is text from Filemaker, they are not recognised as identical. The whole list is printed. How do I get the script to recognise them as the same? (coerce them into the same format?)
>
> Peter Baxter
>
>
> _______________________________________________
> 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/archives/applescript-users
>
> This email sent to email@hidden
_______________________________________________
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/archives/applescript-users
This email sent to email@hidden