Menu

Initializing the main window?

Anonymous
2022-11-18
2024-04-23
  • Anonymous

    Anonymous - 2022-11-18

    Hey,
    I'm currently stuck writing a script, we using ScriptCommunicator to read data from a COM port and save it into a log for further processing. That works just fine, but our automization script has one big issue.

    While we can automatically connect with the COM port on startup we still have to manually click into the main window before any data is received and logged. I've tried several things, but don't find anything that works.

    ASCII 253 (Left Click) doesn't seem to work either. Any ideas?

    Regards,
    Dean

     
  • Anonymous

    Anonymous - 2022-11-18

    We are starting the ScriptCommunicator using a VB script, letting it read the COM Data and then close it to process the log file, which is cleared once it's done.

    When we start the Communicator we always have to click the main console before any data is being transfered though, Everything works just fine, it just waits until we click the window manually.

    Regards,
    Dean

     
  • Stefan Zieker

    Stefan Zieker - 2022-11-18

    Hi Dean,

    I think I now what is wrong.

    you have to change the sending of the left click:

    var test = Array()
    test[0] = 253;
    scriptInf.sendDataArray(test); 
    

    Array(253) creates an array with 253 elements filled with zeros.

     

    Last edit: Stefan Zieker 2022-11-18
    • Anonymous

      Anonymous - 2022-11-18

      Hey Stefan,

      That worked! Though it looks like ScriptCommunicator has issues with ASCII characters, I had to use version 04.18 to successfully get ASCII strings for a different project.

      Version 05.10 which I use at work only shows me this "ÿ" character when it tries to process the ASCII string. Does it have issue with german localization due to UTF8?

      Thanks for the first fix.

       
  • Stefan Zieker

    Stefan Zieker - 2022-11-18

    Hi Dean,

    can you give me an example of the ASCII strings that are not shown correctly?

     

    Last edit: Stefan Zieker 2022-11-18
    • Anonymous

      Anonymous - 2022-11-18

      The ASCII Left Click from the array for example, just anything that is ASCII encoded doesn't show up corecctly in versions above 04.18 for me. Any and all ASCII Symbols are just shown as "ÿ"

       
  • Stefan Zieker

    Stefan Zieker - 2022-11-18

    Hi Dean,

    this is not a valid ASCII character. The max. ASCII characters is 127. That's the reason for the y. If you want to see this correctly activate the HEX view.

     
    • Anonymous

      Anonymous - 2022-11-18

      Is there anyway then to simulate a click into the ASCII view?

       
  • Anonymous

    Anonymous - 2022-11-18

    no there is not

     
  • Anonymous

    Anonymous - 2022-11-18

    The only other thing we have left to try is to try and add a banner over the data.
    Does sending a string before the COM connection is established initialize the view?

    And seperate question how do I add a break line? \n didn't work.

     
  • Anonymous

    Anonymous - 2022-11-18

    The sent data is only shown if the COM port is connected.

    What to send / receive for a new line depends on the console settings (Settings Window).

     
  • Anonymous

    Anonymous - 2022-11-21

    Hey there, thanks for a the helpful advice and answers in this threat.

    Though even after several tries to fix my issue, I'm stuck on the same problem.

    A coworker has a VBA script that runs as a cronjob every weekend. Among other things, it starts the ScriptCommunicator. What's supposed to happen is that the SC just opens communication on COM1 logs all received data and then gets closed by the VBA script.

    The only issue is that once the SC starts we always have to manually click into the application and specifically click into the open view. (The ASCII view in my case). If we don't do this there is no data being sent to the SC and I struggle to understand why.

    I already set the bools that set received and sent data to show as 1 in my script.
    scriptInf.showReceivedData = 1;
    scriptInf.showSendData = 1;

    Am I missing something or is the issue that it's started by a script maybe?

    Regards
    Dean

     
  • Stefan Zieker

    Stefan Zieker - 2022-11-21
    scriptInf.showReceivedData = 1;
    scriptInf.showSendData = 1;
    

    These two statements have no effect (they add two new attributes to the scriptInf object). I think you are looking for:

    scriptThread.showReceivedDataInConsoles
    scriptThread.showTransmitDataInConsoles
    

    But these two settings don't influence the reception of the data in a script.
    Upload your script and write me your the command line arguments for starting ScriptCommunicator with your script. Then I will see what I can do.

     
  • Anonymous

    Anonymous - 2024-04-23

    The ScriptCommunicator on my Win 10 laptop showed something strange recently. 1) it takes very long time to start the program, more than 20 minutes; 2) the first window "select ScriptCommunicator config file", in a crazily long window, and I could not make it shorter by resize it. What should I do to solve the troubles? Thanks for your help.

     
  • Stefan Zieker

    Stefan Zieker - 2024-04-23

    Hi,

    you can try this:
    Go to your documents folder, rename or delete the 'ScriptCommunicator' folder and then start ScriptCommunicator.

     

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.