Shop OBEX P1 Docs P2 Docs Learn Events
Possible to add OLE to Prop Tool? — Parallax Forums

Possible to add OLE to Prop Tool?

RaymanRayman Posts: 14,848
edited 2012-01-27 11:37 in Propeller 1
I've looked into devoloping my own Prop code editor, but it's a daunting task...

What I would love is to be able to invoke the Prop Tool from within my program and have it show a "Update and Return" option on the file menu...

Is this possible? I think it would require some OLE magic...

Comments

  • CircuitsoftCircuitsoft Posts: 1,166
    edited 2012-01-26 15:26
    Can Propellant not do all that you need?
  • RaymanRayman Posts: 14,848
    edited 2012-01-26 15:37
    Propellant can compile and load, but it can't edit code...
  • Heater.Heater. Posts: 21,230
    edited 2012-01-26 19:03
    Have you not heard, the Prop Tool is dead?
    You can probably do what you want with the PZST Spin tool.
  • RaymanRayman Posts: 14,848
    edited 2012-01-27 06:28
    PZST looks pretty good. I don't see the "Block Group Indicators", like the Prop tool though.
    I think those are really necessary for editing SPIN code...
  • Heater.Heater. Posts: 21,230
    edited 2012-01-27 06:49
    But it does have visible tabs (when enabled in preferences). As shown below:

    pzst.png
    315 x 254 - 8K
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-01-27 07:28
    You don't need OLE to accomplish your objectives, although I don't think you can add functionality to the menu without it. In Windows, a program's window contents and locations are available through system calls. One trick I've found that works is for my host program to start the Prop Tool and create a small window consisting of one button that hovers over the Prop Tool when its window is active. It looks like the button is part of the Prop Tool, but button clicks report back to the host program, which can force the Prop Tool to load/save programs, etc., by simulating user actions via its menu. The effect is pretty convincing; but, if you look closely, you can see the button disappear when the Prop Tool's window is inactive or struggle to maintain position when the window is moved around a lot.

    -Phil
  • RaymanRayman Posts: 14,848
    edited 2012-01-27 09:40
    Phil, That doesn't sound too bad, that's a hair better than the way I do it now.

    Still, I would prefer an "Update and Return" option...

    Actually, what I'd really like is a .dll I could call to pop up an edit window, but I imagine that's a lot more work...

    I think I could code up my own Spin editor, but with the background colors and the indent lines, it seems like too much work...
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-01-27 10:00
    I guess what I'm suggesting is that the button could trigger the "update and return" function from your host program by sending the Ctrl-S and Alt-F X key sequences to the Prop Tool. That would save the file and exit.

    -Phil
  • StefanL38StefanL38 Posts: 2,292
    edited 2012-01-27 11:37
    maybe http://www.autohotkey.com/ can do this.

    It is a scripting language that can be application sensitive. Sending Keystrove mouse moving and clicks etc.
    A longer time ago I coded a context sensitive call of the propeller-manual. If you pressed a hotkey inside the propeller-tool
    it opened the PDF and jumped to the page where the keyword is explained.

    keep the questions coming
    best regards
    Stefan
Sign In or Register to comment.