Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

If And



  • Please log in to reply
3 replies to this topic
rosto
  • Members
  • 130 posts
  • Last active: Jan 06 2016 01:50 PM
  • Joined: 14 Feb 2006
I don't know how to create a simple if .. AND ... script in autohotkey.

This is my script

IfWinNotExist, Mozilla Firefox AND WinNotExist, Google Chrome
{
Run, C:\Program Files\Mozilla Firefox 3.5 Preview\firefox.exe
}

However it doesn't work
What can be the problem?

SoLong&Thx4AllTheFish
  • Members
  • 4999 posts
  • Last active:
  • Joined: 27 May 2007
Read:
<!-- m -->http://www.autohotke... ... ession.htm<!-- m -->
and try again

  • Guests
  • Last active:
  • Joined: --
✓  Best Answer
The logic operators (and or) can only be used in if expressions.
if !WinExist("Mozilla Firefox") AND !WinExist("Google Chrome")
  Run, C:\Program Files\Mozilla Firefox 3.5 Preview\firefox.exe

or using the command form:
IfWinNotExist, Mozilla Firefox
  IfWinNotExist, Google Chrome 
   Run, C:\Program Files\Mozilla Firefox 3.5 Preview\firefox.exe


rosto
  • Members
  • 130 posts
  • Last active: Jan 06 2016 01:50 PM
  • Joined: 14 Feb 2006
thank you very much HugoV and guest :)