Couple of extra nethack->anethack
[aNetHack.git] / win / macosx / aNetHackRecover.applescript
blobb5bda0b02c80350bb96007e4721819e6480900cb
1 #!/usr/bin/osascript
2 # aNetHack 0.0.1 aNetHackRecover.applescript $ANH-Date$ $ANH-Branch$:$ANH-Revision$
3 # Copyright (c) Kenneth Lorber, Kensington, Maryland, 2009
4 # aNetHack may be freely redistributed. See license for details.
8 set canceled to false
9 try
10 display dialog "Welcome to the aNetHack recover program. Please make sure aNetHack is not running before continuing. Ready?" with title "aNetHackRecover"
11 on error number -128
12 set canceled to true
13 end try
14 if not canceled then
15 set hpath to the path to me
16 set mpath to the POSIX path of hpath
17 considering case
18 --set lastpos to offset of "/anethackdir" in mpath
19 --set lastpos to lastpos + (length of "/anethackdir")
20 --set rawpath to (get text 1 through lastpos of mpath) & "/recover.pl"
21 --set safepath to the quoted form of rawpath
22 set safepath to the quoted form of "/Library/Nethack/anethackdir/recover.pl"
23 end considering
24 do shell script safepath
25 display dialog result with title "aNetHackRecover Output"
26 end if