Menu

#93 Issue with the auto-open and auto-close command line parameter

V3.0.0.44
open
None
Not Fixed
5
2019-02-14
2019-02-11
No

Hi Simon,
I've an issue with the auto-open and auto-close command line parameter (OPEN). Can you please explain how to use this? I've tried OPEN=1 to set the auto-open but nothing happened...

Pascal

Discussion

  • Pascal Kronenberg

    p.s. the issue only seems to concern the activeX mode. DoCommands (open=1) doesn't set auto-open.

     
  • Simon Bridger

    Simon Bridger - 2019-02-14

    ActiveX OPEN opens the port, it doen't have the secondary function of setting the autoopen checkbox.

    I think that was probably deliberate: activeX being under program control, I expect your program to open the port, and check/reopen as needed.

    Interesting that DoCommands doesn't set it, the code looks like it should work -IsRemoteCommand never seems to be set.

       if (param='CLOSED') then begin
         if IsRemoteCommand
           then Port1.Open:= not (reference='1')
           else Port1.AutoOpen:= not (reference='1');
       end;
       if (param='OPEN') then begin
         if IsRemoteCommand
           then Port1.Open:= not (reference='0')
           else begin
             Port1.AutoOpen:= not (reference='0');
             CheckboxPortAutoOpen.Checked:=Port1.AutoOpen;
           end;
       end;
    
     

Log in to post a comment.

MongoDB Logo MongoDB