![]() |
| |||||||
Automation Anywhere Post messages and questions related to Automation Software here. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| |||
|
I have tried to pass arguments/parameters from one task to another by setting the value of variables, before the run statement that invokes the second task. However, it "seems" like the variables get reset to their initial values when the second task starts running. What is the BEST way to pass values from one task to a second "spawned" task? What is the "scope" of variables and their values? Thanks! Phil |
| |||
|
I had the same issue when I first started, and the only way I was able to get around it was to use a variable that logs to a text file. It works great for me, hope it does the same for you.
|
| |||
|
Hello, Another way is, in Task1 assign the value of variable (that you want to pass) to clipboard using 'Assign To Clipboard' command and in Task2 assign value from clipboard to variable using 'Assign From Clipboard' command. Text format of commands would appear something like this, In Task 1: Assign value of variable "$Prompt-Assignment$"to Clipboard In Task2: Assign value of Clipboard to variable "$Prompt-Assignment$ Hope that helps. |
| |||
| Quote:
wow - actually, there are several things that would be nice. just passing and returning parameters or function arguments. Abillity to specify, first, last or nth instance of a like named control based on the control name rather than the absolute index. the ability to chain tasks without reinitializing web pages that are recorded within the task. A better understanding of "current active window" such that you have an option to NOT ALLOW window switching or mouse or keyboard actions while a task or portion of a task is active. Automatically build in the recommended delays, "wait for window", and "if window exists or not exists" code when recording windows via the web recorder. regarding "global variables" at least you can simulate them with log to file code - but it is a bit clunky, since you can't assign a default value if there is no value previously set in the file instead you get an error that the value cannot be read. I'd sure welcome mitigation suggestions on the above. I hope I'm just suffering from not knowing what I'm doing... |
![]() |
| Thread Tools | |
| Display Modes | |
| |