Hello,
I have two computers on a LAN both running Macro Scheduler scripts. In the past, when I've needed to communicate from one script to the other, I shared a folder and just read/write files inside the folder from each computer across the LAN... But this can be a little clunky and slow and I have to be careful not to have both scripts try to read the file before or while the other is writing and cause a "can't write" or "can't read" error on the other computer. It also means I have to constantly scan to see if the file has been written, and I think previously I created a "flag" file so that I can check if it exists prior to reading the data file, just so I can ensure I'm not reading it before it's done being written. I don't think Macroscheduler supports the file sharing options like "open for Random access" or "open exclusive", etc. Is there a better way to share data across the LAN? With a DLL or perhaps something native to Macro Scheduler?
-Krep
Network communications
Moderators: Dorian (MJT support), JRL
Re: Network communications
Or via a VBScript command?
- Marcus Tettmar
- Site Admin
- Posts: 7380
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: Network communications
Not sure what info you are wanting to move back and forth but a database might be more suitable. Could just be Access, but could also be SQL Server or similar. Use the database functions.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Re: Network communications
Realtime rapid control, X, Y, Z coordinates in variables from computer A to variables in computer B. Updated very fast (ms).
So, I guess it's either stick with file I/O or load a library with some kind of networking support...
-Krep
So, I guess it's either stick with file I/O or load a library with some kind of networking support...
-Krep
Re: Network communications
Maybe include the Ws2_32.dll library and use Sockets?
Such as:
https://msdn.microsoft.com/en-us/librar ... s.85).aspx
https://msdn.microsoft.com/en-us/librar ... s.85).aspx
Would this be super difficult? Maybe I should try standing up a file I/O based share first, and test if it's fast enough...
-Krep
Such as:
https://msdn.microsoft.com/en-us/librar ... s.85).aspx
https://msdn.microsoft.com/en-us/librar ... s.85).aspx
Would this be super difficult? Maybe I should try standing up a file I/O based share first, and test if it's fast enough...
-Krep
- Marcus Tettmar
- Site Admin
- Posts: 7380
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: Network communications
Yes you could use a networking protocol. Probably would have to use a COM interface with VBScript.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?