Network Automation Software We are currently migrating this forum
over to our HelpSystems domain. Please
post all new threads in our new
HelpSystems Community Portal.
Post to the HelpSystems Forum
You are not currently logged on. You must be logged on in order to post. Log on
Or Create a new account
AutoMate Discussion
Decrease font size
Increase font size
Topic Title: Take Automate variable into Basic Script IDE
Topic Summary: Is this possible?
Created On: 07/16/2013 12:18 PM
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
View similar topics View similar topics
View topic in raw text format. Print this topic.
 07/16/2013 12:18 PM
User is offline View Users Profile Print this message

Author Icon
SteveMatecka
n00b (>6 posts)

Posts: 4
Joined: 02/25/2013

I have tried searching, and I'm new to the Basic Scripting.

Is it possible to take an automate variable and reference it or set its contents into a variable within a basic script in automate?

 

Thanks,

 

Steve



 Category Survey
 07/16/2013 12:51 PM
User is offline View Users Profile Print this message

Author Icon
JeanDelfosse
Supreme Guru (1000+)

Posts: 8883
Joined: 03/30/2005

Steve,
all variables (and arrays and datasets) of the task are available with their very same name to the basic scripts.
But you cannot run the basic script from the IDE since when IDE is running the task is not running, and the task variables are not available.
When you will run the task itself, the basic script will take into account the actual value of the variables.
Also variables whose content is altered by the basic script will be actually modified in the task.

 Category Survey
AutoMate 8 version:
Windows version:


-------------------------
Jean Delfosse - Automate Beta Tester
Win7 Pro 64 bits -Win XP Pro SP3 32 bits - AM8, AM7, BPA10, BPA9, BPA8, BPA7, AM6 Enterprise, AM4
 07/16/2013 03:07 PM
User is offline View Users Profile Print this message

Author Icon
SteveMatecka
n00b (>6 posts)

Posts: 4
Joined: 02/25/2013

Originally posted by: JeanDelfosse Steve, all variables (and arrays and datasets) of the task are available with their very same name to the basic scripts. But you cannot run the basic script from the IDE since when IDE is running the task is not running, and the task variables are not available. When you will run the task itself, the basic script will take into account the actual value of the variables. Also variables whose content is altered by the basic script will be actually modified in the task.

 

I appreciate your response.

I'm a pretty big newbie in this.

 

I have an automate script, and embedded within I have a Basic Script which is a task in the automate script.

 

What I would like to do, and I don't know how to call the variable within the Basic Script, is to say use "var1" in the basic script.

 

How would I call that var1 within the script itself?



 Category Survey
 07/16/2013 08:02 PM
User is offline View Users Profile Print this message

Author Icon
Leonard Amabile
HelpSystems

Posts: 5454
Joined: 05/15/2007

Hi Steve,

Here is a very basic example.



 Category Survey



Task Steps: (Right click, Select All, Copy to copy to the clipboard. Steps can then be pasted into the AutoMate Task Builder)


-------------------------

Leonard Amabile | Director, Cross Platform Support
AutoMate | InterMapper | Skybot | Divisions of HelpSystems
T: +1.213.738.1700 | F: +1.213.738.7665
 07/16/2013 10:07 PM
User is offline View Users Profile Print this message

Author Icon
JeanDelfosse
Supreme Guru (1000+)

Posts: 8883
Joined: 03/30/2005

Steve,
as you can see in Leonard's sample, in the basic script you refer to the task variables just by their name
As another example if you have in the task three variables v1, v2 and v3
and you would sum up v1 and v2 into v3 in a basic script, it would look like this :

Sub Main
v3 = v1 + v2
End Sub

and the result v3 will be contained in the task variable v3

 Category Survey
AutoMate 8 version:
Windows version:


-------------------------
Jean Delfosse - Automate Beta Tester
Win7 Pro 64 bits -Win XP Pro SP3 32 bits - AM8, AM7, BPA10, BPA9, BPA8, BPA7, AM6 Enterprise, AM4
 07/18/2013 12:49 PM
User is offline View Users Profile Print this message

Author Icon
SteveMatecka
n00b (>6 posts)

Posts: 4
Joined: 02/25/2013

Originally posted by: JeanDelfosse Steve, as you can see in Leonard's sample, in the basic script you refer to the task variables just by their name As another example if you have in the task three variables v1, v2 and v3 and you would sum up v1 and v2 into v3 in a basic script, it would look like this : Sub Main v3 = v1 + v2 End Sub and the result v3 will be contained in the task variable v3

 

Thank you very much!!



 Category Survey
Statistics
18258 users are registered to the AutoMate Discussion forum.
There are currently 0 users logged in.
The most users ever online was 5551 on 01/08/2018 at 11:11 AM.
There are currently 1376 guests browsing this forum, which makes a total of 1376 users using this forum.

FuseTalk Enterprise Edition v4.0 - © 1999-2020 FuseTalk Inc. All rights reserved.

Sitemap Network Automation Software Blog