have been trying Progress bar no success

I have been trying to use the progress bar in extra suites with a script that i have written, but it doesn’t work.

tell application "Extra Suites"
	display progress counting to value_ top 100 with caption "Counting"
	repeat with i from 1 to value_
		set ycoord to 0 + (item i of mouseList)
		delay 1.0
		set isCancelled to advance progress by 1 updating caption to "Counting " & i & " of " & value_
		if isCancelled = true then exit repeat
	end repeat
	close progress
end tell

Value_ is defined earlier.

The code normally works, but it gets stuck when it reaches uploadFile(ycoord)

any ideas??

solved it, if i put my infront of the methods then it work’d