Jump to content
Macro Express Forums

Example of vbs file (External scrpit) in ME


Recommended Posts

Thanks for replying Samrae.

 

I've tried both these macros which yous external scrpit as a part of macro. But my requirement is to use a .vbs file.

 

Its just a vb script file(external file ex : Test.vbs)which can be called in an ME macro. And once the scrpit is run the ME macro wil continue there on. The use of using a .vbs file is that in case if there is some chages required in the script file(.vbs file) it will not impact the complete macro.

 

I've seen this working before. Unfortunately I'm not able to find the code to call the.vbs file. :(

Link to comment
Share on other sites

As I understand it you do not want the script embedded so it can be modified independently of the MEX. I can think of two ways to do this off the top of my head. Run it as a program and loading it as a text file. But I haven't tested either of these.

 

The first one would use the Program Launch. I think you could execute the VBS directly but alternatively you might have to execute CScript.exe and use the VBS file as a parameter. I don't know how much data you intend to pass back but if it was a trivial amount you can use the Capture Console Output option. If it's a lot you could send it to a text file and suck that in. It just depends.

 

The next way I've never tested and that's to load the contents of the VBS file into a string var and use that in the External Script command.

 

If you need any professional help with this PM me.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...