Author Topic: B2: Can't run macro from build window  (Read 1523 times)

jnairb

  • Senior Community Member
  • Posts: 204
  • Hero Points: 11
B2: Can't run macro from build window
« on: September 08, 2014, 08:13:28 pm »
I have a couple of macro commands that I add to the build window's right-click menu. They search through the build window text and then shell an external command. Neither is working with SE 19 beta 2 and it appears the macros are not even being run. Even the following simple macro, after loading it and adding it to the right-click build window menu, does nothing:
Code: [Select]
_command void view_test() name_info(','VSARG2_CMDLINE|VSARG2_REQUIRES_EDITORCTL)
{
   messageNwait('view test');
}

I never get the messageNwait message and wait. I'm running on Windows 7 x64.

Clark

  • Moderator
  • Senior Community Member
  • *
  • Posts: 4642
  • Hero Points: 371
Re: B2: Can't run macro from build window
« Reply #1 on: September 09, 2014, 12:48:48 pm »
Do the build commands have the "Comand is Slick-C macro" checked?". Otherwise, they will be executed as external programs.

jnairb

  • Senior Community Member
  • Posts: 204
  • Hero Points: 11
Re: B2: Can't run macro from build window
« Reply #2 on: September 09, 2014, 01:53:35 pm »
These aren't macros/commands that I configure through the project properties and attempt to run as build tools.

In the Build tool window itself, if I right click, I get a menu where the last menu selection is Edit This Menu. Selecting that brings you to the Menu Editor for the _process_menu_default menu. I add my Slick-C commands to this menu. After saving, when I right click in the build window again and select my new commands from the menu, nothing happens (other than the menu going away as you'd expect). It doesn't seem to run my commands.

Clark

  • Moderator
  • Senior Community Member
  • *
  • Posts: 4642
  • Hero Points: 371
Re: B2: Can't run macro from build window
« Reply #3 on: September 09, 2014, 02:47:02 pm »
I'm not seeing what your seeing. I added the command "popup-imessage got here" to the Build Window context menu. It runs fine. However, if I right click in the Build tool window (not editor window - I use "Send Compile Output to Editor Window" on), my command is completely removed from the menu.

jnairb

  • Senior Community Member
  • Posts: 204
  • Hero Points: 11
Re: B2: Can't run macro from build window
« Reply #4 on: September 09, 2014, 04:21:30 pm »
How do you add the command "popup-imessage got here" to the build window menu and run it? When I do that, it's not listed on the menu. While experimenting before my original post I noticed that depending on the options in the name_info of the command, my command would sometimes not be shown on the menu after I added it.

Am I doing something wrong, or are we still talking about completely separate things?

jnairb

  • Senior Community Member
  • Posts: 204
  • Hero Points: 11
Re: B2: Can't run macro from build window
« Reply #5 on: September 09, 2014, 07:14:51 pm »
Finally tried this on beta 3 and it's now working OK for me.

Clark

  • Moderator
  • Senior Community Member
  • *
  • Posts: 4642
  • Hero Points: 371
Re: B2: Can't run macro from build window
« Reply #6 on: September 09, 2014, 09:53:55 pm »
How do you add the command "popup-imessage got here" to the build window menu and run it? When I do that, it's not listed on the menu. While experimenting before my original post I noticed that depending on the options in the name_info of the command, my command would sometimes not be shown on the menu after I added it.

Am I doing something wrong, or are we still talking about completely separate things?

This is the bug I found. This will be fixed in the next beta. It seems to delete the menu item before it comes up. With that option I noted, my build window is just another editor buffer with a document tab. If I right click there, the menu item is not deleted.