Scaling a Layer in Photoshop

I have made a rudimentary script (I will get to all the error trapping later) that will retrieve the original scale percentage of a graphic in an InDesign layout then take the image layer selected in a multi-layered Photoshop document and apply a scale resize to that layer in the Photoshop document.
However, I have tried to get the right syntax to call on the layer to scale, but I get only errors even getting the scale command to compile, thus I know I am not entering the correct stuff. The scale line keeps saying it expects the end of line, so what should it say at that point?


tell application "Adobe InDesign CS6"
	set mySelect to selection
	
	tell active spread of active window
		set thisBox to item 1 of mySelect
		--return thisBox
		set HScale to the absolute horizontal scale of thisBox
		--return HScale
		
	end tell
end tell
myScaleConversion(HScale)
set PSScaled to result as real
--return PSScaled
tell application "Adobe Photoshop CS6"
	set thisLayer to current layer of current document
	set scaleSet to {horizontal scale:PSScaled, vertical scale:PSScaled, anchor:top left}
	scale thisLayer with options	scaleSet
	
end tell


on myScaleConversion(HScale)
	set ScaleRatio to 2.5 as real
	set PSScale to (ScaleRatio * HScale)
	return PSScale
	
end myScaleConversion

Thanks for any help!

Model: iMac 2009 3.33 GHz Intel Core 2 Duo, 16 GB RAM
Browser: Safari 536.30.1
Operating System: Mac OS X (10.8)