10.6 script won't even compile under Lion

I am new to scripting but managed with your help to put together a script that helps remove commercials. It works fine in 10.6 but Lion won’t compile and changes the code from selection start, end to just selection and gives a syntax error “Can’t se <> to inValue. Access not allowed.”

The script gets in and out points from excel. It puts them into QT and allows me to adjust them before I cut the commercial. Both Excel and QT have to be open. Works in 10.6 why not Lion? Here is the script that lion will not compile, note it changes selection in and out to just selection.

repeat – start of shell

--finds the end of the in-out array 
tell application "Microsoft Excel"
	set inOutList to value of used range of active sheet
end tell

-- the loop that decrements array
--"i" is a pointer to array

repeat with i from (count inOutList) to 1 by -1
	set {startValue, stopValue} to item i of inOutList -- puts in-out values to variables
	set inValue to startValue * 1000.01528202278  -- use constant to interpolate in/out points
	set outValue to stopValue * 1000.01528202278
	tell application "QuickTime 7"
		activate --allow QT to be run by script
		tell document 1 --the active file in QT
			set «class sels» to inValue--                             WHY THE CHANGE TO SELECION
			set selection to outValue --set in out points
			set time to inValue --show in point
			delay 2 --wait show out point
			set time to outValue
		end tell
		--branch point	
		--make display for dialog box	
		set messageText to "cut " & quote & name of document 1 & quote & return & ¬
			return & " start: " & inValue & ¬
			return & "end: " & outValue & ¬
			return & "Adjust before Cut" & ¬
			return & "Use only this Button for Cut"
		my displayMessage(messageText) --call subroutine displayMessage
		--(msg) sets buttons and response
		-- if default do tell-cut-end tell
		--if not skip next 3 lines go to next item in in-out list
		tell document 1
			«event misccut »
		end tell
	end tell
end repeat
--my displayMessage2("Next Show ?")

---start of exit
activate me
set {button returned:buttonReturned} to display dialog "Project Complete " buttons {"Quit", "Next Project"}
if buttonReturned is "Quit" then
	exit repeat
end if

end repeat

–subroutine when called activate and pass processing power to QT
on displayMessage(msg)
activate me
display dialog msg buttons {“Cut”} default button 1
activate application “QuickTime 7”
end displayMessage

on displayMessage2(msg)
activate me
display dialog msg --buttons {“Quit Script”,} default button 1
–activate application “QuickTime Player 7”
end displayMessage2

(1) QuickTime 7 isn’t installed by default under Lion.
(2) If I replace the instruction
tell application “QuickTime 7”
tell application “QuickTime Player”
the script compiles but there is an other oddity.
The block

tell document 1
«event misccut »
end tell

is not correctly treated but I don’t know what must be the correct instruction.

Yvan KOENIG (VALLAURIS, France) mercredi 30 janvier 2011 23:27:52