Monday, December 9, 2019

#1 2019-11-26 04:22:41 pm

Budgie
Member
From:: New Zealand
Registered: 2005-02-22
Posts: 705

Is a quicker way to run a scpt file from main bundle?

Hi

I have been using the below for a long time in my project, and was wondering is a faster way available to load and run a scpt file from my main bundle?

Applescript:

set posixPath to current application's NSBundle's mainBundle's pathForResource_ofType_("SLUG", "scpt") as string
set scriptAlias to (posixPath as text) as POSIX file

set Slug_reference to load script scriptAlias
run Slug_reference

Model: iMac
Browser: Firefox 49.0
Operating System: macOS 10.14


Cheers
Budgie

“Everything’s impossible until somebody does it.” – Batman

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)