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 02-06-2008, 04:13 AM
atoledo atoledo is offline
Junior Member
 
Join Date: Feb 2008
Posts: 3
Default JScript and Variables

I have a function JScript and i run this function from automation anywhere, but how can i save the return value of the function to use in automation anywhere?

A Easy example, if my Jscript is the follow:
function a(b){
return b;
}

How can i execute from automation anywhere the JScript?? have i to put in the JScript one line more calling the function ( a(value) ) ? How can i pass a parameter from the automation to the function? how can i save the return value to use in automation?

Thanks

Alvaro Toledo
Reply With Quote
  #2 (permalink)  
Old 02-06-2008, 11:07 AM
atoledo atoledo is offline
Junior Member
 
Join Date: Feb 2008
Posts: 3
Default Read parameter in JScript

I could have spent a parameter and use it in JScript doing:

var args = WScript.Arguments;
WScript.Echo("Caption: " + args.item(0) );

Now i only have 1 problem: how I can return a value of JScript to put it into a variable of automation? or How I can change the value of the parameter that i spent?

I put in the return value of the Run Script of automation anywhere a variable, but don´t change. I don´t know how to write in it.

Thanks
Reply With Quote
  #3 (permalink)  
Old 02-06-2008, 12:26 PM
forumsupport forumsupport is offline
Senior Member
 
Join Date: Apr 2007
Posts: 1,342
Default

Hello,

Using Automation Anywhere, you can pass parameter to any java script and store the return value to a variable.

For your reference, we have attached "javascript.atmn".

All you need to do is, copy the task files (javascript.atmn) to.....\My Documents\Automation Anywhere\Automation Anywhere\My Tasks\

Create a variable with name “temp” from Tools->Variable Manager. 'Add new variable’ of value type and assign zero to it.

Also, copy “sumall.js” file to c:\ drive

Run the task. This task will sum up all the parameters that we passed and will return the output to Temp variable.

Hope that helps.
Attached Files
File Type: zip zip.zip (655 Bytes, 13 views)
Reply With Quote
  #4 (permalink)  
Old 02-07-2008, 02:26 AM
atoledo atoledo is offline
Junior Member
 
Join Date: Feb 2008
Posts: 3
Default Thanks

Thanks for all.
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 02:35 PM.


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