Skip to content

Commit 0ce02fc

Browse files
committed
docs: add AppleScript example
1 parent 9ebc99f commit 0ce02fc

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

externalApps.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,21 @@ You can install all integration scripts by running the command shown below:
4949

5050
**Warning** The script must have the execute flag set otherwise it will not be called (i.e. `chmod +x script`).
5151
The Console.app could contain error messages.
52+
53+
[AppleScript](#applescript)
54+
=======
55+
56+
VisualDiffer supports AppleScript, allowing other applications and scripts to open a diff programmatically.
57+
[AppleScript example](#applescript_example)
58+
-----
59+
60+
The following example activates VisualDiffer and opens a diff between two files:
61+
62+
```applescript
63+
osascript <<'EOF'
64+
tell application "VisualDiffer"
65+
activate
66+
open diff leftPath "/tmp/sandbox_bug/file7.txt" rightPath "/Users/dave/sandbox_bug/file1.txt"
67+
end tell
68+
EOF
69+
```

0 commit comments

Comments
 (0)