1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Message pumping question

Discussion in 'Plugins' started by vefatica, Jul 31, 2008.

  1. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,785
    Likes Received:
    29
    I have a plugin command which creates a modal dialog box (TCC doesn't return to the prompt). It's mostly idle but occasionally will write to the console with Printf(), run a batch file with Command(), or do a CLS.

    When a batch file is running mouse works fine. I can click on an "Abort" button, the plugin generates a CTRL_C_EVENT, the batch file is cancelled, and the dialog returns to its idle state. Under the same conditions, I can <Tab> to the "Abort" button (at a low level, TCC never sees it) but once there, <Enter> won't work. This is regardless of whether the dialog box was started in TCC's main thread or in a separate thread created by the plugin command. Rex, in this second case, do you know why the button control, apparently with focus, doesn't get the <Enter>?
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,730
    Likes Received:
    80
    vefatica wrote:

    There seem to be some critical words missing from your question (you can
    *what* to the abort button; and the button control doesn't get what?).

    TCC, like every console app, has no access to or control over the
    Windows message queue (thanks, Microsoft!). You can call the
    tty_yield() function if you're in a loop and want to give other
    processes a chance to do something.

    Rex Conn
    JP Software
     
  3. logic

    Joined:
    May 30, 2008
    Messages:
    42
    Likes Received:
    0
    From: rconn
    Sent: Thursday, July 31, 2008 8:49 AM
    Subject: RE: [Plugins-t-363] Message pumping question

    Ha ha! You just got downloaded by the forum system.

    Rex, Vincent's words were in angle brackets. He can Tab to the abort button
    but Enter doesn't work. Put less-than and greater-than around them and
    something, somewhere things they're rogue HTML tags and strips them out.

    Jonathan Gilbert
     
  4. thomasl

    Joined:
    Jun 10, 2008
    Messages:
    35
    Likes Received:
    0
    rconn <> wrote:

    This is not wrong but also not entirely correct. While a console app has
    no *direct* access to its underlying message queue, it can subclass
    other windows... including its own main window.

    And given that many messages are sent and not posted, in many cases
    subclassing may be the better strategy anyway.

    --
    cheers thomasl

    web: http://thomaslauer.com/start
     
  5. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,523
    Likes Received:
    4
    logic wrote:
    | From: rconn
    | Sent: Thursday, July 31, 2008 8:49 AM
    | Subject: RE: [Plugins-t-363] Message pumping question
    |
    |
    | ---Quote---
    ||
    || There seem to be some critical words missing from your question (you
    || can *what* to the abort button; and the button control doesn't get
    || what?).
    | ---End Quote---
    | Ha ha! You just got downloaded by the forum system.
    |
    | Rex, Vincent's words were in angle brackets. He can Tab to the abort
    | button but Enter doesn't work. Put less-than and greater-than around
    | them and something, somewhere things they're rogue HTML tags and
    | strips them out.

    I read Vince's post via Outlook Express, as email, and the angle-bracketed
    text was present, both when viewed as plain text and when viewed as HTML. In
    Rex' reply the quotation did not include them. This appears to be a bug in
    the forum software.

    I have another problem with the new Forum system. By getting messages as
    mail, I can respond to the NG, but I cannot respond to the poster alone. I
    Outlook Express, ctrl-R is "reply to sender", ctl-shift-R is "reply to all"
    (i.e. sender and all others in adress list), and ctrl-G is "reply to Group",
    the last one available only in news groups. Thunderbird has similar
    features. In the new "mail:" forum the "reply to sender" is actually
    performs "reply to group", and true "reply to sender" is unavailable.
    --
    Steve
     
  6. samintz

    samintz Scott Mintz

    Joined:
    May 20, 2008
    Messages:
    1,177
    Likes Received:
    11
    Except, console "windows" don't play by the normal Windows rules. You
    can't subclass a console window. The console handler yanks control back.
    Rex has implemented some very sophisticated technology in TCMD to be able
    to accomplish what he has.

    -Scott

    thomasl <> wrote on 07/31/2008 11:18:40 AM:



     
  7. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,785
    Likes Received:
    29
    Rex wrote

    "There seem to be some critical words missing from your question (you can
    *what* to the abort button; and the button control doesn't get what?)."

    vBulletin strikes again!

    Missing were <Tab> and <Enter>.
     
  8. Jim Cook

    Joined:
    May 20, 2008
    Messages:
    605
    Likes Received:
    0
    On Thu, Jul 31, 2008 at 12:24 PM, vefatica <> wrote:


    It appears that the actual message said "TAB" with brackets:
    left-angle-bracket, T, A, B, right-angle-bracket, but that was removed
    by the time it got to me in email. The other one was "ENTER" similarly
    bracketed.

    I wonder how much more I'm missing by the time I read the mail.
     
  9. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,730
    Likes Received:
    80
    vefatica wrote:

    If you're using HTML, don't use the angle brackets!

    Rex Conn
    JP Software
     
  10. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,785
    Likes Received:
    29
    On Thu, 31 Jul 2008 14:40:44 -0500, rconn <> wrote:


    I'm not using HTML.
     
  11. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,523
    Likes Received:
    4
    Jim Cook wrote:
    | On Thu, Jul 31, 2008 at 12:24 PM, vefatica <> wrote:
    |
    |
    | ---Quote---
    || Missing were and .
    | ---End Quote---
    |
    | It appears that the actual message said "TAB" with brackets:
    | left-angle-bracket, T, A, B, right-angle-bracket, but that was removed
    | by the time it got to me in email. The other one was "ENTER" similarly
    | bracketed.
    |
    | I wonder how much more I'm missing by the time I read the mail.

    I receive NG messages by mail. Vince's original message, when displayed in
    Outlook Express either as plain text or as html showed both the TAB and the
    ENTER in angle brackets correctly.

    I don't know whether or not Vince used HTML to compose the message.
    --
    Steve
     
  12. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,523
    Likes Received:
    4
    The message below was sent by email to this NG at 11:12 EDT, but was either
    not posted, or not sent back to me.


    logic wrote:
    | From: rconn
    | Sent: Thursday, July 31, 2008 8:49 AM
    | Subject: RE: [Plugins-t-363] Message pumping question
    |
    |
    | ---Quote---
    ||
    || There seem to be some critical words missing from your question (you
    || can *what* to the abort button; and the button control doesn't get
    || what?).
    | ---End Quote---
    | Ha ha! You just got downloaded by the forum system.
    |
    | Rex, Vincent's words were in angle brackets. He can Tab to the abort
    | button but Enter doesn't work. Put less-than and greater-than around
    | them and something, somewhere things they're rogue HTML tags and
    | strips them out.

    I read Vince's post via Outlook Express, as email, and the angle-bracketed
    text was present, both when viewed as plain text and when viewed as HTML. In
    Rex' reply the quotation did not include them. This appears to be a bug in
    the forum software.

    I have another problem with the new Forum system. By getting messages as
    mail, I can respond to the NG, but I cannot respond to the poster alone. I
    Outlook Express, ctrl-R is "reply to sender", ctl-shift-R is "reply to all"
    (i.e. sender and all others in adress list), and ctrl-G is "reply to Group",
    the last one available only in news groups. Thunderbird has similar
    features. In the new "mail:" forum the "reply to sender" is actually
    performs "reply to group", and true "reply to sender" is unavailable.
    --
    Steve
     
  13. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,785
    Likes Received:
    29
    There seem to be some critical words missing from your question (you can
    *what* to the abort button; and the button control doesn't get what?).

    Those words, which were <Tab> and <Enter>, appeared in the email I received. I believe Steve reported the same. And I see them when I read my post on the web interface. I don't see a problem.
     

Share This Page