Menu

Script doesn't work after added in menu bar.

2020-12-07
2020-12-10
  • Pang Wei San

    Pang Wei San - 2020-12-07

    Hi,
    I have a script that works fine when added to nodes via the Tools->Script Editor method. Following the method to add script into FM menu bar, explained by Foltin in "How to install a script as a menu item", while I did see the menu added, but the script didn't generate the expected result. In fact, how do I even know if the script has been run ?

    -----------------------------------------------------------
    Once, you've created or found some interesting scripts, you probably want to get a FreeMind menu item with an own shortcut to execute the script.
    

    To do this, save the script to a file and edit "ScriptingEngine.xml" inside the FreeMind script directory inside your installation.

    You'll find a template for a script action that is commented out (ie. surrounded by ). Uncomment the template and fill out the following bold places:

    -----------------------------------------------------------
    

    By "save the script to a file", does that mean save the file as a groovy file, or what file ?

     

    Last edit: Pang Wei San 2020-12-07
  • Christian Foltin

    Hi, yes, save it as myfile.groovy or the like and set the ScriptLocation accordingly. HTH, Chris

     
  • Pang Wei San

    Pang Wei San - 2020-12-08

    Hi Christian,

    While doing further testing on getting my script to the menu bar (the script basically selects the root node and changes all its children node text color to blue), it seemed the Tools -> Script Editor menu was missing, weird.

    What's the reason this is happening ?

     
  • Pang Wei San

    Pang Wei San - 2020-12-08
    Post awaiting moderation.
  • Christian Foltin

    hi, can you supply the log file, please? BR, Chris

     
  • Pang Wei San

    Pang Wei San - 2020-12-08

    Hi Christian,

    Yes, attached are the log files.

     
  • Christian Foltin

    OK, found it. You have to use double backslash in the path:
    C:\My Any\Me\...

    HTH, Chris

     
  • Pang Wei San

    Pang Wei San - 2020-12-09

    Hi Chris,

    Thanks ! It's working now. I could add the script to menu bar as well as running it and generating the expected outcome.

    I have one question, the pop-up note box doesn't seem to be scrollable, my script populates each node with software documentation info into the note box, but some of the info cannot not be viewed as it overflows the note box and the note box is not scrollable. How to make the note box scrollable ?

    Attached is a screen shot.

    rgds
    Pang

     
  • Christian Foltin

    Hi,

    isn't the long note editor better suited for long text attached to a node?

    HTH, Chris

     
  • Pang Wei San

    Pang Wei San - 2020-12-10

    Hi Chris,

    Are you refering to the "long Node" or "long Note" editor ?
    If it's the note editor at the bottom half of the window, Yes, I think that also does the job. Previously I had seen problems where the pop up note window displayed the correct content, but the note editor didn't, I don't know why that happened, that's why I tried not to use the note editor to see what I inserted through the script, but it seems doing OK now.

    Thanks for your prompt response, you have been very helpful.

    rgds
    Pang

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.