scripting component error Photoshop CS5.1

Hi this i really odd as this script has been in use for a long time now and all of a sudden I get this?

tell application “Adobe Photoshop CS5.1”
set ruler units of settings to pixel units
→ error number -1750

This has never caused an issue before, why now what has changed?
Please help! Many Thanks
Matt

Here it the script,

tell application "Adobe Photoshop CS5.1"
						-- I remove the command activate, Photoshop stay in background
						set ruler units of settings to pixel units
						
						try
							open (alias thefile) showing dialogs never
							set origName to name of current document
							set myOptions to {class:JPEG save options, quality:12}
							set myPSDOptions to {class:Photoshop save options, embed color profile:true, save layers:true}
							
							tell current document
								
								
								--If the quick mask mode has been left on then delete the channel Quick Mask
								if (quick mask mode) then delete channel ¬
									"Quick Mask"
								--If the Layer is incorrectly labeled with Original Layer it needs renaming to original Image
								if (exists layer "Original Layer") then ¬
									tell layer "Original Layer" to set name to "Original Image"
								save in (localBrandFolder_PSD & origName) as Photoshop format with options myPSDOptions without copying
								(delete layer "Original Image") flatten
								
								resize image resolution 300 resample method none
								
								--sharpen image
								filter current layer using unsharp mask with options {amount:80, radius:3.2, threshold:0}
								
								save in (ftpBrandFolder_High_Res & name) as JPEG with options myOptions without copying
								
								--Prepare for Low RES by resetting image history
								set current history state to history state 3
								
								flatten
								
								resize image width 1348
								resize image resolution 300 resample method none
								filter current layer using unsharp mask with options {amount:80, radius:3.2, threshold:0}
								
								--add save to lowResFolder with same options
								save in (networkBrandFolder_Low_Res & name) as JPEG with options myOptions without copying
								
								set newFile to file path
								set newFile2 to newFile as string -- for testing end of name
								if newFile2 ends with "_2.jpg" or newFile2 ends with "_3.jpg" or newFile2 ends with "_4.jpg" or newFile2 ends with "_5.jpg" or newFile2 ends with "_6.jpg" or newFile2 ends with "_7.jpg" or newFile2 ends with "_8.jpg" or newFile2 ends with "_9.jpg" or newFile2 ends with "_10.jpg" or newFile2 ends with "11.jpg" then -- exclude website_images
									my duplicateFile(newFile, {ftpBrandFolder_Low_Res})
								else
									my duplicateFile(newFile, {ftpBrandFolder_Low_Res, website_images})
								end if
								
								close saving no

Oddly a reboot and all became normal
:slight_smile: