For item 1, put the script name as a global variable at the top of each
script, as in ScriptName = "TEST" then refer to ScriptName in your file
creator

 

For item 2, put the following in VBAs Declarations:

 

Private Declare Function GetComputerName Lib "kernel32" Alias
"GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long

 

And the following with your scripts:

 

Function MachineName() As String

Dim length As Long

MachineName = Space(100)

length = Len(MachineName)

l = GetComputerName(MachineName, length)

MachineName = Left(MachineName, length)

End Function

 

Rich McNeil

Boston Software Systems

866 653 5105 x 813

www.bostonworkstation.com 

  _____  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Lawrence, Mitchell
Sent: Monday, December 11, 2006 6:44 PM
To: [email protected]
Subject: [Talk] System Variables [Rules Based]

 

Hello,

Does anyone have a method for me to pass system variable names in my rules
based script?

 

I have a project, Development.bws, with a script "TEST",

In that project, I would like to create a subroutine that "Prints" (Not
Writes, I don't want the quotation marks) the following information into a
file "C:\Download\ScriptStatus\<SCRIPTNAME>.log", each separated by a |
symbol:

1.      System NETBIOS name (computed by subroutine)
2.      Script Name (computed by subroutine)
3.      Type of report (passed as variable to subroutine)
4.      Schedule Type (passed as variable to subroutine)
5.      Expected runtime in minutes (passed as variable to subroutine)
6.      Scheduled Time (passed as variable to subroutine)
7.      Status of script (passed as variable to subroutine)
8.      Date of Status (computed by subroutine)
9.      Time of Status (computed by subroutine)

 

How do I code my subroutine for the following?

*       Machine NETBIOS Name (example GCASM065)
*       Script Name (example "TEST", "DAILY_CENSUS", etc. NOT
"C:\bss70\Scripts\Development.bws", which is what ScriptName() returns)

*       Is there a way to use this routine to identify the specific script
rather than the bws project?

 

I can use the Format(Now(),<format>) command for #8 and #9, no problem.

 

 

Thank you,

Mitch Lawrence

Senior Applications Analyst - Advanced Report Writer

General Financials Support

CHRISTUS Information Management

': 361.881.3408  7: 361.888.6117

*: 361.549.8456  )AIM: a1d13  )MSN: [EMAIL PROTECTED]

*: [EMAIL PROTECTED]



Send a  <http://intranet.christushealth.org/spiritBuck/> "thank you" to
someone!

 

<<attachment: image001.jpg>>

Reply via email to