View previous topic :: View next topic |
Author |
Message |
y.beyet
Joined: 16 Apr 2002 Posts: 62 Location: France
|
Posted: Thu Oct 02, 2003 3:27 am Post subject: Translate macro |
|
|
Hi Alex,
I need to run an extrenal program with special names, but there is no "translate macro" check box for the command line...
Can you put it there ?
Thank You. |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12818 Location: USA
|
Posted: Thu Oct 02, 2003 1:51 pm Post subject: |
|
|
Are you talking about "Execute external program" action? It does not have "translate macro" option because it always translates macro.
Regards
Alex |
|
Back to top |
|
|
y.beyet
Joined: 16 Apr 2002 Posts: 62 Location: France
|
Posted: Fri Oct 03, 2003 1:19 am Post subject: |
|
|
I put the folowing line in the Execute external program action,
Code: | cscript //B "C:\Program Files\HostMonitor\scripts\ctrlchaineintuition.vbs" exception \\Jade\Exploitation\intuition\rwserver\iI%yyyy%-%mm%-%dd%T*.log |
When I replace %yyyy%-%mm%-%dd% by the current date, it works, so I think that translate macro doesn't works... |
|
Back to top |
|
|
Marcus
Joined: 18 Nov 2002 Posts: 367
|
Posted: Fri Oct 03, 2003 2:00 am Post subject: |
|
|
If you use vbs to perform an action, it must not be difficult to get the correct current date. Handle it inside your script and your done.
%yyyy%-%mm%-%dd% variables are only used to specify the log files (at least as far as I know ) |
|
Back to top |
|
|
y.beyet
Joined: 16 Apr 2002 Posts: 62 Location: France
|
Posted: Fri Oct 03, 2003 2:14 am Post subject: |
|
|
I know that...
I have a lot of log files to control, so i use only one script with the word to search and the log to look at (T*.log because I have multi logs for one day). |
|
Back to top |
|
|
Marcus
Joined: 18 Nov 2002 Posts: 367
|
Posted: Fri Oct 03, 2003 2:25 am Post subject: |
|
|
That's stil possible inside your vbs script.
Give the word and the log, inside the script add the date. Or am I missing something...... |
|
Back to top |
|
|
y.beyet
Joined: 16 Apr 2002 Posts: 62 Location: France
|
Posted: Fri Oct 03, 2003 5:44 am Post subject: |
|
|
it's done...
I still belive that hostmonitor can do it for me...
Thank You all... |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12818 Location: USA
|
Posted: Fri Oct 03, 2003 9:58 am Post subject: |
|
|
HostMonitor 4.10 resolves these macros (just checked). What version do you use?
Regards
Alex |
|
Back to top |
|
|
y.beyet
Joined: 16 Apr 2002 Posts: 62 Location: France
|
Posted: Mon Oct 06, 2003 1:02 am Post subject: |
|
|
4.10... |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12818 Location: USA
|
Posted: Mon Oct 06, 2003 9:20 pm Post subject: |
|
|
HostMonitor 4.10 resolves macros. I do not have script that you use but I created "execute external program" action and copied your command line, added "cmd /c echo" ahead and added ">>c:\test." in the end.
After action execution I checked the log. There is line from the log:
Code: |
cscript //B "C:\Program Files\HostMonitor\scripts\ctrlchaineintuition.vbs" exception \\Jade\Exploitation\intuition\rwserver\iI2003-10-06T*.log
|
As you see HostMonitor works correctly. Probaly something wrong in the script?
Regards
Alex[/code] |
|
Back to top |
|
|
y.beyet
Joined: 16 Apr 2002 Posts: 62 Location: France
|
Posted: Tue Oct 07, 2003 1:38 am Post subject: |
|
|
I tried this in external program :
Code: | cmd /c echo iI%yyyy%-%mm%-%dd% >> c:\TEMP\test.txt |
and the result in c:\TEMP is :
doesn't work for me. |
|
Back to top |
|
|
Marcus
Joined: 18 Nov 2002 Posts: 367
|
Posted: Tue Oct 07, 2003 1:53 am Post subject: |
|
|
Quote: | and the result in c:\TEMP is :
Code:
%yyyy%-%mm%-%dd%
|
I got the same result, but then again I'm running 3.69
and I don't know at which version this should be implemented...... |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12818 Location: USA
|
Posted: Tue Oct 07, 2003 7:55 pm Post subject: |
|
|
To Marcus:
Version 3.69 resolves test related macro variables (when execute action) but does not resolve date&time variables. This feature was implemented in versions 4.0
To y.beyet:
I checked code and do not see any reason why this function may work incorrectly. Are you absolutely sure you are using version 4.10?
Regards
Alex |
|
Back to top |
|
|
|