Sunday, June 13, 2021

#1 2021-06-09 03:45:36 pm

StevenRayNDTLive
Member
Registered: 2021-04-18
Posts: 1

Alias

Hello I was wondering if there are reserved alias for applescripts like this_folder or this_item, and if there are where I could find a list or directory of them.


Filed under: alias

Offline

 

#2 2021-06-10 06:56:32 am

peavine
Member
From:: Prescott, Arizona
Registered: 2018-09-04
Posts: 910

Re: Alias

StevenRayNDTLive. The Standard Additions dictionary briefly describes commands for path to specified application, path to specified folder, and path to resource, and these return aliases. The AppleScript Language Guide provides more information on these:

https://developer.apple.com/library/arc … mentID_771

AppleScript Objective-C provides additional options but I suspect that's not what you're looking for.

I'm not certain what you mean when you write this_item and this_folder.

Last edited by peavine (2021-06-10 08:30:31 am)


2018 Mac mini - macOS Catalina

Offline

 

#3 2021-06-10 07:33:48 am

Fredrik71
Member
Registered: 2019-10-23
Posts: 798

Re: Alias

StevenRayNDTLive wrote:

Hello I was wondering if there are reserved alias for applescripts like this_folder or this_item, and if there are where I could find a list or directory of them.


If you mean folder actions its only placeholder for the handler to work correctly.

this_folder is the folder (folder action is attached to) and these_items is the items that you
copy/move/drag to the folder. And inside the folder action handler you have your code to do something with your items.

ex.

Applescript:

on adding folder items to this_folder after receiving these_items
   -- insert actions here
end adding folder items to

Last edited by Fredrik71 (2021-06-10 07:35:28 am)


if you are the expert, who will you call if its not your imagination.

Online

 

#4 2021-06-10 11:17:00 am

alastor933
Member
From:: Utrecht, NL
Registered: 2008-09-12
Posts: 582

Re: Alias

I'm not so sure he's after folder actions, but this is also correct:

Applescript:

on adding folder items to thatfolder after receiving allthisstuff
   -- insert actions here
end adding folder items to

this_folder or thatfolder - it doesn't matter, those are just variable names. You can use whatever you like (mostly).

StevenRayNDTLive wrote:

...wondering if there are reserved alias for applescripts like this_folder or this_item...

reserved alias is a meaningless expression in AppleScript. Try to rephrase your question, please.

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)