[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 622
  • Last Modified:

reflection/ macro in vbscript

Hi
From my vbscript code I need to send to external API parameters like: current line, functione, module etc.  How do I get these details?  
0
tlangent
Asked:
tlangent
  • 2
  • 2
  • 2
1 Solution
 
Patrick MatthewsCommented:
Please explain what you are trying to do.

VBScript cannot make API calls.
0
 
Bill PrewCommented:
I'm not aware of any way for an external program to interact with a running windows shell script (VBS). And even if there was a way to invoke a procedure in your code to return this type of information, at that point it would always report itself (the "api" procedure) as the location executing.

Depending on what you are trying to accomplish, the VBS script could periodically write to a text file or set a global system variable (or I guess even update a registry entry of your own) with a "bread crumb trail" of where it is executing.  But you would have to add code to your VBS script to accomplish this.

~bp
0
 
tlangentAuthor Commented:
no matter what I am trying to do, I will phrase it anew:  Is there a way for my vbscript to tell me what line, function etc I am on ?
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
Bill PrewCommented:
matthewspatrick may know something I don't (I know he knows a LOT I don't) on this topic, but I'm not aware of any way object or property in VBS that exposes the current line number to the program.

~bp
0
 
Patrick MatthewsCommented:
The closest you could come would be to create a "status" variable, which you periodically update to indicate what you are doing.  For example...


Dim Status
' Other Dim statements
' Const declarations

Status = "Step 1"

' do stuff

Status = "Step 2"

' do stuff

Status = "Step 3"

' do stuff

'et cetera

Open in new window


Your runtime engine will sometimes give you a line number if you have a runtime engine, of course.
0
 
tlangentAuthor Commented:
Right, there is no solution
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 2
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now