Jump to content

Activate and hide window - help, algorithm provided

window activate hide applescript shortcut keyboard algorithm

  • Please log in to reply
No replies to this topic

#1
williamaquila

williamaquila

    InsanelyMac Protégé

  • Members
  • Pip
  • 1 posts
Hi all
 
I've been trying to solve a problem.
 
I'm trying to write an Applescript that does the following, I have spent numerous hours trying to get it work but still not going anywhere near. The algorithm is actually simple, as below:
 
if (window whose title contains text "[my google email address]") does not exist
then
          create a new Chrome window with address "https://mail.google.com/mail/u/0"
          put the window in presentation mode
else
          if (window whose title contains text "[my google email address]") exists but does not have focus, or hidden
          then bring focus to the window
          else hide the window
          end if
end if
 
 
Could any one help to suggest what code would work? Thanks heaps
MacBook Air, OS X Mavericks (10.9.1)







0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy