Sets or retrieves a Favorites list.
Syntax
Code: Select all
favs(type=(d|f), [items], [separator=CRLF], [action=a|p|s|d)
- type [required]
Specifies which favorites list.- d = Folders/Directories
- f = Files
- items [optional]
Favorite items separated by separator.
If missing the function just returns the current favorites of specified type. - separator [optional]
Separator for list of items.
Defaults to CRLF (line feed).
Notes: CRLF chosen over pipe ('|') since items may contain visual filters or script. - action [optional]
Action to take with the items.- a = Append to current list. (default)
- p = Prepend to current list.
- s = Set/Replace current list.
- d = Delete from current list.
Examples
Code: Select all
text favs('f'); // return the current list of favorite files
favs('d', <curpath>); // add current path to favorite folders
favs('d', <curpath>,, 'd'); // remove current path from favorite folders
favs('f', <focitem>,, 'p'); // add focused item to top of favorite files
paperfolder('Favorites', favs('f') . <crlf> . favs('d')); // save favorite files and folders to a 'Favorites' paper folder
Code: Select all
+ Scripting got a new function.
Name: favs
Action: Set or retrieve a Favorites list.
Syntax: favs(type=(d|f), [items], [separator=CRLF], [action=a|p|s|d)
type: [required] Specifies which favorites list.
d = Folders/Directories
f = Files
items: [optional] Favorite items separated by separator.
If missing the function just returns the current favorites.
separator: [optional] Separator for list of items.
Defaults to CRLF (line feed)
action: [optional] Action to take with the items.
a = Append to current list. (Default)
p = Prepend to current list.
s = Set/Replace current list.
d = Delete from current list.
return: The list of current favorites for the specified type.
Examples:
text favs('f'); // return the current list of favorite files
favs('d', <curpath>); // add current path to favorite folders
favs('d', <curpath>,, 'd'); // remove current path from favorite folders
favs('f', <focitem>,, 'p'); // add focused item to top of favorite files
paperfolder('Favorites', favs('f') . <crlf> . favs('d'));
// save favorite files and folders to a 'Favorites' paper folder