Thursday, December 14, 2017

#1 2017-08-17 12:44:54 pm

Joy
Member
From:: South Tirol
Registered: 2008-07-04
Posts: 539
Website

How to rename droplet or applet Applescript names?

It's a very...old annoyance to get applet and droplet for the names of Applescript apps when you call process names with System events. I don't use titles instead of name because I'm not fond to deal with the localized version names of applications - and running both name and title to extract droplets - applets from Xcode-created apps or similar developer tools, is just a waste of code and time.
Please see this example : (and have an Applescript App running of course)

Applescript:

tell application "System Events" to set nm to name of processes whose background only is false
log nm
tell application "System Events" to set tnm to title of processes whose background only is false
log tnm

I tried to edit the value of CFBundleExecutable in the Info.plist and the executable file inside folder MacOs to change the name of my Applescript Apps to something more appropriate, but this caused just my Applescript App to misbehave... Some tips please!

Offline

 

#2 2017-08-23 07:58:06 am

Joy
Member
From:: South Tirol
Registered: 2008-07-04
Posts: 539
Website

Re: How to rename droplet or applet Applescript names?

Nobody with some hint, like some URL or some practical advises as a programmer?

Offline

 

#3 2017-08-23 08:04:36 am

DJ Bazzie Wazzie
Member
From:: the Netherlands
Registered: 2004-10-20
Posts: 2727
Website

Re: How to rename droplet or applet Applescript names?

Process names are the names of the executable loaded from the my.app/Contents/MacOS/<executable>. You can rename this to whatever you want BUT the info.plist of the application in my.app/Contents/Resources/info.plist contains a record of the  executable name and you have to change this too. This record is used so when the application is launched the system knows what executable has to be send to the kernel's program loader.

Offline

 

#4 2017-08-23 10:31:25 am

Joy
Member
From:: South Tirol
Registered: 2008-07-04
Posts: 539
Website

Re: How to rename droplet or applet Applescript names?

True,
the problem is, following: if we rename the executable -and the reference in the info.plist -, our Applescript.app starts always with a run time dialog asking us, if we want to quit OR execute our application

Even if I save a copy of my customized Applescript.app with the run time dialogue unchecked, the Applescript.app starts still and stubbornly with a run time dialog sad

I tried this already years ago if I remember well...probably nothing we to do?

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)