cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

Executing one option from the menu bar since my ACL script

pzorrilla
1-Newbie

Executing one option from the menu bar since my ACL script

Hello everyone.. experts and enthusiasts,

Ok, so I'm creating a new menu and adding a new functionality in my Arbortext Editor, however, before I execute my tasks, some other stuff needs to be executed, specifically one other task, which belongs to another option provided in a different menu, what I'm trying to do is, to call that specific option since my acl script; does anybody knows if there is a way to achieve this? There's an available acl command to have access to the other feature? the reason why I'm not calling directly another script is because I don't have control of the other functionality, it was made by another team and I don't have direct access to their code or scripts.

As always I appreciate so much your time and support.

Paulette Zorrilla

1 ACCEPTED SOLUTION

Accepted Solutions

Hi Paulette,

I'm not sure that I understand the question.

You have to execute the code from another menu option as a prerequisite to your menu option. Is this correct?

I would think that you could just call the function that the other menu option executes from within your code at the point where you need it.

You also said that you don't have access to the other code. ACL is not encrypted so it should all be within the same custom folder structure or configured on the same machine as your code for the menu options to appear. You are going to have to be able to access the other code to know what function is being called and how to properly execute it.

Hope that helps!

View solution in original post

5 REPLIES 5

Hi Paulette,

I'm not sure that I understand the question.

You have to execute the code from another menu option as a prerequisite to your menu option. Is this correct?

I would think that you could just call the function that the other menu option executes from within your code at the point where you need it.

You also said that you don't have access to the other code. ACL is not encrypted so it should all be within the same custom folder structure or configured on the same machine as your code for the menu options to appear. You are going to have to be able to access the other code to know what function is being called and how to properly execute it.

Hope that helps!

Jeff,

Thank you so much for your response; yep, at the end I had to navigate through the scripts inside custom folder and find what function is being called and how is being called. I was wondering if ACL could have any command to achieve this without "surfing" the code, I don't know, maybe a way for recognice the structure of the menu bar and access their options. As you said it, ACL is not encrypted so my solution required a little bit of time, patience and a cup of coffee

Again, thank you so much for your help.

Paulette

Sorry, I forgot to add something,

With this solution I depend on the code of the other tool I'm using, so even when I solved my issue I should take care of monitoring possible changes the other team could make to its code since this will affect me directly in case they would decide to change the function's name, location, etc.

I'm adding this comment just in case anybody could think is a useful note

So true, Paulette! Change management can be a bear!

Hi Paulette--

For future reference, you can find out the command bound to a menu item with the "menu_cmd" function. Pass it a menu path string and it will tell you what command gets executed when you select that menu item. For example, if you type this on the command line:

response(menu_cmd("File.Print"))

a popup will show that this menu item executes the "FilePrint" command.

Note that this is actually a command alias, as most menu commands are. You can see how they trace back to actual code using the "show aliases" command, which shows you the aliases currently defined, and what they are aliased to. In this case, FilePrint is defined as

FilePrint       {

  if (doc_formattable()) {

    FilePrintComposed;

  } else {

    FilePrintEditor;

  }

}

Hope that helps.

--Clay

Top Tags