• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit Search
0

I want to have an action export to a location under Windows and Mac -questions

Explorer ,
Mar 14, 2023 Mar 14, 2023

Copy link to clipboard

Copied

1. Is there a common location that exists on both Mac and Windows?  For example "C:"

2. Does the Mac version of PS have Export > Legacy to export gif files?

3. Is there a way, withinf an action to detect if it is running on a Mac or Windows?

If not, I guess I will have to get a Mac user to modify my action which is written on a Windows machine.

Thanks,

 

TOPICS
Actions and scripting , macOS , Windows

Views

510

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 14, 2023 Mar 14, 2023

Copy link to clipboard

Copied

1) I think the desktop works for both OS, »C:« is not meaningful on Mac. 

2) Do you mean »Save for Web (Legacy)«? That exists. 

3) That would probably need a Script, not an Action. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 14, 2023 Mar 14, 2023

Copy link to clipboard

Copied

" Do you mean »Save for Web (Legacy)«? That exists. "

thank you,

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 14, 2023 Mar 14, 2023

Copy link to clipboard

Copied

ad 3) This JavaScript snippet should detemine whether the OS is Windows or Mac and you could for example add operations in the Script itself or have it run different Actions. 

if ($.os.search(/windows/i) != -1) {alert ("windows")}
else {alert ("mac")};

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 14, 2023 Mar 14, 2023

Copy link to clipboard

Copied

LATEST

@mangurian wrote:

1. Is there a common location that exists on both Mac and Windows?  For example "C:"


 

Not with an action. A script can do so. Dealing with absolute file system paths is problematic for actions*.

 


2. Does the Mac version of PS have Export > Legacy to export gif files?

 

Both Mac and Win actions support File > Export > Save for Web (Legacy). Export As and Quick Export are not yet available for actions or scripting. Again, dealing with absolute file system paths is problematic for actons*.

 


3. Is there a way, withinf an action to detect if it is running on a Mac or Windows?


 

Not that I am aware of, a script can do so through.

 

*Notice the save step in the recorded action screenshot below. If a file system path can't be resolved (drive not available, different operating system etc) then the path is lost in the action.

 

files-to-artboards-atn.png

 


If not, I guess I will have to get a Mac user to modify my action which is written on a Windows machine.

Thanks,


 

That would be the easiest thing to do to keep the action self contained.

 

Although one can record scripts into an action to handle steps that can't be accomplished by an action, the script/s need to be installed on each computer as well. This is easy enough to do and not a big chore, however, it means that the action is no longer self-contained and has a dependency to another file/s. The alternative would be to write a script to perform the same steps as the action so that only a single script would be required.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines