Check a CheckBox using applescript

Is it possible to check a CheckBox in an application(Photoshop) using Apple Script

Code

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 choosefile

tell application “Adobe Photoshop CS3”
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 CS3”
----------Code to Check CheckBox must come here so as to prevent the warning dialog from coming again in Photoshop--------
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 CS3”
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

Model: MacBook
AppleScript: 0.17.2
Browser: Safari 525.27.1
Operating System: Mac OS X (10.5)

Hi Ravi,

I’m not sure about checking it with script per se. Have you reviewed the PhotoShop AppleScript reference guide?

Alternatively, you could simulate a mouse click. Not eloquent but sometimes it does the trick.

Best of luck.

Hello Thompson,

Q:Have you reviewed the PhotoShop AppleScript reference guide?

A:It doesn’t support such options…to check a check box in warning dialogs or suppresssing the warning dialogs…

Is there a way that I can simualte a mouse click so il try that in the present scenario…Thanks for your time