Question

I created five macros which step by step effectively fulfill my research needs. I would like to join those macros in one effective plugin. All paths lead to java programming. But I was wondering, if there is a way, I could create “User interface” like that:

enter image description here

By clicking a button, macro would run. I would specify one or two variables (Insert year of the last ring…).

Was it helpful?

Solution

You can do it using the Dialog.* macro functions. See the DialogDemo macro for an example.

OTHER TIPS

Dialog.create("Program");
Dialog.addChoice("Type:", newArray("A", "B","C"));
Dialog.show();
type = Dialog.getChoice();

if (type=="A"){
    runMacro("A");
} else {
    if(type=="B"){
        runMacro("B");
    } else {
        if (type=="C"){
        runMacro("C")
            }
        }
    }

////to start from the beginning
runMacro("Program")

So, as you can see, my little program is very straightforward. By choosing action, specific macro runs.

In my "macro A", specific variables have to be defined; such as: which year a tree was cut down

p = getNumber("The year of outmost ring?", 2020)

I would like to define those variables, BEFORE I choose action (using Dialog). It is just more userfriendly…

And I agree about Java programming; if I will want to seriously get in touch with some less-limited-software creating options…

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top