Translate macro

Need new test, action, option? Post request here.
Post Reply
y.beyet
Posts: 62
Joined: Tue Apr 16, 2002 6:00 pm
Location: France
Contact:

Translate macro

Post by y.beyet »

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.
KS-Soft
Posts: 12821
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Are you talking about "Execute external program" action? It does not have "translate macro" option because it always translates macro.

Regards
Alex
y.beyet
Posts: 62
Joined: Tue Apr 16, 2002 6:00 pm
Location: France
Contact:

Post by y.beyet »

I put the folowing line in the Execute external program action,

Code: Select all

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...
User avatar
Marcus
Posts: 367
Joined: Mon Nov 18, 2002 6:00 pm

Post by Marcus »

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 :) )
y.beyet
Posts: 62
Joined: Tue Apr 16, 2002 6:00 pm
Location: France
Contact:

Post by y.beyet »

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).
User avatar
Marcus
Posts: 367
Joined: Mon Nov 18, 2002 6:00 pm

Post by Marcus »

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......
y.beyet
Posts: 62
Joined: Tue Apr 16, 2002 6:00 pm
Location: France
Contact:

Post by y.beyet »

it's done...
I still belive that hostmonitor can do it for me...

Thank You all...
KS-Soft
Posts: 12821
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

HostMonitor 4.10 resolves these macros (just checked). What version do you use?

Regards
Alex
y.beyet
Posts: 62
Joined: Tue Apr 16, 2002 6:00 pm
Location: France
Contact:

Post by y.beyet »

4.10...
KS-Soft
Posts: 12821
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

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: Select all

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]
y.beyet
Posts: 62
Joined: Tue Apr 16, 2002 6:00 pm
Location: France
Contact:

Post by y.beyet »

I tried this in external program :

Code: Select all

cmd /c echo iI%yyyy%-%mm%-%dd% >> c:\TEMP\test.txt
and the result in c:\TEMP is :

Code: Select all

%yyyy%-%mm%-%dd%
doesn't work for me.
User avatar
Marcus
Posts: 367
Joined: Mon Nov 18, 2002 6:00 pm

Post by Marcus »

and the result in c:\TEMP is :
Code:
%yyyy%-%mm%-%dd%
I got the same result, but then again I'm running 3.69 8)
and I don't know at which version this should be implemented......
KS-Soft
Posts: 12821
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

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
Post Reply