I’m trying to invoke a VBScript that’s located in my “Test.vbs” file in the Project Directory that needs to accept a sapfewse.GUISession object as an argument. However, the Invoke VBScript activity will only accept a string arguments. Is there an option to change the variable type? Or is there any other way to run VBScript in UIPath with the flexibility of passing any type of arguments?
in my opinion it is not necessary to transfer the GUISession object to the VBScript directly. You know the session object in your calling program. With the property ID you can get the full ID of the session as string, e.g. like this:
A tiny hint: It is not possible to use one SAP session parallel with two or more different SAP GUI Scripting calls. Be sure, before you execute a new SAP GUI Scripting call, that the previous one has ended. Or better is to use the Busy property from the session object.
Thank you so much for your suggestion and the resource link you provided, its a gold mine of information for what I’ve been trying to achieve.
If I could rack your brain for another problem I’ve been having with SAP GUI Scripting with UIPath? I’m trying to use the “Get Text” Activity to get a value from a cell in SAP. The selector for the field is as follows :
However, the “SAPLDISPLAY46:xxxx” part of the selector seems to change randomly from time to time and the activity seems to crash when it cannot find the defined selector. there is no pattern to the change and i was wondering if there’s a possibility of using a wildcard there, if so what is the correct syntax to make this selector dynamic?
I’ve already gone through the documentation and that forum and have tried using the Wildcard in its place, however I still can’t get the selector to work. I tried every possible syntax as well but with no luck. Is there anything else you can think of that would help?