Page 1 of 1
Find window without attributes
Posted: 2008-08-13 04:41:00
by js
Is there any Macro with which to get a clean Find Window. F.e. if I enter colored text „Use selection for Find“, and then want to do a new search without attributes, I had hoped that applying a macro like this would do:
Find and Replace '', '', '-uE!'
But I find that starting to typ my find text, Apple is still using the earlier color and setting the Find window to „Attribute Sensitive“, which I have then to unclick manually.
A related question: Is it possible by means of a macro, to put the „Attribute sensitive“ button of (but keeping the find text already entered)?
Re: Find window without attributes
Posted: 2008-08-13 10:43:09
by martin
js wrote:Is there any Macro with which to get a clean Find Window. F.e. if I enter colored text „Use selection for Find“, and then want to do a new search without attributes, I had hoped that applying a macro like this would do:
Find and Replace '', '', '-uE!'
But I find that starting to typ my find text, Apple is still using the earlier color and setting the Find window to „Attribute Sensitive“, which I have then to unclick manually.
You'll want to set a plain string in the find window, without any attributes, which can be done like so:
Code: Select all
$plainString = Cast to String ''
Find $plainString, '-uE!'
A related question: Is it possible by means of a macro, to put the „Attribute sensitive“ button of (but keeping the find text already entered)?
This is possible, but a little trickier than you would think, here's how:
Code: Select all
$expression = Read Find Expression
Find $expression, '*-u!'
The above code should preserve every setting in the Find window except the "attribute sensitive" option, which is cleared. This works because the macro "*" option says to use the find window settings. These are then modified by "-u" to remove attribute sensitivity, and finally set back in the find window using "!".
Re: Find window without attributes
Posted: 2008-08-13 21:50:13
by js
Thanks for your help. And glad to know that it was not that simple as I had thought it was.