Menu

[simple help] Export each reading alone

2018-12-06
2022-09-14
1 2 > >> (Page 1 of 2)
  • Amr Al-Omari

    Amr Al-Omari - 2018-12-06

    Dear Stefan Zieker

    Thanks a lot for the AWESOME work you've created!

    I'm amazed by this program, I'm using it to take the reading from the
    balances in my small lab, I'm sorry I'm no programmer, but is there a way
    that let the program to export each balance reading alone?? for example, if
    it receives a reading of 0.000 it'll export the previous reading into a new
    file.

    --
    Best Regards

    Amr Al-Omari

     

    Last edit: Amr Al-Omari 2018-12-06
  • Stefan Zieker

    Stefan Zieker - 2018-12-06

    Hi Amr,

    I'm not shure what your are trying to achieve. Do you want to write every received value into to one single (text) file? Is the received data a string or binary data?

    Best Regards
    Stefan

     

    Last edit: Stefan Zieker 2018-12-06
    • Amr Al-Omari

      Amr Al-Omari - 2018-12-06

      Thanks for the reply,
      the data arrives as ASCII, and the logging option does save all the reading in one file (text or HTML) which is greate.

      example of logged data

      But I want to seperate each value in a seperate file.
      so each reading is automatically saved in a seperate file with the time taken as file name :S

      is it possible??

       

      Last edit: Amr Al-Omari 2018-12-06
  • Stefan Zieker

    Stefan Zieker - 2018-12-06

    Hi Amr,

    you can find a worker script (add and start it in the script window) which does this for you.

    Best regards,
    Stefan

     
    👍
    1

    Last edit: Stefan Zieker 2018-12-06
  • Amr Al-Omari

    Amr Al-Omari - 2018-12-06

    That's AMAZING

    much much much appreciation

    My best regards and prayers for you

     
  • Stefan Zieker

    Stefan Zieker - 2018-12-06

    my pleasure

     
  • Amr Al-Omari

    Amr Al-Omari - 2018-12-13

    Hey again Mr Stefan ^̮^

    I'm woundering if it's possible to add my lab name, Time & Date before the reading , then to export it as a picture :S

    I know I'm asking much :S I'm sorry

    have a blessed holidays (ᵔᴥᵔ)

     
  • Anonymous

    Anonymous - 2018-12-13

    Hi Amr,

    it is no problem to add your lab name and the Time & Date (see attachment). But you need an external tool for converting your readings to a picture.

    Best regards
    Stefan

     

    Last edit: Stefan Zieker 2018-12-13
  • Amr Al-Omari

    Amr Al-Omari - 2018-12-13

    Thanks a lot (ᵔᴥᵔ)

     
  • Stefan Zieker

    Stefan Zieker - 2018-12-13

    my pleasure

     
  • Amr Al-Omari

    Amr Al-Omari - 2018-12-20

    Hi again,

    I've tried command .fonsize(7) to increase the size of the output but what I got is

    <font size="7">My Lab</font>

    any idea how to increase it?

     
  • Stefan Zieker

    Stefan Zieker - 2018-12-20

    Hi Amr,

    are you writting to an HTML file? From which object are you calling .fontsize?

     
  • Amr Al-Omari

    Amr Al-Omari - 2018-12-20

    since the script is JavaScript (I guess :) I've experimented adding it after the lab name XD

    but the output stays .txt
    also when I've changed the output to .doc or .html it stayed the same

    <font size="7">My Lab</font>

     
  • Stefan Zieker

    Stefan Zieker - 2018-12-20

    in the attachment you can find an html file with different sizes (my browser shows this correctly)

     
  • Amr Al-Omari

    Amr Al-Omari - 2018-12-20

    While your attachment works, when trying to applying it in script editor it gave me an error that says "unexpected token"

    I'm sorry.
    .fontsize(7) worked on html but I can't get <br>, \n or \rto break the line :\ , same "unexpected token" error from the editor.

     

    Last edit: Amr Al-Omari 2018-12-20
  • Stefan Zieker

    Stefan Zieker - 2018-12-20

    You can find a script in the attachment, which generates the html file from my last post.
    If you want to add a \n then you have to escape the \ ( "\\n", "\\r" ...). But if you want to generate an html file then you have to use <br> instead of \n.

     

    Last edit: Stefan Zieker 2018-12-20
  • Anonymous

    Anonymous - 2019-01-06

    Hi and happy new year dear Stefan,

    I've connected a new instrument (pH meter) that export couple of lines (screen shot attached) , using old code wil export each line in a seperate line. Can you pleasse modify the script so it'll export the lines when data transfer finished for example our when it detects the instrument sending a specific string (which is the last line Signiture:)

     
  • Stefan Zieker

    Stefan Zieker - 2019-01-06

    Hi,

    happy new year to you too. You can find a script in the attachment, which generates the log file if the string "MySignature" has been received (and then deletes the received data).

     
  • Amr Al-Omari

    Amr Al-Omari - 2019-01-06

    That's amazing

    Bless you and have a nice day dear Stefan

     
  • Amr Al-Omari

    Amr Al-Omari - 2019-01-06

    That's amazing

    Bless you and have a nice day dear Stefan

     
  • Stefan Zieker

    Stefan Zieker - 2019-01-07

    my pleasure

     
  • Amr Al-Omari

    Amr Al-Omari - 2019-08-05

    Hello Stefan

    I'm noticing that the logs written recently are given me the month wrong!
    it's writing the month as 07 (July) instead of 08 (August)

    I've checked the instrument and the PC I'm using and both got the month right, but have no idea why the program is writing it wrong!

     
  • Anonymous

    Anonymous - 2019-08-05

    Hi Amr,

    I have looked into the documentation of Date.getMonth(). It says that it return 0 for January and 11 for December. Therefore you have to add 1 to the result.

    Regards,
    Stefan

     

    Last edit: Stefan Zieker 2019-08-05
  • Amr Al-Omari

    Amr Al-Omari - 2019-09-22

    Dear Stefan
    Thanks a lot for your kind reply,

    I've tried to +1/+"1" several times inside and outside now.getMonth()

    but had no luck to get the correct month :\

    UPDATE
    It seems like i needed to add +1 to both strings.
    Thanks, it's all right

     

    Last edit: Amr Al-Omari 2019-09-22
  • Amr Al-Omari

    Amr Al-Omari - 2022-09-13

    Hi Stefan
    Hope you're all well

    I've added this

    var input = scriptThread.showTextInputDialog("Title", "label", "initial text");
    if(input != "")
    {
    scriptThread.appendTextToConsole("ok button pressed: input=" + input);
    }
    else{
    scriptThread.appendTextToConsole("ok button not pressed or empty input");
    }
    

    to the script in order to be able to add small text to the output, But how could I add new input wach time the script runs, not just when the script started working.

     
1 2 > >> (Page 1 of 2)

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.