Link to home
Start Free TrialLog in
Avatar of kakashisharingun
kakashisharingun

asked on

Using File Modified as a variable : Code Request

I'm having a surprising amount of trouble with this, I was able to do this all successfully in VBA, but just couldn't convert it to work in Visual Studio 2008. Ive since lost all my VBA work on the script and was hoping i could get some help from the forum.  

Basically I'm in search for a script that Loops the following 3 processes, i also need it to run from an .exe file or similar with no UI (User Interface) so it constantly runs in the background (This is all to go with a multimedia software):

if file 'c:\X.txt' has been modified equal to or more than 15 minutes ago, then send key R

if file 'c:\X.txt' has been modified equal to less than 5 minutes ago, then turn on numlock light, if not then turn off light.

if file 'c:\X.txt' has been not been modified for the last 4 hours , then send key delete file


Any help would be much appreciated, and i hope to be able to learn alot from this forum in the future.
ASKER CERTIFIED SOLUTION
Avatar of Dirk Haest
Dirk Haest
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
try to use AdvancedFileSystemWatcher to check the file changing issue and fire event after xx minutes
also use Process.Start("aaaa.exe") to run aaaa.exe file