Is there a shortcut for the last used tool?
I know this question sounds really simple; I'm a beginner with Photoshop.
I'm learning about the different tools. Is there a keyboard shortcut for accessing the last used tool? If not, would it be possible with AppleScript?
Um... not really, but Photoshop has another trick up its sleeve that you might like even better, and is arguably much more useful.
Every tool has a keyboard shortcut, and when you're using one tool -- say, the Brush (B) and you want to switch to another -- the Eraser (E), let's say -- you would press and hold
e, erase what you wanted, then release the key to revert to the Brush. These "spring-loaded keys" came in somewhere around CS4, and they're a great help in speeding workflow.
Rather than trying to cook up a script, if you want to get up to speed with Photoshop, make a cheat sheet of the keyboard shortcuts and learn them. They're pretty easy (B for Brush, E for Eraser, S for clone Stamp, R for Rotate canvas etc.), and in the not-so-very-long run this will prove far more useful and versatile than an automated "last used tool".