As Im sure everyone knows, making your own web page in script studio is really easy and fun. (The "WebView" topic has been discussed several times already so I hope this won
t totally bore all of you that already know how to do this.)
- Make new AppleScript Application project.
- Add WebKit frameworks to the “Other Frameworks” folder in XCode
(This is done by selecting “Add Frameworks” from the “Project Menu” and then choosing “WebKit”.) - From the GraphicsView palette, add a WebView to your window
- From the Text palette, add a text field to the top of your window
- With control key down, drag from the text field to the WebView window and choose takeStringURLFrom: from the Target/Action section of the “Connections” section of the “Info Window” (in Interface Builder)
Now run the script and any url put into the text field will bring up the web page in the WebView (After pressing return). Really Cool.
I have a simple page set up so that in the morning when I get to work and can check out the world events and mac news before getting going. (During lunch I use Safari to do my usual browsing. My web app, however, has a nice simple interface that automatically takes me through the 3 pages I want to see in the morning before starting work.)
Anyway, my question/problem is this:
-I want to use the up and down arrow keys to scroll up and down in my web page (like in Safari) but to do this you have to click the mouse once in the WebView, wait a second while the page refreshes(?) and then click the mouse in the WebView again. After that, you can use the arrow keys for scrolling with no problems. This is really a little picky interface issue but I would like to set my app up so that when I go to a particular URL, it automatically sets things up so that I can start using the up and down arrow keys without having to go through the mouse clicks.
What do you do? Is there some kind of command like (Set the view “webView” to be the active target) (sort of like a first responder type of command) that would do it? I can`t seem to find anything in the documentation regarding it.
Any help would be greatly appreciated.
Thanks in advance.