Menu

How to connect to a comport via a command line command.

Anonymous
2017-09-25
2018-09-19
  • Anonymous

    Anonymous - 2017-09-25

    Dear community
    I have a simple question for which I do not find an answer in the manual. I start scriptcommunication.exe via the command line with a specific config file. This is ok so far but the script shall automatically connect to a specific port which is defined in the config file. The script is doing all correctly but does not connect automatically. Is there a specific command for the command line like -run or -connect to automatically open the defined connection?
    Thanks for any help
    Phil

     
  • Stefan Zieker

    Stefan Zieker - 2017-09-27

    Hi Phil,

    sorry for my late response (Sourceforge was down). If the connection state in the configfile is 'connected' then SC should auto connect during start.

    1) Which version of SC do you use?
    2) Please upload your configfile
    3) Please show me your command line argument

    Best regards,
    Stefan

     

    Last edit: Stefan Zieker 2017-10-01
  • Anonymous

    Anonymous - 2018-09-18

    Hello.

    I have the same problem as Phil.
    The problem is that ScriptCommunicator writes "isconnected="0"" when its running. In the case of a hardreset the Lock-File is deleted by a batch-file before it starts the program, but it doesn´t connect automatically.
    Can i prevent that scriptcommunicator changes the "isconnected" to "0" when its running?

    The version is the 05.08

    Best regards
    Joachim

     
  • Stefan Zieker

    Stefan Zieker - 2018-09-18

    Hi Joachim,

    you cannot do that. But you can make a backup of your config and restore it if you kill ScriptCommunicator. But why do you kill ScriptCommunicator?

    Maybe it would be better to implement a function like this:
    ScrriptCommunicator starts with a new commandline option 'observe shutdown file'. If ScriptCommunicator detects that this file was deleted then it exits automatically. Then ScriptCommunicator would write the config file correctly.

    Best regards,
    Stefan

     
  • Anonymous

    Anonymous - 2018-09-19

    Hello Stefan

    thanks for your answer.
    I want to do following: i use Scriptcommunicator to write a log file of received data, but i want a different log file every day. So i´ll kill Scriptcom. with a planned task every 24 hours to create a new logfile.

    I´ve tried to write the commandline like you told me, but it doesn´t connect automatically to the com port.....

    Do you have any other ideas?

    Thanks
    best regards
    Joachim

     
  • Stefan Zieker

    Stefan Zieker - 2018-09-19

    Hi Joachim,

    this new option was only a suggestion for a future release of ScriptCommunicator. In my opinion it would be better to create a worker script which does this for you (then you don't need to kill ScriptCommunicator anymore).

    Best regards,
    Stefan

     

    Last edit: Stefan Zieker 2018-09-19
  • Stefan Zieker

    Stefan Zieker - 2018-09-19

    Hi Joachim,

    you can find a script in the attachment which writes all received data into a log file. The name of this file is changed every 24h.

    Best regards,
    Stefan

     

    Last edit: Stefan Zieker 2018-09-19

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.