Holding Letter Key Down (Please Help)

Alright guys, I’ve been searching the internet high and low for scripting solutions and even software solutions for OS X that can take make a simple process happen in Safari for me. To no avail I have been sent here as pretty much my last resort for any assistance.

What I am trying to do is to have a script that presses and holds the letter “f” constantly until a hotkey is pressed or looped for 60 minutes. That’s it. Pretty simple but I’m not really a scripter and not sure of Applescripts capabilities in executing this type of code or not. If any of you can help me and guide me in the right direction (even script examples), I would be greatly appreciative.

Remember:

Press and Hold (“F”)
Loop until Hotkey is pressed OR Looped for 60 minutes.

Thanks again guys.

Try this.

with timeout of 3600 seconds
	repeat
		tell application "System Events" to keystroke "F"
	end repeat
end timeout