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 

& not allowed in string search - ifinstring

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



Joined: 08 May 2006
Posts: 10
Location: QLD Australia

PostPosted: Mon Aug 14, 2006 12:28 pm    Post subject: & not allowed in string search - ifinstring Reply with quote

Hi,

Is it possible to get the "&" symbol to be accepted by the search ifinstring.

ifEqual would also work. The string is "&Local" and I just want to verify that some or all of the string is there to verify that a window is active (that has the same title as all the other windows in the printer wizard).

The error is below:


Error: This variable or function name contains an illegal character. The current thread will exit.

Specifically: &Local

Line#
030: }
031: Else
032: {
033: Send,{enter}
034: WinWaitActive,Add Printer Wizard
035: WinGetText,local_printer
036: StringLeft,window2,local_printer,6
---> 037: IfInString,%window2%,"Local"
038: {
039: MsgBox,The script has not found window (2) in the printer wizard
040: }
041: Else
042: {
043: Send,!l
044: PixelGetColor,window2_untick_auto_detect,70,153

Any other advice on how to tidy up the script would also be nice,

Thanks,

Staid.
Back to top
View user's profile Send private message
toralf



Joined: 31 Jan 2005
Posts: 3910
Location: Bremen, Germany

PostPosted: Mon Aug 14, 2006 12:37 pm    Post subject: Reply with quote

Please try
IfInString, window2, Local
_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
staid1
Guest





PostPosted: Mon Aug 14, 2006 9:24 pm    Post subject: got it, thanks Reply with quote

OK. This line works:

ifinstring, window2, "Local"

Thanks toralf.
Back to top
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