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 Gabigeek
      Hi everybody,
      First this is my first post on this forum so I hope Im creating a topic at the right place 
      Im french, so sorry for my bad english 
       
      So I recently made a Hackintosh Laptop (on a ROG GL553VD-DM078T )
      This laptop is based on a i7 7700HQ and a GTX1050.
      I installed MacOS Sierra using the Clover bootloader and succesfully installed  the kexts needed but one of them is causing trouble.
       
      I Broke my internal ethernet Port so I must use a USB-C ethernet dongle in order to acces the internet ( The Integrated Wifi chipset isn't compatible so that's my only way to connect.)
      Without the UsbInjectAll.kext everything works exept my laptop keyboard wich use USB (yes, the internal ASUS Aura keyboard use USB interface, not PS2 or IC2 ).
      But if I load the UsbInjectAll kext the keyboard works, but the USB-C ethernet dongle is no more recognized at all ( not even in the system report menu)
      The weird thing is that if I plug a USB stick in the USB-C port, it works, but the ethernet dongle won't.
       
      So now I have 2 options :
      -or I load the UsbInjectAll kext and I get my keyboard to work
      -or I disable the UsbInjectAll kext so i can get back my ethernet USB-C dongle to work, but no more keyboard....
       
      Can someone explain why do this happen ? Is there a way to get both The Ethernet dongle and my internal keyboard to work at the same time ?
      If Needed, I can provide more information about the hardware Used etc.
       
      Have a good Day/night 
    • By Candrahm
      Hi everybody,
       
      I'm new here and French. 
      I success to hack my Asus X751LJ and pass it to High Sierra 10.13.6, not easily, and everything works except the keyboard and the touchpad.
      I tried VoodooPS2Controller, ApplePS2SmartTouchpad, even VoodooI2C, but nothing works...
      Could someone help me? Is there a DSDT problem? Witch kext should I use?
      I post my ACPI and Kexts folders and my IOReg.
      Please... Help me. I'm desperate...
      MacBook Pro de Candrahm.ioreg
      Archive.zip
    • 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
       
       
×