Applescript alt+tab?

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

  1. macrumors 65816

    Joined:
    Mar 7, 2010
    #1
    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.
     
  2. macrumors G4

    wrldwzrd89

    Joined:
    Jun 6, 2003
    Location:
    Solon, OH
    #2
    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. macrumors 65816

    Dalton63841

    Joined:
    Nov 27, 2010
    Location:
    SEMO, USA

Share This Page