on run argv set first_file to item 1 of argv set second_file to item 2 of argv tell application "Araxis Merge" -- Start/connect to Merge without displaying any UI launch try -- Use an empty document if available set _document to the first empty text document on error -- Create a text comparison document set _document to make text document at end of documents end try tell _document -- Tell the document which files to compare set the (first compared file's path) to first_file set the (second compared file's path) to second_file -- Compare the files compare items end tell activate end tell end run