Script runs but not from Utilities folder

I have a simple Applescript that takes a number of images in a folder that you select and then mirror images the images using Graphic Converter. This script runs fine but will not run if it is placed in the Utilities folder. When trying to run from the Utilities folder the error message is “Can’t get window”. It will run from any other location including the Applications folder. I’m going crazy trying to figure this out!

I’m running OSX 10.7.4 and Graphic Converter 8.1 (latest version).

Here is the script

tell application "Finder"
	activate
	set loopFinish1 to 0
	set pathName to (choose folder with prompt "Choose  Folder Containing Images")
	set fileList1 to every file of folder pathName
	set loopFinish1 to count of items of fileList1
end tell

tell application "GraphicConverter"
	activate
	repeat with i from 1 to loopFinish1
		set currentFile to item i of fileList1
		open currentFile as alias
		mirror window 1 in horizontal
		close window 1 saving yes
	end repeat
end tell


Model: Mac Pro running Lion
AppleScript: 2.4
Browser: Firefox 7.0
Operating System: Mac OS X (10.6)

Will try tomorrow. Thanks.

Model: Mac Pro running Lion
AppleScript: 2.4
Browser: Firefox 14
Operating System: Mac OS X (10.7)

Gave it a quick try and :frowning:

Model: Mac Pro running Lion
AppleScript: 2.4
Browser: Firefox 14
Operating System: Mac OS X (10.7)

VERY STRANGE

I noticed that even though I made a couple of changes to the script that the modified date didn’t change. So I copied the code into a blank AS file and saved it in the Utilities folder.

1 - I ran it from the Utilities folder and it ran. :slight_smile:
2 - I noticed that the file size in the list view was then grayed out. I have never observed this in years of using Mac’s ???
3 - I tried to run it again and got the same error message as noted above.:frowning:

Something weird is going on. I know that with 10.7 the Utilities folder is protected; this must have something to do with it. I am able to run other scripts from the Utilities folder although none of them utilize Graphic Converter.

Clarification: when I say in the Utilities folder they are actually in a sub folder called Bobs_Scripts.