AutoHotkey Community

It is currently May 26th, 2012, 11:42 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: May 26th, 2005, 5:00 am 
Offline

Joined: November 28th, 2004, 11:44 am
Posts: 41
A boolean / variable list support would be excellent for if*.

For eg:

IfWinActive, Opera OR Firefox OR Netscape

or something like

IfInString, var, String1 OR String2 OR String3

would be really useful..


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 26th, 2005, 6:58 pm 
Perfectly agree...


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 26th, 2005, 8:04 pm 
Offline
User avatar

Joined: August 11th, 2004, 1:47 am
Posts: 5347
Location: UK
Things like that can be done already:
Code:
SetTitleMatchMode, 2
If (WinActive("Google", "", "", "") OR WinActive("AutoHotkey", "", "", "") <> 0)
   Msgbox, Window is active

var = orange|apple|water|juice
If var containst apple,juice
   MsgBox, yup

See: If var [not] in/contains value


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 27th, 2005, 12:50 am 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Good answer.

By the way, you don't have to include the empty parameters "", "", "" with WinActive/WinExist (nor any other built-in function that has optional parameters).

For example:
Code:
if (WinActive("Opera") OR WinActive("Firefox"))
   MsgBox Browser is active.

I've clarified this in the help file.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 2 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group