Re: Applescript equivalent of $0 in shell script
Re: Applescript equivalent of $0 in shell script
- Subject: Re: Applescript equivalent of $0 in shell script
- From: Takaaki Naganoya <email@hidden>
- Date: Sun, 8 Oct 2006 03:29:11 +0900
On 2006/10/07, at 16:55, Philip Aker wrote:
On 2006-10-07, at 00:10:35, Takaaki Naganoya wrote:
I can't understand about your whole program.
But you have some another option to aquire the name of script.
<English>
If you write to me in Japanese, I can give some suggestion,
But I'm not good speaker in English. Sorry.
</English>
Naganoya-san,
Can you translate this?
set ptm to (path to me)
set main to (((path to resource "Scripts" in bundle ptm) as string)
& "main.scpt")
set spath to POSIX path of main
tell application "System Events"
activate
display dialog spath with icon caution
end tell
Save that as a script bundle (ptm.scptd). Then call from Terminal
like:
# osascript ptm.scptd
OK. I'll translate.
<English>
Philip is a well-known scripter. And he gave you an another option.
His idea is "Use script bundle. So you can indicate your resources
folder and script
located in its inside.
</English>
<Japanese>
フィリップは名の通ったスクリプターで、彼はあなたにもう1つのオプ
ションについて
説明している。Scriptをバンドル形式で保存しておくというもの
だ。
バンドル形式のスクリプト(拡張子は”.scptd”)では内部の
Resourcesフォルダの位置を
取得可能なため、それを利用してResourcesフォルダ内のスクリ
プトへのパスを得られる
……というのが説明の内容だ。
</Japanese>
--
Takaaki Naganoya
Piyomaru Software
http://piyo.piyocast.com
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden