Author Topic: External app icon or shortcut  (Read 3490 times)

bremenpl

  • Community Member
  • Posts: 90
  • Hero Points: 0
  • Electrical Engineer
External app icon or shortcut
« on: June 28, 2013, 08:31:18 PM »
Hello there,
Im using slickedit for building an external arm mcu. I also debug in slickedit, but i somwtimes just want to program the mcu without the debug process.
So i do it via jlink commander (i use jlink for programming). I wrote a script for that and all i have to do is open a shortcut ob my desktop.
My question is:
Is there any way to embed an exterball aplication like my script in slick edit?
Ie an icon on the top or a keybind?
Maybe i could somehow add it at the end of build routine?

Any help would be aprichiated.

Bremenpl


hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: External app icon or shortcut
« Reply #1 on: June 29, 2013, 11:15:42 AM »
This is possible. This is just one example how this can be done. I'm sure there more postings to find in the forums.
In addition you can add customized build commands w/o writing any macro code (see Project Properties).
Good luck, HS2

bremenpl

  • Community Member
  • Posts: 90
  • Hero Points: 0
  • Electrical Engineer
Re: External app icon or shortcut
« Reply #2 on: June 29, 2013, 01:33:49 PM »
Thank you for help. I Did as in your example, but my macro simply does not work.

Heres its code:
Code: [Select]
#include "slick.sh"
_command at91_load() name_info(','VSARG2_MACRO|VSARG2_MARK|VSARG2_REQUIRES_MDI_EDITORCTL)
{
shell("cmd.exe /C "JLink.exe a:\Dropbox\programowanie\slickedit\samm\loadscript.txt"");
}

When i try to run it, nothing happens. I tried running just shell("cmd.exe"); but havent worked as well. Am i doing something wrong?

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: External app icon or shortcut
« Reply #3 on: June 29, 2013, 02:19:08 PM »
You need to load i.e. compile a macro module (Macro > Load Module) before you can use it or run contained commands.
Also your macro wasn't fully correct (you'd get an error on loading it).
This should fix it:
Code: [Select]
shell("cmd.exe /C JLink.exe a:\\Dropbox\\programowanie\\slickedit\\samm\\loadscript.txt", "AP");The optional "AP" argument is just an example and depends on your needs. See the documentation of 'shell'.
(Also the path to 'JLink.exe' should be set in the PATH environment variable or you need to specify the full path.)
However, rather simple commands like this can be easily added as custom 'Build' command to your project without writing any macro code.
HS2
« Last Edit: June 29, 2013, 02:22:25 PM by hs2 »

bremenpl

  • Community Member
  • Posts: 90
  • Hero Points: 0
  • Electrical Engineer
Re: External app icon or shortcut
« Reply #4 on: June 29, 2013, 02:20:53 PM »
I was just not fast enough to answer that i got it working, i found the command line in clickedit and typed load for compiling the macro.

Now it looks like this and works, thank you :)!~
Code: [Select]
#include "slick.sh"
_command at91load() name_info(','VSARG2_MACRO|VSARG2_MARK|VSARG2_REQUIRES_MDI_EDITORCTL)
{
shell("JLink.exe a:\\Dropbox\\programowanie\\slickedit\\samm\\loadscript.txt");
}

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: External app icon or shortcut
« Reply #5 on: June 29, 2013, 02:23:29 PM »
Great :) Have fun, HS2