EmEditor (text editor) Forum Index Questions and Answers about Macros
Is it a bug ? ExecuteCommandByID have no effect for "Select this macro" and "Run macro" command. | Register To Post |
| Threaded | Oldest First | Previous Topic | Next Topic | Bottom |
| Poster | Thread |
|---|---|
| hihihlo | Posted on: 6/17/2011 7:02 pm |
Just popping in ![]() ![]() Joined: 6/9/2011 From: Posts: 11 |
Re: Is it a bug ? ExecuteCommandByID have no effect for "Select this macro" and "Run macro" command. in last post question has below line :
====> var sFn = "c:\\tmpee.jsee"; In fact, the contents of "tmpee.jsee" is like below : ====> #include "aa.jsee" just one line !! It is generation dynamic, decide by user input via popup menu. maybe I can use shell.SendKeys() to run another macro (tmpee.jsee) from within my macro. Thanks your reply very much. |
| Yutaka | Posted on: 6/17/2011 8:12 am |
Webmaster ![]() ![]() Joined: 9/28/2006 From: Redmond Posts: 2423 |
Re: Is it a bug ? ExecuteCommandByID have no effect for "Select this macro" and "Run macro" command. Hi hihihlo,
You can't run another macro from within a macro. That's why ExecuteCommandByID has no effect for "Select this macro" or "Run macro" command. You might want to use #include to call another macro routines. Thanks!
|
| hihihlo | Posted on: 6/17/2011 2:01 am |
Just popping in ![]() ![]() Joined: 6/9/2011 From: Posts: 11 |
Is it a bug ? ExecuteCommandByID have no effect for "Select this macro" and "Run macro" command. I found two ExecuteCommandByID have no effect,
for example below snip macro : var sFn = "c:\\tmpee.jsee"; editor.OpenFile(sFn, 0, eeOpenAllowNewWindow | eeOpenDetectUnicode); //success editor.ExecuteCommandByID(4349); //"Select This Macro" command -----> nothing happen !!! document.close(); editor.ExecuteCommandByID(4217); //"Run Macro" command -----> nothing happen !!! PS, Why I need above two command : I wrote a macro which can popup menu to show user macros within any custom folder (include subfolders), so I can put macros into arbitrary deep subfolders. This is useful for who have a lot of macros, and want to organize them hierarchical. thanks ! |
| Threaded | Oldest First | Previous Topic | Next Topic | Top |
| Register To Post | |




