Skip to content

Commit 6de2790

Browse files
committed
Support both Eudic and Eudic lite
1 parent 0e6688f commit 6de2790

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

β€Žsources/eudic.applescriptβ€Ž

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
try
2+
tell application "Finder" to get application file id "com.eusoft.eudic"
3+
set eudic_bundle_id to "com.eusoft.eudic"
4+
on error
5+
set eudic_bundle_id to "com.eusoft.freeeudic"
6+
end try
7+
8+
set cmd to "open -b " & eudic_bundle_id
9+
10+
do shell script cmd
11+
delay 0.1
12+
do shell script cmd
13+
14+
15+
if eudic_bundle_id is "com.eusoft.eudic" then
16+
tell application id "com.eusoft.eudic"
17+
activate
18+
show dic with word "{query}"
19+
end tell
20+
else
21+
tell application id "com.eusoft.freeeudic"
22+
activate
23+
show dic with word "{query}"
24+
end tell
25+
end if
26+
99 Bytes
Binary file not shown.
-36.2 KB
Binary file not shown.

0 commit comments

Comments
Β (0)