Thank you Mark, I will give that a try.
Dave

On Feb 15, 3:52 pm, "Mark S." <[email protected]> wrote:
> Maybe something like:
>
>  for (var i=cntStart; i<max; ++i) {
>   var en = store.tiddlerExists("Note$1$2:"+i)?"N":"n" ;
>   out += "|border-width:0px;++...@["+en+"] [[(go)|Note$1$2:"+ i + "]]
>  <<tiddler [[Note$1$2:" + i +"]]>>===|border-width:0px;<<tiddler $1##
>  $2." + i +">>|\n"
>
>  }
>
> On Feb 15, 1:05 pm, Dave Parker <[email protected]> wrote:
>
> > Hi,  I have this part of a script that makes a table:
>
> > for (var i=cntStart; i<max; ++i) {
> >  out += "|border-width:0px;++...@[n] [[(go)|Note$1$2:"+ i + "]]
> > <<tiddler [[Note$1$2:" + i +"]]>>===|border-width:0px;<<tiddler $1##
> > $2." + i +">>|\n"
>
> > }
>
> > and I want to change the [n] to [N] (or maybe [''n'']) if the tiddler
> > the script refers to exists.
>
> > How would one do such a check?
>
> > the only thing I could find that might help is the "NewMeansNewPlugin"
> > that has this in it:
>
> > String.prototype.getNextFreeName = function() {
> >        var numberRegExp = / \(([0-9]+)\)$/;
> >        var match = numberRegExp.exec(this);
> >        if (match) {
> >                var num = parseInt(match[1]) + 1;
> >                return this.replace(numberRegExp," ("+num+")");
> >        }
> >        else {
> >                return this + " (1)";
> >        }
>
> > }
>
> > ...but I suspect this might not help because it appears to be
> > comparing the existing tiddler with the current (thus the use of
> > "this" ???) and my use would not be referring to the tiddler with the
> > script at all.  (To summarize, I really don't know what I'm doing -
> > help!)
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en.

Reply via email to