PDA

View Full Version : Applescript alt+tab?




PhoenixMac
Jul 21, 2013, 06:35 PM
Is there an ascii character for option(alt) and tab?


I am going through Applescript trying to automate navigating through a website to print a page to pdf and the only way I can think of getting there is to cycle through the links on the page then entering, is there a better way of doing this?

Thanks.



wrldwzrd89
Jul 22, 2013, 11:24 AM
As far as I know, Alt+Tab does not map to a character at all - ASCII, Unicode, or otherwise. Tab by itself certainly does, but Alt does not. That being said, I'm sure there's a better way to do this. My first thought was to use Java's Robot functionality to insert events into the OS event queue to simulate clicking the links etc. That will work, but it's kind of an ugly hack, and it'll break if the website changes. A second thought then emerged: Why not use AppleScript together with a utility like HTMLParser, to look in the page for the needed URL, and, once found, navigate to it as many times as needed?

Dalton63841
Jul 22, 2013, 11:36 AM
..... nvm