Applescript alt+tab?

Discussion in 'Mac Programming' started by PhoenixMac, Jul 21, 2013.

  1. PhoenixMac macrumors 65816

    Mar 7, 2010
    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?

  2. wrldwzrd89 macrumors G5


    Jun 6, 2003
    Solon, OH
    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?
  3. Dalton63841 macrumors 65816


    Nov 27, 2010

Share This Page