| View previous topic :: View next topic |
| Author |
Message |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Sun Nov 24, 2002 12:11 am Post subject: :( |
|
|
lol well i was close
so if i follow you right save the time and date the file was made then compare it to????? ( i thought i follow you here)
humm i can't compare it to the current time cuase like you said that will always be later.... |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Sun Nov 24, 2002 12:25 am Post subject: |
|
|
Compare the saved file time value to
the current file time value...
__________________________________________________________________________________________________________________________
| Code: |
LIST CREATE, 1
if @file(c:\whatever.txt)
LIST LOADFILE, 1, c:\whatever.txt
else
LIST ADD, 1, @file(c:\test\test.txt, T)
LIST SAVEFILE, 1, c:\whatever.txt
end
if @greater(@file(c:\test\test.txt, T), @item(1,0))
INFO FILE HAS CHANGED!
else
INFO Same old file...
end
|
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Sun Nov 24, 2002 5:06 pm Post subject: hummmm |
|
|
well mac i tried that code above and it still don't work right
hummmmm
EDIT- never my i think i see what is going on..... |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Sun Nov 24, 2002 5:12 pm Post subject: |
|
|
You do realize ya have to run it at least twice
to have something to compare... _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Sun Nov 24, 2002 5:44 pm Post subject: yea |
|
|
yea that is what i found out.
hummm that might be a problem...will have to play with it |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Sun Nov 24, 2002 5:50 pm Post subject: |
|
|
It shouldn't be a problem...
You don't have to run it twice every time,
just the first time to start a record file...
Actually it makes the record file the very first time,
it just has no new info to compare that first time.
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Sun Nov 24, 2002 6:24 pm Post subject: ahhhhh |
|
|
ahhh k i see what you are saying
thanks
i'am going to play with it to see what i can mess up....lol
thanks again |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Tue Nov 26, 2002 4:07 am Post subject: hummm |
|
|
well i have been playing with it and its still does not work right....
ok do this make a file called test then run that program, then edit that test file added more to it...save it then run that code even if you run it twice it will say file "file has changed" even tho the file is 5 mins old.....meaning you made the NEW file at 10:50 and nows its 10:55 it should say "same old file"
i hope i explain this right |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Tue Nov 26, 2002 9:37 pm Post subject: |
|
|
Tim, the code above works perfectly.
Here's another example (using the same code as
above with less confusing filenames hopefully). I
added code to update the record file as needed
(sorry, I thought you understood what we're doing
here...). Check that your filenames are correct.
Create a file c:\test.txt, run this code, edit
c:\test.txt and run this code again. It works.
| Code: |
if @file(c:\record.txt)
LIST LOADFILE, 1, c:\record.txt
else
LIST ADD, 1, @file(c:\test.txt, T)
LIST SAVEFILE, 1, c:\record.txt
end
rem -- Here's a visual check --
INFO @file(c:\test.txt, T)@cr()@cr()@item(1,0)
if @greater(@file(c:\test.txt, T), @item(1,0))
INFO FILE HAS CHANGED!
LIST CLEAR, 1
LIST ADD, 1, @file(c:\test.txt, T)
LIST SAVEFILE, 1, c:\record.txt
else
INFO Same old file...
end
|
Cheers, Mac _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Wed Nov 27, 2002 12:27 am Post subject: hummm |
|
|
yea i thought i was following it to. but the old code does do that. ( at least for me it does).I haven't tried the "new" code you posted yet ( i will in a hour or so)
thanks |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Wed Nov 27, 2002 12:49 am Post subject: |
|
|
The other example was showing how to do the
comparison.
I had already mentioned updating the record
file when the file time/date changes, so I just
assumed you'd add code to do that...
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Wed Nov 27, 2002 1:08 am Post subject: oohhhhhh |
|
|
ohhhh i see what you are talking about....no i didn't added that....sorry about that i guess i thought it was all in there and i didn't look at the code closes enough like i should have.
also i will test the new code i HOPE tonight yet  |
|
| Back to top |
|
 |
|