The subject pretty much says it all.  This Applescript will use
BBEdit's (or TextWrangler's) internal diff functionality to compare
the last two bits of text that have been copied to the clipboard.
It's a nice way to quickly compare two chunks of text while you're
testing/debugging something. I'm posting it here because

1. I thought the list might be interested in it

2. I hoped there was an intrepid Snow Leopard user who could test this
out for me (I'm lagging behind on 10.5)

        tell application "BBEdit"
                set text_1 to (the contents of current clipboard)
                set clip_index to the index of current clipboard
                set clip_index to clip_index - 1

                if clip_index is 0 then
                        set clip_index to 1
                end if

                set text_2 to the contents of clipboard clip_index
                do shell script "rm /tmp/bbclipdiff_1.txt;touch /tmp/
bbclipdiff_1.txt"
                do shell script "rm /tmp/bbclipdiff_2.txt;touch /tmp/
bbclipdiff_2.txt"
                set file_1 to POSIX file "/tmp/bbclipdiff_1.txt"
                set file_2 to POSIX file "/tmp/bbclipdiff_2.txt"
                write text_1 to file_1 as text
                write text_2 to file_2 as text
                set the_result to compare file_1 against file_2
                if not the differences found of the_result then
                        display dialog "Last Two Clipboards are Identical"
                end if
                return the_result
        end tell


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the 
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
If you have a feature request or would like to report a problem, 
please email "[email protected]" rather than posting to the group.
-~----------~----~----~----~------~----~------~--~---

Reply via email to