yaqwa Posted May 7, 2005 Report Share Posted May 7, 2005 Just simple (but not for me) I just want to get a message box if a file changes his date. it is a simple log file from a ftpserver running at home and i just want to be informed if someone accesses this server so best way is just a popup if the date (time) of the file changes can you help? Quote Link to comment Share on other sites More sharing options...
randallc Posted May 7, 2005 Report Share Posted May 7, 2005 Hi, Something like this? You need to set up the macro onn a "schedule" (eg every minute or whatever, to run and check; eliminate the box which tells you "SAME" Best, Randall // Demonstrating run Macro in Variable to set comparison Date stamp string from File details// FIRST SET UP AN INI FILE WITH FILE NAME Set Variable %T4% to "Installation Path" If Not File Exists "logchanges.ini" Variable Set String %T6% "Select Log File?" Multiple Choice Menu: SELECT file or make new one? If Variable %T6% contains "Select" Variable Set String %T5% from File Name Else Variable Set String %T5% "%T4%\LogFile.log" Variable Modify String: Save %T4% to Text File End If Variable Modify String: Save %T5% to INI File Variable Modify String: Save %T4% to INI File End If Variable Set String %T1% from INI File // Uses variables %T1%-T4%,%T11%, %T10%, %T98%, %N99%, %N1%-%N6% Variable Set String %T3% from INI File Variable Set From File Date/Time Variable Set String %T31% "<DT:%T2%\sT:02:2:%N3%/%N2%/%N1%\s%N4%:%N5%:%N6%>" Run Macro in Variable %T31% // Check if log file (T1) time(T2) different to that in "logchanges.ini" (T3) If Variable %T2% <> variable %T3% Variable Modify String: Save %T2% to INI File Text Box Display: DIFFERENT Else Text Box Display: SAME End If <REM2:Demonstrating run Macro in Variable to set comparison Date stamp string from File details><REM2:FIRST SET UP AN INI FILE WITH FILE NAME><VSETMISC:T4:Installation Path><IFOTH:09:2:%T4%\logchanges.ini><TVAR2:06:01:Select Log File?><MENU2:1:T:06:CenterCenter:SELECT file or make new one?SELECT file or make new one?Select Log File? Make new one><IFVAR2:1:06:7:Select><TVAR2:05:09:SET File which is the log file><ELSE><TVAR2:05:01:%T4%\LogFile.log><TMVAR2:17:04:00:000:000:%T5%F><ENDIF><TMVAR2:18:05:00:000:000:%T4%\logchanges.inianswersLogFileName><TMVAR2:18:04:00:000:000:%T4%\logchanges.inianswerschanges><ENDIF><TVAR2:01:08:%T4%\logchanges.inianswersLogFileName><REM2:Uses variables %T1%-T4%,%T11%, %T10%, %T98%, %N99%, %N1%-%N6%><TVAR2:03:08:%T4%\logchanges.inianswerschanges><VFFILE:0:1:T:2:T:3:T:1:T:4:T:5:T:6:%T1%><TVAR2:31:01:<DT:%T2%\sT:02:2:%N3%/%N2%/%N1%\s%N4%:%N5%:%N6%>><RUNMACVAR:31><REM2:Check if log file (T1) time(T2) different to that in "logchanges.ini" (T3)><IFVAR2:4:02:2:T3><TMVAR2:18:02:00:000:000:%T4%\logchanges.inianswerschanges><TBOX4:T:1:CenterCenter000278000200:000:DIFFERENTT2 is now [%T2%] and different to; last time; T3=[%T3%]><ELSE><TBOX4:T:1:CenterCenter000278000200:000:SAMET2 is SAME [%T2%] as it was; last time; T3=[%T3%]><ENDIF> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.