cancel
Showing results for 
Search instead for 
Did you mean: 

Re: Why Should I Use ctx.wscript.shell Class if I Can also Use WScript.Shell Directly?

10-02-2019 10:43 AM
jleonard Product and Topic Expert
746 views 0 comments Go to solution
0 Likes
SAP Managed Tags
Subscribe

I can use in the JScript code of IRPA the embedded class ctx.wscript.shell. Here an example with the available methods.

Also I can use WScript.Shell class directly. Here an example with the available methods.

The wscript.js library reveal us that the method expandEnvString from the ctx.wscript.shell class is nothing more than a wrapper around ExpandEnvironmentStrings method from WScript.Shell class.

What is the benefit of using the ctx.wscript.shell class in comparisation to WScript.Shell? If I use WScript.Shell directly, I even have many more possibilities as at ctx.wscript.shell.

Thanks for tips and hints.
Best regards
Stefan

0 Likes
View Entire Topic
jleonard
Product and Topic Expert
Product and Topic Expert

Hi

Yes some functions in our SDK are wrapper on activeX objects.

Most of the users don't know how to use activeX objects and how to find the documentation on it. With this we provide in our SDK a set of functionalities.

If the functions provided by the SDK aren't enough you can use activeX objects directly. But keep in mind that we maintain and support only our SDK function, not the activeX objects themself.