Sign in to follow this  
Followers 0
armenfrast

Saving some variables into a text file

5 posts in this topic

I am searching a simple UDF allowing to save some figures into a text file and allowing to get them back.

I do not want to use SqlLite (as it is not the lightest solution IMO)

For example, i would like to log the temperature of my computer at different times (and days)

I launch my script each hour, then

I open the file

check the last entry number

increment it by one

save a new entry (after the previous one) consisting of

entry number

Date (aaaammjjhhmm)

temperature 1

temperature2

then close everything

Regards

Share this post


Link to post
Share on other sites



FileOpen()
FileWriteLine()
FileClose()


[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Share this post


Link to post
Share on other sites

yes, basically I agree, and with those "file" commands this can be done - I just wondered if someone had issued an UDF around the concept of a light database built around "file" commands.

Share this post


Link to post
Share on other sites

yes, basically I agree, and with those "file" commands this can be done - I just wondered if someone had issued an UDF around the concept of a light database built around "file" commands.

Try usng an ini file, it sounds simplest way to me. Structure could be something like

[2008Day234]

hour1=32.7Deg

hour2=


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

yes, basically I agree, and with those "file" commands this can be done - I just wondered if someone had issued an UDF around the concept of a light database built around "file" commands.

Like martin said, use ini files, there is even built-in functions for them :)

Search the help file for IniRead() and IniWrite()


Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0