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.
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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:)
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).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
varinput=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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
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
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
Hi Amr,
you can find a worker script (add and start it in the script window) which does this for you.
Best regards,
Stefan
Last edit: Stefan Zieker 2018-12-06
That's AMAZING
much much much appreciation
My best regards and prayers for you
my pleasure
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 (ᵔᴥᵔ)
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
Thanks a lot (ᵔᴥᵔ)
my pleasure
Hi again,
I've tried command
.fonsize(7)
to increase the size of the output but what I got isany idea how to increase it?
Hi Amr,
are you writting to an HTML file? From which object are you calling .fontsize?
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
in the attachment you can find an html file with different sizes (my browser shows this correctly)
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 \r
to break the line :\ , same "unexpected token" error from the editor.Last edit: Amr Al-Omari 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
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:)
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).
That's amazing
Bless you and have a nice day dear Stefan
That's amazing
Bless you and have a nice day dear Stefan
my pleasure
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!
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
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
Hi Stefan
Hope you're all well
I've added this
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.