View Full Version : Programming "BACK" with Applescript
Mar 19, 2008, 01:08 PM
I have no programming knowledge but I do know that I'd like to assign a BACk button to my Mighty Mouse.
It seems that the only way to do that is to make a Applescript which takes a user back to the previous page (regardless of the application).
I need some help to do this as I don't have a clue of how and where to start.
Appreciate the help,
Mar 19, 2008, 02:12 PM
I use USB Overdrive X (http://www.usboverdrive.com/USBOverdrive/News.html). It checks out all the buttons available on your input device (in this case your Mighty Mouse) and let's you assign commands/keystrokes etc to each of them. I use it with my 9-button Logitech mouse - works a charm.
I recommend you give it a try.
Mar 20, 2008, 01:54 AM
Yeah, USB Overdrive is great.
But is it just as easy to program Back and Copy into Applescript?
Mar 21, 2008, 01:33 AM
I think you would find an AppleScript solution to be slow. If I am understanding this right, you want a mouse click to activate an Applescript. The amount of time it would take the script to launch would be measured in seconds (not milliseconds).
You might be able to do event handlers in the script. In this case the script would always be running and then the handler would get called. The downside here is that this script (application) will always be running and would show in the dock.
Also, I get the impression that you want this to act on more than just a web browser. The script would have to have logic in it that detects the front-most application and then there would have to be code specific to that application in the script. This assumes that the application you are using is either AppleScriptable or that you can use UI scripting on it.
I think it would be a lot of work and may not give you the results you expect in every application. Picking out just one application, say Safari, and trying to get this to work might not be a bad learning experience. I'm pretty sure you will need to resort to UI scripting to click "Back" for you.