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

Warning Dialogs in PhotoshopCS3

Guest
Apr 23, 2009 Apr 23, 2009

Copy link to clipboard

Copied

I do not want Photoshop to display any warning dialogs when trying to open an image(Ex:PDF file contains annotations and they will be discarded.. etc,) Is there any way that we can turn off or suppress these Warning Dialogs in PhotoshopCS3

TOPICS
Actions and scripting

Views

6.1K

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
Adobe
Valorous Hero ,
Apr 24, 2009 Apr 24, 2009

Copy link to clipboard

Copied

You could try this..

app.displayDialogs = DialogModes.NO;

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
Guest
Apr 24, 2009 Apr 24, 2009

Copy link to clipboard

Copied

Thanks Paul,

That will help us not to display the dialog boxes in photoshop..but still the warning dialogs which comes with OK button and a check box(Dont show dialog again) is still displayed..

ps = app('/Applications/Adobe Photoshop CS3/Adobe Photoshop CS3.app')

ps.display_dialogs.set(k.never)

The above mentioned two lines will help to suppress only dialog boxes not the warning dialogs which will come only some times when trying to open an image...any suggestions??

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
Valorous Hero ,
Apr 24, 2009 Apr 24, 2009

Copy link to clipboard

Copied

It may be your pdf open options?

var pdfOpenOptions = new PDFOpenOptions();
pdfOpenOptions.antialias = true;
pdfOpenOptions.suppressWarnings = true;
pdfOpenOptions.usePageNumber = true;
pdfOpenOptions.page = 1;
pdfOpenOptions.resolution = 72;
pdfOpenOptions.mode = OpenDocumentMode.RGB;

open(file,pdfOpenOptions);

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
Guest
Apr 24, 2009 Apr 24, 2009

Copy link to clipboard

Copied

I am already using the opening options for PDF as below:

OPEN_OPTIONS = { 'PDF': {k.class_:k.PDF_open_options,

                         k.resolution: 300,

                         k.page: 1,

                         k.mode: k.RGB,

                         k.use_antialias:True,

                         k.suppress_warnings:True},

                 'EPS': {k.class_:k.EPS_open_options,

                         k.resolution: 300,

                         k.use_antialias:True}}

Still photoshop comes up with warning dialogs when opening PDF files also
Is there a solution so that I can manually or programatically make photoshop not to show any warning dialogs.

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
Guest
Apr 24, 2009 Apr 24, 2009

Copy link to clipboard

Copied

PDF_open_options -- Settings related to opening a generic PDF document

suppress_warnings boolean -- supress any warnings that may occur during openin

This doesn't work..Is there any other way that I can suppress warnings while opening a PDF file

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
Valorous Hero ,
Apr 24, 2009 Apr 24, 2009

Copy link to clipboard

Copied

I don't think there is much more you can do, I haven't had that problem using javascript. Have you tried javascript to open the same file? if so does it give the same problem. Is it a bug with com?

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
Guest
Apr 24, 2009 Apr 24, 2009

Copy link to clipboard

Copied

Hi Paul,

     Forgot to say you that I am working on Mac...In Windows you can get the opened pop ups in an application..so it is not a problem with com...In mac there is no such option to find the pop ups and its controls that are coming up in an application.. Is there in any way on mac with Photoshop CS3 we can suppress these warning dialogs

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
Advisor ,
Apr 24, 2009 Apr 24, 2009

Copy link to clipboard

Copied

This doesn't work..Is there any other way that I can suppress warnings while opening a PDF file

I don't know about this specific case with PDF files, but I know that

there are cases with certain kinds of file corruption (esp jpegs) that

it will always show a warning in spite of anything that you do

programatically or with preferences. This has been a massive problem

with PS when writing scripts that have to process large numbers of

jpegs. On WinXP, you can use AutoKey (or whatever is was called) to get

around this annoying problem, but I never could get anything working on

the Mac. But you may have better luck.

-X

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
Guide ,
Apr 24, 2009 Apr 24, 2009

Copy link to clipboard

Copied

I have never been able to sort this either on a Mac with AppleScript. Sure in some cases the corruption may give a dialog that you can have system events return to OK the button and the file opens but with other types of corruption there is no such dialog and file just does not open. Photoshop seems much more fussy over JPEG markers than some other apps.

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
Guest
Apr 24, 2009 Apr 24, 2009

Copy link to clipboard

Copied

Thanks Mark,

I am working on Mac and are there any system events which can return to OK the button and the file opens.. I tried Carbon with no success... I am trying to check Cocoa in Mac to return OK... What are the system events to be used to return OK and check on Dont show dialogs again..

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
Guide ,
Apr 25, 2009 Apr 25, 2009

Copy link to clipboard

Copied

You are welcome to try this for what its worth. It should do 2 things. First if there is a Photoshop "warning" record the info the dismiss the dialog proceed with file else record the "error" info kicked back to AppleScript but not process this file. This is a far as I got with this and you would be well advised to do some testing of your own. Requires Enable access for assistive devices this is in system prefs.

property Error_Report : (path to desktop folder as Unicode text) & "Problem Image Report.txt"

global PS_Info

set PS_Info to ""

--

set The_File to choose file

--

tell application "Adobe Photoshop CS2"

activate

try

with timeout of 2 seconds

open The_File

end timeout

on error

my Check_For_Dialogs()

tell application "System Events"

tell application process "Adobe Photoshop CS2"

keystroke return

end tell

my Problem_Images(The_File, PS_Info)

end tell

end try

if exists document 1 then

set Doc_Ref to the current document

tell Doc_Ref

-- do your stuff here

end tell

end if

end tell

--

on Check_For_Dialogs()

-- This should catch the text of a Photoshop warning dialog

try

tell application "System Events"

if UI elements enabled then

tell window 1 of application process "Adobe Photoshop CS2"

if title contains "Adobe Photoshop" then set PS_Info to value of static text 2

end tell

else

tell application "System Preferences"

activate

set current pane to pane "com.apple.preference.universalaccess"

display dialog "UI element scripting is not enabled. Check \"Enable access for assistive devices\""

end tell

end if

end tell

return PS_Info

-- This should catch an error kicked back to AppleScript

on error eM number eN

set PS_Info to "Error: " & eN & ". " & eM

return PS_Info

end try

end Check_For_Dialogs

--

on Problem_Images(The_File, PS_Info)

-- Whatever info about the file you want a record of…

set File_Name to name of (info for The_File)

-- String of records to write to "Problem Image Report" text file…

set The_Info to File_Name & tab & PS_Info & return

try

open for access file the Error_Report with write permission

write The_Info to file the Error_Report starting at eof

close access file the Error_Report

on error

close access file the Error_Report

end try

end Problem_Images

Writes out a report at desktop with info like:
11234567890 copy 3.tif Error: -2763. Cannot open the file because the open options are incorrect
hfgfhr.jpg This document may be damaged (the file may be truncated or incomplete).  Continue?

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
Guest
Apr 26, 2009 Apr 26, 2009

Copy link to clipboard

Copied

Thanks Muppet,

I tested the script with three images that come up with a warning ...Now the script you gave is able to suppress the warning and record them in a file and able to open the image...Need to check with some other image file(different extensions) and il reply you once I complete testing with different type of images that come up with different warnings..Thanks again for your help...

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
Guest
Apr 27, 2009 Apr 27, 2009

Copy link to clipboard

Copied

set The_File to choose file

Is there a way so that we need not choose a file so that it gets opened in photoshop can we pass it as an argument..

For testing purpose I tried to statically give it as set The_File to "/Users/xxxx/Desktop/test.pdf"

Applescript is not able to identify the path..How to declare the filepath in AppleScript

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
Guide ,
Apr 27, 2009 Apr 27, 2009

Copy link to clipboard

Copied

In AppleScript both Photoshop and the handler to write the report expect the file path to be HFS (colon delimited) and passed as alias specifier.

To set a string to alias you do this:

set The_File to "Marks G5:Users:marklarsen:Desktop:Forms.pdf" as alias

The file must exist for the coercion "as alias" to work

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
Guest
Apr 27, 2009 Apr 27, 2009

Copy link to clipboard

Copied

Hey Muppet... That works..I am scripting photoshop in Python and is it possible to convert this AppleScript to Python Script ..I downloaded ASTransalate which converts Applescript to Python,Ruby and ObjC..But it doesnt work for this one...any help

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
Guide ,
Apr 27, 2009 Apr 27, 2009

Copy link to clipboard

Copied

You are way way way out of my depth now I've only just started to learn JavaScript and I doubt I'll have the time to do anything else after that.

You may find someone here with experience in that…

http://macscripter.net/viewforum.php?id=2

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
Guest
Apr 27, 2009 Apr 27, 2009

Copy link to clipboard

Copied

T

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
Guest
Apr 27, 2009 Apr 27, 2009

Copy link to clipboard

Copied

Thanks for your support ...Il figure it out how to implement this applescript in my Project...

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
Guest
Apr 27, 2009 Apr 27, 2009

Copy link to clipboard

Copied

Hi Mark, Thanks for your support till now... I am done with suppressing the warning dialogs using python...Just want to know is there a way in apple script to check the check box in the warning dilaog box so that there will be no warning dialog box with the same message coming up..Presently I am able to just click on the OK button .. I want to check the check box also

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
Guest
Apr 28, 2009 Apr 28, 2009

Copy link to clipboard

Copied

LATEST

tell application "System Events"

tell application process "Adobe Photoshop CS3"

keystroke return

end tell

my Problem_Images(The_File, PS_Info)

end tell

Is it possible to check the CheckBox before doing keystroke return.

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
Guest
Apr 24, 2009 Apr 24, 2009

Copy link to clipboard

Copied

Thanks X,

It is not possible for me manually click on the warning dialog box always so that the same warning dialogs will not come in the future.. but photoshop will come up with warnings depending on the images ...so is there a way in photoshop that we can turn off all the waring dialogs in photoshop..(PS gave option to Reset Warning Dialogs) but no option to turn off Warning Dialogs...Any help is greatly appreciated

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
Advisor ,
Apr 25, 2009 Apr 25, 2009

Copy link to clipboard

Copied

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