XWidgetSoft Forum https://bbs.xwidget.com/ |
|
External text file https://bbs.xwidget.com/viewtopic.php?f=8&t=2305 |
Page 1 of 1 |
Author: | markais [ November 19th, 2012, 1:14 am ] |
Post subject: | External text file |
Hi. I would like to inquire if it is possible to get the number of uptime hours, which actually is already present with xwidget, multiply it with a given number, display it, save it to a text file, then after one hour, multiply uptime hours again (which is already 2), display it, save it to a text file and then repeat the process. For example, when I opened the computer, after one hour, it will tell me that I have 1 uptime hour. Then, it will multiply uptime hour by a number I will give for example 18. Xwidget will display 18. Then after an hour, it will show me I have 2 uptime hours, then it will multiply uptime hours by 18. So I will get 36. And the actions will repeat until I turn off the computer. The next time I turn on the computer, it will show me for example 36, the last number saved in the text file, if it is possible to overwrite the text file all the time so that xwidget will only get one data from text file. I hope you understand my concern. Thank you. |
Author: | Tony [ November 19th, 2012, 3:21 am ] |
Post subject: | Re: External text file |
If you need write a number to config, you just need uses the function "SetValue( keyName, value );" and "saveIni;" to save it immediate. and you need write code in event WidgetOnLoad : var a=getValue(keyName,defaultValue); to get your number that saved last time |
Author: | markais [ November 19th, 2012, 11:18 pm ] |
Post subject: | Re: External text file |
Wow thank you so much! |
Author: | markais [ November 26th, 2012, 10:48 pm ] |
Post subject: | External file |
Hi sorry again for the disturbance. Is it possible to save the text inside the textbox into a ini or whatsoever file and then be able to access it on system boot? I want to save a text into a file, and then shutdown computer, and when I opened it again next time, be able to access the same content again. Thank you. |
Author: | qiancang [ November 27th, 2012, 10:44 pm ] |
Post subject: | Re: External text file |
viewtopic.php?f=10&t=2316 Please read this tutorial. Has not been completed yet. |
Page 1 of 1 | All times are UTC - 8 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |