- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
12-05-21 09:09 AM
I am trying to pa arguments to Blue Prism - Script Execution VBO but unable to do the same,
Please anyone guide me on the same.
I am just trying below simple code,
Output is appearing blank.
------------------------------
Amlan Sahoo
RPA Consultant
Equinix
------------------------------
Amlan Sahoo
Answered! Go to Answer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
12-05-21 03:09 PM
------------------------------
Amlan Sahoo
RPA Consultant
Equinix
------------------------------
Amlan Sahoo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
12-05-21 03:20 PM
import sys
def add(a, b):
result = int(a) + int(b);
return result;
# Addition of numbers
Sum = 0
Sum = add(sys.argv[1], sys.argv[2]);
print(Sum);
Cheers,
------------------------------
Eric Wilson
Director, Partner Integrations for Digital Exchange
Blue Prism
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
12-05-21 03:29 PM
------------------------------
Eric Wilson
Director, Partner Integrations for Digital Exchange
Blue Prism
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
12-05-21 03:29 PM
Thanks for that I have copied the same code what you have provided but still no luck.
import sys
def add(a, b):
result = int(a) + int(b);
return result;
# Addition of numbers
Sum = 0
Sum = add(sys.argv[1], sys.argv[2]);
print(Sum);
Could you please show me how youa re passing the arguments if I am trying to pass then there is no result.
This is how I am passed ,
------------------------------
Amlan Sahoo
RPA Consultant
Equinix
------------------------------
Amlan Sahoo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
12-05-21 03:33 PM
------------------------------
Amlan Sahoo
RPA Consultant
Equinix
------------------------------
Amlan Sahoo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
12-05-21 03:36 PM
------------------------------
Eric Wilson
Director, Partner Integrations for Digital Exchange
Blue Prism
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
12-05-21 03:40 PM
------------------------------
Eric Wilson
Director, Partner Integrations for Digital Exchange
Blue Prism
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
12-05-21 03:56 PM
------------------------------
Eric Wilson
Director, Partner Integrations for Digital Exchange
Blue Prism
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
12-05-21 03:57 PM
But one question do we need to pass argument always as mentioned below,
Or is there any other way?
I am just curious to know.
Sum = add(sys.argv[1], sys.argv[2])
------------------------------
Amlan Sahoo
RPA Consultant
Equinix
------------------------------
Amlan Sahoo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
12-05-21 04:01 PM
n = len(sys.argv)
# Addition of numbers
Sum = 0
# Using argparse module
for i in range(1, n):
Sum += int(sys.argv)
------------------------------
Eric Wilson
Director, Partner Integrations for Digital Exchange
Blue Prism
------------------------------
