gagangoomer Posted September 2, 2013 Report Share Posted September 2, 2013 Hi, Can anyone share an example of "How to use .vbs file(vb scrpit) file in an ME macro. I've written a small code but its not wroking ? Any help/ suggestion will be appriciated. Regards, Gagan Quote Link to comment Share on other sites More sharing options...
Samrae Posted September 3, 2013 Report Share Posted September 3, 2013 Do either of these help? Willy's Helpers External Scripts Quote Link to comment Share on other sites More sharing options...
gagangoomer Posted September 3, 2013 Author Report Share Posted September 3, 2013 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. Quote Link to comment Share on other sites More sharing options...
Cory Posted September 3, 2013 Report Share Posted September 3, 2013 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.