Copy link to clipboard
Copied
When I access file location on a Win:
'/C/Program Files/Adobe/Adobe After Effects CS6/Support Files/Scripts/ScriptUI Panels/Folder/Text.png'
However what is the above code on a Mac?
just wondering how to access icons or images (for buttons and UI layouts) from other locations on the MAC.
Over at this post post I mention a helpful technique to verify a file path.
http://forums.adobe.com/thread/1398034?tstart=0
alert(File.decode(File.openDialog()));
This will allow you to pick a file and the resulting alert will reveal the path string.
The alternate way is to use some of the native Folder Object properties (pg. 56 JavaScript Tools Guide CC.pdf) to access common folders.
Folder.app
...Copy link to clipboard
Copied
You can get this dynamically by using this...
var aeFolder = Folder.appPackage.parent;
var scriptFolder = aeFolder.toString() + "/Scripts/";
var scriptUIFolder = scriptFolder.toString() + "ScriptUI Panels/";
alert(aeFolder + "\r" + scriptFolder + "\r" + scriptUIFolder);
Copy link to clipboard
Copied
I was thinking more on importing an image to a UI or an icon button.
In one of your tutorials, you mention this and gives this exsample (image:'~/Desktop/Alert.png'},\) on how to get an image on a button:
(http://provideocoalition.com/pvcexclusive/video/after-effects-extendscript-training-ep-12)
However I have not access to my MAC at this time, and was just wondering how to access icons or images (for buttons and UI layouts) from other locations on the MAC.
Let's say I want to get the image for my icon button from the ScriptUIFolder and not form the Desktop. How can i write that?
Have allready tried;
'~/Applications/Adobe After Effects CC/Scripts/ScriptUI Panels/Folder/Text.png'},\
But it did not work
On my Win PC I would write it like this: '/C/Program Files/Adobe/Adobe After Effects CS6/Support Files/Scripts/ScriptUI Panels/Folder/Text.png'
Anyway, I am extremely grateful that you have made ​​some AE scripting tutorials. They have taught me a lot and helped me learning some AE scripting.![]()
Copy link to clipboard
Copied
just wondering how to access icons or images (for buttons and UI layouts) from other locations on the MAC.
Over at this post post I mention a helpful technique to verify a file path.
http://forums.adobe.com/thread/1398034?tstart=0
alert(File.decode(File.openDialog()));
This will allow you to pick a file and the resulting alert will reveal the path string.
The alternate way is to use some of the native Folder Object properties (pg. 56 JavaScript Tools Guide CC.pdf) to access common folders.
Folder.appData //A Folder object for the folder that contains application data for all users. Read only.
//> In Windows, the value of %APPDATA% (by default, C:\Documents and Settings\All Users\Application Data)
//> In Mac OS, /Library/Application Support
Folder.appPackage //In Mac OS, the Folder object for the folder that contains the bundle of the running application. Read only.
Folder.commonFiles //A Folder object for the folder that contains files common to all programs. Read only.
//> In Windows, the value of %CommonProgramFiles% (by default, C:\Program Files\Common Files)
//> In Mac OS,/Library/Application Support
Folder.current //A Folder object for the current folder. Assign either a Folder object or a string containing the new path name to set the current folder.
Folder.desktop //A Folder object for the folder that contains the user’s desktop. Read only.
Folder.fs //The name of the file system. Read only. One of Windows, Macintosh, or Unix.
Folder.myDocuments //A Folder object for the user’s default document folder. Read only.
//> In Windows, C:\Documents and Settings\username\Desktop
//> In Mac OS,~/Documents
Folder.startup //A Folder object for the folder containing the executable image of the running application. Read only.
Folder.system //A Folder object for the folder containing the operating system files. Read only.
//> In Windows, the value of %windir% (by default, C:\Windows)
//> In Mac OS, /System
Folder.temp //A Folder object for the default folder for temporary files. Read only.
Folder.trash
//> In Mac OS, a Folder object for the folder containing deleted items.
//> n Windows, where the Recycle Bin is a database rather than a folder, value is null.
Folder.userData //A Folder object for the folder that contains application data for the current user. Read only.
//> In Windows, the value of %USERDATA% (by default, C:\Documents and Settings\username\Application Data)
//> In Mac OS, ~/Library/Application Support
Copy link to clipboard
Copied
Just what I was looking for!
Thanks alot for everything, and thanks for the very clever technique to verify a file path. ![]()
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more