DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: Mouser - any way to batch/bulk edit LBC menu entries?  (Read 10,724 times)

Lolipop Jones

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 65
Mouser - any way to batch/bulk edit LBC menu entries?
« on: November 20, 2015, 05:40 PM »
Let's say I have a directory containing 80-90 self contained applications, along with an install of LBC set up to access them all.  This is what's on my wife's computer under her E:\ drive.

Now she wants to replicate this functionality on her new laptop which has only a C:\ drive.  As far as I can tell there are three ways to get LBC to replicate the menu:

(1) repartition her laptop to C,D,E which is kind of overkill I think.
(2) set up a folder on C: which maps to E: on startup
(3) manually edit every entry on the LBC menu, changing every E in the program and icon location fields to a C.

Is there a plan (4) - a way to globally edit the menu and change pointer at once using search and replace?  It doesn't appear so.
Today's problems were yesterday's solutions....

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Re: Mouser - any way to batch/bulk edit LBC menu entries?
« Reply #1 on: November 21, 2015, 01:48 AM »
its a great question.

there are a couple of answers:

1. LBC does have a kind of automatic "fix" mode that tries to check for drive letter changes -- but i dont remember which drives it checks.  you might try just copying the lbc to the other drive and chosing Tools ->Maintenance -> Find and report and then choose to fix paths.  see if that works.  if not i can probably make it work easily for your case.  it will only fix same path dif drive letter.

2. I do need to add a feature to let you do a find and replace on paths and captions, i will try to add that very soon.

3. You can also define LBC menu contents to be taken from a text file, at least to a limited degree.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Re: Mouser - any way to batch/bulk edit LBC menu entries?
« Reply #2 on: November 21, 2015, 01:48 AM »
If you can wait a week i can try to add option #2, it's way overdue.

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 11,205
    • Participated in NANY Challenge Fourteen Times
    • Coding Snacks
    • Writer
    • Hardware Hacker
Re: Mouser - any way to batch/bulk edit LBC menu entries?
« Reply #3 on: November 21, 2015, 02:27 AM »
Where are the paths stored, mouser?  I was going to try LBC to see... but since you're on, you can satisfy that curiosity.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Re: Mouser - any way to batch/bulk edit LBC menu entries?
« Reply #4 on: November 21, 2015, 02:30 AM »
they are in the .lbc file which currently uses its own internal binary data file format, so you cant just find and replace in it.
it would be nice to move to an xml format.

Lolipop Jones

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 65
Re: Mouser - any way to batch/bulk edit LBC menu entries?
« Reply #5 on: November 21, 2015, 03:51 AM »
We can wait a week (or two) - thanks!!
Today's problems were yesterday's solutions....

Lolipop Jones

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 65
Re: Mouser - any way to batch/bulk edit LBC menu entries?
« Reply #6 on: November 21, 2015, 03:52 PM »
"it would be nice to move to an xml format.."

Now that would be an awesome update.  I understand that it's very non-trivial though.
Today's problems were yesterday's solutions....

poyan

  • Supporting Member
  • Joined in 2010
  • **
  • Posts: 30
Re: Mouser - any way to batch/bulk edit LBC menu entries?
« Reply #7 on: December 02, 2015, 03:43 AM »
That would be veeeeeery useful...

"paths and captions"
would be great to also get other options: arguments in command nodes would be important...
« Last Edit: December 02, 2015, 03:50 AM by poyan »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Re: Mouser - any way to batch/bulk edit LBC menu entries?
« Reply #8 on: December 06, 2015, 01:42 AM »
Please try the latest beta version v1.46.01 that I've just uploaded.
The new Search and Replace function is on the Tools menu.

Please backup your files FIRST!!!
This function could easily mess up lots of paths if it malfunctions or you do something stupid :)

Lolipop Jones

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 65
Re: Mouser - any way to batch/bulk edit LBC menu entries?
« Reply #9 on: December 09, 2015, 04:43 PM »
I tested three find-replace sequences using the portable version of the beta.

(1) copy all references from E:\ to C:\
(2) copy all references from E:\ to %APPDRIVE%
(3) copy those all from %APPDRIVE% to D:\

The program file locations were replaced and as far as I can tell are all working OK.

The icon locations as they appear in the preferences screen seem not to have been replaced..

Interestingly, that seems to make no difference.  Icons still seem to show up correctly in the launchbar and in the taskbar flyout even though their pointers no longer exist, including both those icons which are part of an executable and those which are referenced as .ico files .

Thanks Mouser.......
Today's problems were yesterday's solutions....

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Re: Mouser - any way to batch/bulk edit LBC menu entries?
« Reply #10 on: December 09, 2015, 04:47 PM »
Thanks for testing!

It should be replacing icon paths, so i'll fix that (just uploaded new beta version where it should be fixed).

[But as you've discovered those are only to assist you in editing in the future -- icon data is internally stored at the time of setting it and the icon files need not exist after that.]
« Last Edit: December 09, 2015, 05:49 PM by mouser »

Original address: https://www.donationcoder.com/forum/index.php?topic=41927.0