Re: loading scripts from a relative path?
Re: loading scripts from a relative path?
- Subject: Re: loading scripts from a relative path?
- From: Alex Hall <email@hidden>
- Date: Sun, 26 May 2013 18:22:25 -0400
On May 26, 2013, at 5:36 PM, Luther Fuller <email@hidden> wrote:
> On May 26, 2013, at 3:51 PM, Alex Hall wrote:
>
>> I'm still working on my collection of scripts that speak information to the user, again intended mostly for VO users. Since I plan to distribute these, I need my load script functions (each speaking script uses two "libraries") to be relative. I know there is the usual way with Finder (tell Finder to get parent of (path to me)), but since each script will execute completely each time the user invokes it, not stay open, that is two loads and two calls to Finder each time the user wants, say, the time, to say nothing of any shell commands the script does.
>>
>> So, I guess I have two questions:
>> 1. If I use Finder, is there really much of a performance hit, or am I worried about nothing?
>> 2. If Finder is a bad idea to use that often, how else could I get the relative path to the script?
>
> It's not clear, so I'll ask: Are these scripts intended for use by a particular application or are they to be used by various different applications?
They are not for any application, they are to present the user with bits of information. One, for instance, speaks the wifi strength and which network the user is connected to; another speaks the time and date; another the CPU load; another the current iTunes track; and so on. All easily accessible from the status menus, but for Voiceover users, getting to those menus and then to the information is actually a bit of a pain. These scripts are intended to let user assign keyboard shortcuts to them, then hit the keystroke for the script. For instance, option-t might speak the time and date, option-w wifi status, etc. Each script uses one or both of what I think of as libraries, Apple scripts with just a bunch of handlers in them (for speaking, string replacement, and more). Ideally, all the speaking scripts would be in the same folder as the two library scripts and just import the two from that (the scripts') path. I hope this makes things clearer.
>
>
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> Archives: http://lists.apple.com/archives/applescript-users
>
> This email sent to email@hidden
Have a great day,
Alex (msg sent from Mac Mini)
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:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden