Intelligent Automation & Macro Software  

Go Back   Automation Anywhere, Inc. Forums > Products Zone > Automation Anywhere
Register FAQ Search Today's Posts Mark Forums Read

Automation Anywhere Post messages and questions related to Automation Software here.


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-06-2008, 12:02 AM
philkryder philkryder is online now
Senior Member
 
Join Date: Sep 2007
Posts: 458
Default do variables get re-initialized when one task runs another task?

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
Reply With Quote
  #2 (permalink)  
Old 03-06-2008, 04:22 AM
marcgallant marcgallant is offline
Member
 
Join Date: Jul 2007
Location: Dieppe, New Brunswick Canada
Posts: 46
Default Log to File

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.
Reply With Quote
  #3 (permalink)  
Old 03-06-2008, 09:10 AM
forumsupport forumsupport is offline
Senior Member
 
Join Date: Apr 2007
Posts: 1,342
Default

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.
Reply With Quote
  #4 (permalink)  
Old 03-06-2008, 11:35 AM
philkryder philkryder is online now
Senior Member
 
Join Date: Sep 2007
Posts: 458
Default

any thought to global variables?
Reply With Quote
  #5 (permalink)  
Old 03-06-2008, 08:11 PM
philkryder philkryder is online now
Senior Member
 
Join Date: Sep 2007
Posts: 458
Default

well, passing by file, does work - but, talk about rube goldberg....
Reply With Quote
  #6 (permalink)  
Old 03-10-2008, 12:40 PM
marcgallant marcgallant is offline
Member
 
Join Date: Jul 2007
Location: Dieppe, New Brunswick Canada
Posts: 46
Default Agreed

I'd love to have some sort of global variable. That would be a nice new feature.

Last edited by marcgallant; 03-11-2008 at 05:10 AM.
Reply With Quote
  #7 (permalink)  
Old 03-10-2008, 09:19 PM
philkryder philkryder is online now
Senior Member
 
Join Date: Sep 2007
Posts: 458
Default

Quote:
Originally Posted by marcgallant View Post
I'd love to have some sort of golbal variable. That would be a nice new feature.

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...
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -7. The time now is 07:35 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.0.0 ©2007, Crawlability, Inc.
Copyright © 2003-2011 Automation Anywhere, Inc. All rights reserved