Tape the keys down?
-----
(*
Remember you need to enable assistive devices.
This lets applications software access screen elements.
blue apple > system perferences > universal access > enable assistive devices
*)
-- Write a message into the event log.
(*
Run this program from the Script Editor. Click on the Event Log tab at the
bottom of the screen.
*)
log " --- Starting on " & ((current date) as string) & " --- "
set the_item_ref to choose file with prompt "Select an html, text, or some other file Safari will display."
-- Activate
activate application "Safari"
-- Open the URL
tell application "Safari"
open the_item_ref
-- print
-- System Events interacts with the current active applications.
tell application "System Events"
tell process "Safari"
-- Your simulating typing on the keyboard. You need to allow time
-- for the application to run. It's always a guess about delay in seconds.
delay 3
-- Be sure your printer is up & running before printing.
keystroke "p" using command down
delay 3
keystroke return
delay 10
keystroke "w" using command down
end tell
end tell
end tell -- of Safari
-----------
iKey is a front end program that simulates typing and mouse movements. I use iKey to remap the Function keys.
"iKey is an automation utility, a program that creates shortcuts to accomplish repetitive tasks. In essence, an iKey shortcut is a little program in its own right, but you don't need to know the first thing about programming to create an iKey shortcut. All you have to do is put together three necessary parts of a shortcut: One or more commands that give the shortcut its functionality, a context in which it runs, and a launcher that defines how the shortcut is activated."
http://www.scriptsoftware.com/ikey/
iKey has a little more function then the previous free version called youpi key. For many years, I used youpi key before switching to iKey. It works fairly well for me in MAC OS 10.4 although not officially supported. The youpi key download is hard to find & no longer here.
http://www.versiontracker.com/dyn/moreinfo/macosx/11485&vid=75326
Examples:
I have the common programs that I use assigned to function keys. I have F4 assigned to Firefox. When I want to start FireFox, I press F4. When I want to switch to firefox, I press F4! Starting & switching to an application in Mac OS are the same thing in Mac OS.
Here is an example of to assign volumn control to a function key.
http://discussions.apple.com/message.jspa?messageID=10361085#10361085
Here is my script for listing my application folder. I have it assigned to function-key 6.
!http://farm3.static.flickr.com/2689/4292832695_f3a8f1122e.jpg!
tell application "Finder"
open folder "Applications" of startup disk
select Finder window 1
set bounds of Finder window 1 to {-3, 44, 691, 545}
--set position of Finder window 1 to {33, 44}
set position of Finder window 1 to {60, 45}
activate
end tell
The second portion of this script was generated in the script editor record mode. After I recorded the script and did some editing, I copy the script to ikey/youpi key.
Robert