 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
staid
Joined: 08 May 2006 Posts: 10 Location: QLD Australia
|
Posted: Mon Aug 14, 2006 12:28 pm Post subject: & not allowed in string search - ifinstring |
|
|
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 |
|
 |
toralf
Joined: 31 Jan 2005 Posts: 3910 Location: Bremen, Germany
|
Posted: Mon Aug 14, 2006 12:37 pm Post subject: |
|
|
Please try
IfInString, window2, Local _________________ Ciao
toralf  |
|
| Back to top |
|
 |
staid1 Guest
|
Posted: Mon Aug 14, 2006 9:24 pm Post subject: got it, thanks |
|
|
OK. This line works:
ifinstring, window2, "Local"
Thanks toralf. |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|