--- In [email protected], "jroncalm" <jroncal2...@...> wrote: > > --- In [email protected], "Sheri" <sherip99@> wrote: > > > > If you can move the files to right places, you can make a script to rewrite > > the note header on each file. > > > > If you want to open each note and reassign it, you can use a script > > (assigned to a hotkey) to set the category of the active note to a category > > selected from a menu. When you close the note it will go to the right place. > > > > This should work to do that: > > > > local h=win.handle("active") > > if (win.class(h)!=="powerpronote") > > quit > > static cats="" > > file.allfiles(ppronotesfolder, ;;+ > > ?Xstatic cats=cats++remove(_file_, ;;+ > > length(ppronotesfolder))++"\r\n"X, 5, 1) > > cats=regex.pcrereplace(?"(?mi)^(Date|Open).+\R", cats,"") > > local v=vec.createFromLines(cats) > > local i=v.showmenu() > > if(i==-1) > > quit > > local selected=v[i] > > note.setcategory(h,selected) > > quit > > > > Regards, > > Sheri > > > > Excellent ! > Thank you Sheri. You are a master. >
Great, glad that's working. Eventually I'll work it into Notemenu, so you won't have to do it by hotkey. I did spot a small error. The plus sign on this line: > cats=regex.pcrereplace(?"(?mi)^(Date|Open).+\R", cats,"") should be an asterisk. With that change, "Open" and "Date" will not appear on the category menu. Regards, Sheri
