Jump to content
williamaquila

Activate and hide window - help, algorithm provided

1 post in this topic

Recommended 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)

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By SavageAUS
      Ok so im looking at doing some upgrades to my input devices and have found some that i like.
      Keyboard: Corsair Gaming Strafe RGB Mechanical Keyboard Cherry Brown
      https://www.pccasegear.com/products/33308/corsair-gaming-strafe-rgb-mechanical-keyboard-cherry-brown
       
      Mouse: Corsair Glaive RGB Gaming Mouse - Black
      https://www.pccasegear.com/products/39190/corsair-glaive-rgb-gaming-mouse-black
       
      Does the corsair software work on mac yet?
      Does anyone use any other above with macOS and have any feedback for me?
      Any feedback at all would be appreciated.
    • By Trung_Nguyen
      Hello everyone,
      I am trying make the fix keyboard backlight on Dell Latitude E6230. It currently works but the macOS not recognized it. There is a keyboard shortcut which had 6 states of bright. I'm using IOWMIFamily to use the display brightness shortcut(Fn Up/Down) Is there a way to make the Ultimate keyboard backlight slider like in Debian?

      Thanks.
      P/s: By the way, what is the ADB codes for VidMirror? I want to remap it because it controlled by PS2 and currently map to cmd+P(print) Thanks again
      DSDT.zip
       
       
    • By ClassicMacMan
      First, system specs:
       
      Abit IP35 Pro MB
      Core2Quad Q6600 CPU
      Geforce 8400GS 256MB GPU
      Corsair Dominator 4GB DDR 1066 RAM (4x1GB sticks)
      320GB WD Blue Hard Drive
      MacAlly Keyboard
      MacAlly Mouse
       
      Initially followed the install process from (the site that shall not be named) to get Snow Leopard installed, then used another tool from same site to upgrade to El Capitan. In the process, boot manager was changed from Chameleon to Clover.

      When Clover gets past init(6), the boot process halts and the num lock/power lights start blinking on my USB keyboard. Unplugging said keyboard allows Clover to complete boot. Luckily, I still have a PS2 keyboard which works with Clover (it now stays plugged in at the same time as the USB keyboard). When I had Snow Leopard installed, it didn't do this, so I'm assuming it's a Clover problem.

      I've tried:
      - Plugging keyboard into all USB ports (both with and without the PS2 keyboard plugged in)
      - Changing BIOS Keyboard settings to both "OS" and "BIOS".
      - Updating Clover to latest version and installing UsbKbDxe-64 driver.

      I tried searching for a DSDT, but only found one for the non-Pro IP35.

      Other Google searching has fixes for UEFI booting systems and different MacOS versions, but nothing that applies to this MB.

      Thoughts?
       

       
×