Author Topic: Control SlickEdit from external application (specifically for opening file/line)  (Read 2763 times)

Bock

  • Community Member
  • Posts: 16
  • Hero Points: 0
Hello,

Using SlickEdit 12.0.3 under Windows XP.

I'd like our external application to be able to open a buffer in a SlickEdit instance and position the cursor on a given line. I am not sure where to start looking for this kind of thing, and if it is even supported.
Basically the scenario is that our application report runtime error of a custom programming language we use, and we'd like to jump the programmer to the faulty code immediately. It is assumed that an instance of SlickEdit is already running.

Do you have any suggestions, pointers, keywords to search documentation about?

Thank you greatly.
Omar

Bock

  • Community Member
  • Posts: 16
  • Hero Points: 0
Obviously, there is that de-facto internet forum rules that as soon as you post a question you manage to finally find the answer five minutes later...

So, there is that:
http://community.slickedit.com/index.php?topic=2286

Which sounds like it is enough for me for now provided it's fast enough.
Thanks :)

Graeme

  • Senior Community Member
  • Posts: 1928
  • Hero Points: 222
In the slickedit help file, look for "invocation options" in the help index and you'll see this as the description of the -# invocation option

Quote
Execute command on active buffer. For example, vs test.c -#bottom-of-buffer places the cursor at the end of test.c. Use double quotes if the command has spaces (vs test.c "-#goto-col 50").

Graeme

ScottW, VP of Dev

  • Senior Community Member
  • Posts: 1471
  • Hero Points: 64
Hi Bock. Please take this as a request for information and not an implied criticism. Did you try the help system before posting? If so, did you try the search or look through the table of contents?

One of my jobs is to make sure that the documentation provides the information users need in a way that they can find it. I'm trying to determine if the documentation could be improved to help you locate this kind of information.

Bock

  • Community Member
  • Posts: 16
  • Hero Points: 0
Scott,
I did not. The reason is that at the time I could not think of a keyword or a point to start searching. In fact if you look at the option description Graeme posted above, there is no trivially searchable keyword there. I was more thinking in heavy term of an API to communicate with the process which made me ignore the glaring obvious possibility that through a command-line SlickEdit could handle that itself.

Now I just tested the imaginary case if I had thought about using command-line parameters, and looking for "command-line" in the Help file doesn't help because it clashes with the "command line" in SlickEdit. I would not have thought of the word "invocation" and I am not sure how I would have found it (again it is a vocabulary problem). The section is in "Appendix -> Invocation Options".

jimlangrunner

  • Senior Community Member
  • Posts: 350
  • Hero Points: 29
  • Jim Lang - always a student.
Let me reinforce that.  Invoke is not what I search for when I want to launch slick from a command line.  I look for "command line" and find the wrong thing.  The trouble is that "command line" is the right thing for me to search for. 

Perhaps, like Wikipedia, the help file could include links to the correct section at the start of a section that is easily confused?

Jim.

ScottW, VP of Dev

  • Senior Community Member
  • Posts: 1471
  • Hero Points: 64
Thanks for the feedback. Yeah, this is a tough one to search for. There are just too many hits around 'command line' and other words related to putting the cursor on a line.

I pulled the Invocation Options into the section on Running SlickEdit. I'll put a cross link in the "SlickEdit Command Line" section, as you have suggested.

Graeme

  • Senior Community Member
  • Posts: 1928
  • Hero Points: 222
Maybe you could add a "did you know" section to the help and the help menu, and add all the stuff that Lisa posted.

I thought Bock did well to find the forum thread he listed.  It's a bit of a leap to even think of searching for "command line", especially when you're trying to get an already running instance of slickedit to do something from another application.  If you add a proper help item for this, hopefully it can explain how to pass multiple parameters into slickedit and how to parse them.

It would also be good to add the stuff about creating toolbar buttons etc that Clark posted here
http://community.slickedit.com/index.php?topic=463.msg1882#msg1882
to a did you know section.  You could even add categories/sub-sections to the did you know section, since there's probably lots of things that fit into this category  - e.g. the F7,F8 keys in the find dialog, right click in the find dialog, F1 in any dialog.

Since searching .chm files kind of sucks (IMO - e.g. try searching for s-expression), maybe the slick help menu could also have a sub-menu that allows you to open some of the pdf help docs.

BTW - the link to "slickedit" on the slick website FAQ page doesn't work.
http://www.slickedit.com/index.php?option=com_quickfaq&lang=en&view=quickfaq

Graeme

Edit - ok, putting quotes around s-expression works but who would think of that.  Anyway, I still dislike chm help.


« Last Edit: December 18, 2009, 09:57:25 pm by Graeme »