Here's a very basic script that will accomplish what you're asking:
<pre style="width:630px;height:auto;overflow-x:auto;overflow-y:hidden;"
title="Copy this code and paste it into your Script Editor application.">
set tmpDir to do shell script "mktemp -d /tmp/CompareScripts.XXXXXXXXX"
set leftFile to tmpDir & "/left"
set rightFile to tmpDir & "/right"
set script1 to quoted form of POSIX path of (choose file)
set script2 to quoted form of POSIX path of (choose file)
do shell script "osadecompile " & script1 & ">" & leftFile & ¬
";osadecompile " & script2 & ">" & rightFile & ¬
";/Developer/Applications/Utilities/FileMerge.app/Contents/MacOS/FileMerge -left " & ¬
leftFile & " -right " & rightFile & ";rm -rd " & tmpDir
</pre>
This script is very basic and has no error checking incorporated. Here's what the script does when run:
1) Creates a uniquely named directory in the "/tmp" directory.
2) Asks you to locate script file #1 (left file for FileMerge comparison).
3) Asks you to locate script file #2 (right file for FileMerge comparison).
4) Launches FileMerge and loads the 2 files for comparison.
5) Deletes the directory it created in the beginning when you quit FileMerge.
The script will continue to run until you quit FileMerge. The script can be modified in many different ways depending on the exact task you'd like for it to achieve. You can also modify the script to be a droplet so you can just drop 2 scripts on it for comparison.
Hope this at least gets you started in the right direction.