AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

use variable in #IfWinActive wintitle

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
rogal



Joined: 23 Dec 2007
Posts: 51
Location: Austin

PostPosted: Sun Apr 27, 2008 8:47 pm    Post subject: use variable in #IfWinActive wintitle Reply with quote

Hi there.

Is there any way to use variable as wintitle in #IfWinActive?

when I tried #IfWinActive, %variable%

ahk says

Code:
---------------------------
LaTeX_dock.ahk
---------------------------
Error at line 4 in #include file "Hotstrings.ahk".

Line Text: #IfWinActive, ahk_class %Host_Window_ahk%
Error: Literal commas and percent signs must be escaped (e.g. `%)

The program will exit.


Do I have to use literal string only?
Back to top
View user's profile Send private message
SKAN



Joined: 26 Dec 2005
Posts: 6264

PostPosted: Sun Apr 27, 2008 9:10 pm    Post subject: Re: use variable in #IfWinActive wintitle Reply with quote

rogal wrote:
Do I have to use literal string only?


As on date: Yes!
Back to top
View user's profile Send private message
Oberon



Joined: 18 Feb 2008
Posts: 453

PostPosted: Sun Apr 27, 2008 9:24 pm    Post subject: Reply with quote

You can make the window criteria dynamic by using ahk_groups as explained in the documentation.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group