This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
ThinkInvisible's profile picture

Timestamps, Name Detection, And File Detection

Started by ThinkInvisible, 04 August 2013 - 12:15 AM
ThinkInvisible #1
Posted 04 August 2013 - 02:15 AM
I'm creating a music program with ComputerCraft that can, of course, save songs. I want to be able to do three things:
-Save the date last saved, preferably from some sort of system clock?
-Scan through all files on a computer for a code the program will save to each song, allowing a loading system.
-Detect who owns the computer, or preferably who is using the computer, to save to the file as the author.
Does anyone know how to do any of these?
ThinkInvisible #2
Posted 04 August 2013 - 11:07 AM
OS.clock appears to get the computercraft computer's 'system time'. I want to get either the server's or client's time, or possibly grab it from a website. The fs API should work though, thanks.
TheOddByte #3
Posted 04 August 2013 - 03:11 PM
So you mean you want to get the irl time?
I think you'll probably have to use http for that..
I think I have a script that does that, If I can find it…
But go and check out http on the wiki ;)/>
http://computercraft.info/wiki/HTTP_(API)
And you'll probably have to get the time from a site.