Thread: iWitness
View Single Post
  #44  
Old 02-23-2006, 01:41 AM
Mogobu The Fool Mogobu The Fool is offline
Senior Member
 
Join Date: Sep 2005
Location: On teh internets.
Posts: 617
Default Re: networking

[ QUOTE ]
So, you're saying have another app running which puts files in, say, c:\logs (or some user specified folder) and have this script check that folder?

That's ok, I guess. I'd like this script to stand alone without any other apps. I also don't think the individual file idea is any harder; it shouldn't be hard to write a file called $Machine$.$User$.tables.txt containing the list of tables and the current time. Each cycle, check all the files; if they're newish, concatenate their list with the list of taken tables. If they're oldish, delete the file.
-Sam

[/ QUOTE ]

No, I'm not referring to another app. Just have each AHK client (this is about multiple AHK clients on multiple machines, right?) write one file per table, instead of having one file per AHK client. Let the OS handle timestamping.

So an AHK client looking for a table to open would look through the list of filenames for files modified in the last, say, 15 minutes. (Windows can do this filter for you in the directory request). Use the names of the files (since they are table names) as your exclusion list when opening table.

When you open a table, write out a new text file with the table name as the file name. If you error on the file open, then you have hit a table which another AHK client chose to open first -- abort and try another table.

Simple, and you don't have to do any reads, parse text, convert to date/times, etc.