23874RE: [Clip] Help with variables
- Jun 10, 2013I can't use a wizard, there are literally hundreds of places these variables are used. All I'm trying to do is get the intelligence
into the variable, so I don't have to type it into each use. I want to just use the variable, without having to type a bunch of
qualifiers around them each time they are used. When my tool runs, there are no wizards popping up or other info type dialogs. It
just runs to completion.
It's bad enough that I have to go through my whole 1.5M library and replace all my current variable usages with the new variable
names and without the qualifiers�there are sometimes three variables used in one clip. Originally, I didn't even use variables, and
had to remember to type in each group using alternation. Then I got half-way smart and switched to variables. Now, I want smart
variables, again cutting down on typing.
Here is one current line: Don't worry about what it does, it just shows usage of variables.
^!Replace "([\d\.~]+[- ])(^%MetricUnits%) \(?([\d\.~]+[- ])(^%SUnits%)(s)?\b\)?" >> "$3$4$5 ($1$2)" ARSW
With the new variable usage, it will be:
^!Replace "([\d\.~]+[- ])(^%MetricUnits%) \(?([\d\.~]+[- ])(^%Units%)\)?" >> "$3$4 ($1$2)" ARSW
It might not look like a lot of improvement, but multiply it by hundreds of times, and it becomes more significant. Not having to
remember the 's' and the '\b' makes it much easier to write and understand, too.
Road kill�.funny. But I do handle pet food recipes� J
RecipeTools Web Site: <http://recipetools.gotdns.com/> http://recipetools.gotdns.com/
John's Mags Yahoo Group: <http://groups.yahoo.com/group/johnsmags/> http://groups.yahoo.com/group/johnsmags/
From: email@example.com [mailto:firstname.lastname@example.org] On Behalf Of Eb
Sent: Monday, June 10, 2013 15:18
Subject: Re: [Clip] Help with variables
If you use a wizard to establish quantity, you could simply set a variable to contain nothing (single), an s (multiple), or 's?':
;inside the loop:
^!Replace "(^%animal%^%Q%\b)" >> "*$1*" RWAIS
I don't know if the wizard will handle the '?' properly.
By the way, "cat|rat|dog" ?! Are you working on recipies for roadkill <grin>?
--- In email@example.com <mailto:ntb-clips%40yahoogroups.com> , "John Shotsky" <jshotsky@...> wrote:
> Thanks for the ideas but�
[Non-text portions of this message have been removed]
- << Previous post in topic Next post in topic >>