Without parameter this whole idea is not useful for me Can you suggest any other better idea to run a macro from other programs (C# / Java) by parameter passing (headless) so that we can use this for automated analysis?
In my case a very simple macro with parameter (#@ String name as example) does not run using run macro. I get error that statement cannot start with #. Can someone help? I need to run ImageJ macro called from other java, .net based applications where I can achieve multithreading. But parameter passing is not working at all. If I edit the macro in editor and run it then it runs well. Seems to be a bug.
Strangest part is when I use Plugin->Edit Macro->Run option the same macro runs well without any issue and provides desired output. But if I just use Run Macro or use the same code in clipboard in debugger it does not work!
Surely I will keep an eye. But why the basic parameter passing isn’t working? I really need some clue on it. What am I doing wrong here? Can someone please help?
The issue is about passing parameters to a macro and executing it…
My issue has been resolved. Indeed it is working, not from debugger/clipboard but when I run all macros with parameters are working. The root cause of my issue was I had space in macro file name (something with space.ijm). Surprisingly in ImageJ if you pass parameters with spaces in a string it does not work. Have you also noticed this issue? The moment I changed the file name and replaced space with underscore everything went fine