Reply to topic  [ 3 posts ] 
Find window without attributes 
Author Message

Joined: 2007-04-12 14:59:36
Posts: 229
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)?


2008-08-13 04:41:00
Profile
Official Nisus Person
User avatar

Joined: 2002-07-11 17:14:10
Posts: 4251
Location: San Diego, CA
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:
$plainString = Cast to String ''
Find $plainString, '-uE!'


Quote:
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:
$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 "!".


2008-08-13 10:43:09
Profile WWW

Joined: 2007-04-12 14:59:36
Posts: 229
Thanks for your help. And glad to know that it was not that simple as I had thought it was.


2008-08-13 21:50:13
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot 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:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software