I have just started to look at Applescript Studio, and am looking at the Apple guide Examples
http://developer.apple.com/documentation/AppleScript/Conceptual/StudioBuildingApps/
to guide me through the basics.
One Problem is I have to keep switching from Xcode or Interface Builder to safari to read the next step in the example
Project.
Annoying.
so I just quickly ran up these two script to use with my hotkey application. ( Spark ).
The scripts allow you to have the Applications Xcode or Interface Builder (or any other app) above safari.
with the part you need to read visible.
Now when I hit my hotkeys I can scroll up or down in safari while it still stays in the background.
Scroll up ( I use alt+Up arrow )
tell application "System Events"
click button 2 of scroll bar 1 of scroll area 1 of group 4 of window 1 of application process "Safari"
end tell
Scroll Down ( I use alt+Down arrow )
tell application "System Events"
click button 1 of scroll bar 1 of scroll area 1 of group 4 of window 1 of application process "Safari"
end tell