AutoHotkey Community

It is currently May 27th, 2012, 9:22 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: August 14th, 2006, 1:28 pm 
Offline

Joined: May 8th, 2006, 10:24 pm
Posts: 10
Location: QLD Australia
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 14th, 2006, 1:37 pm 
Offline

Joined: January 31st, 2005, 9:50 am
Posts: 3910
Location: Bremen, Germany
Please try
IfInString, window2, Local

_________________
Ciao
toralf
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject: got it, thanks
PostPosted: August 14th, 2006, 10:24 pm 
OK. This line works:

ifinstring, window2, "Local"

Thanks toralf.


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], BrandonHotkey, Google Feedfetcher, Yahoo [Bot] and 66 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