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 

#ifwinactive, %winname%

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



Joined: 06 Nov 2009
Posts: 4

PostPosted: Fri Nov 06, 2009 10:51 pm    Post subject: #ifwinactive, %winname% Reply with quote

Hi everyone, i'm kinda new here , hope you can help me Smile


I need to read from a file to a varabile the use it in #ifwinactive.


Code:

FileReadLine, winname, win.txt, 1

#ifwinactive, %winname%   ; kinda stuck here
...


help Rolling Eyes maybe it's a realy stupid question but I don't know the answer
script doesn't like this and wants to use `% (but i need the var) help please

[Title edited. Please write descriptive titles for your topics. ~jaco0646]
Back to top
View user's profile Send private message
wooly_sammoth



Joined: 12 May 2009
Posts: 634
Location: Gloucester UK

PostPosted: Fri Nov 06, 2009 10:55 pm    Post subject: Reply with quote

unfortunately
Quote:
Variable references such as %Var% are not currently supported. Therefore, percent signs must be escaped via `% to allow future support for them. Similarly, literal commas must be escaped (via `,) to allow additional parameters to be added in the future. If you need to work around this limitation, use GroupAdd and ahk_group.


(taken from the help file for #IfWinActive - General section)
Back to top
View user's profile Send private message Visit poster's website
sinkfaze



Joined: 18 Mar 2008
Posts: 5044
Location: the tunnel(?=light)

PostPosted: Fri Nov 06, 2009 11:00 pm    Post subject: Re: i'm stuck help. Reply with quote

Perhaps you could bypass with GroupAdd?

Code:
FileReadLine, winname, win.txt, 1
GroupAdd, this_one, %winname%
#ifwinactive, ahk_group this_one
...

_________________
Try Quick Search for Autohotkey or see the tutorial for newbies.
Back to top
View user's profile Send private message Send e-mail
biv



Joined: 06 Nov 2009
Posts: 4

PostPosted: Fri Nov 06, 2009 11:02 pm    Post subject: Reply with quote

Thank you i'll try
Back to top
View user's profile Send private message
Display posts from previous:   
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