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: Problems with "Get Clipboard"
Topic Summary: "Get Clipboard" fails, but is storing the value?
Created On: 04/17/2012 08:09 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.
 04/17/2012 08:09 PM
User is offline View Users Profile Print this message

Author Icon
ChrisJacks
Apprentice (20-49)

Posts: 41
Joined: 08/27/2006

Hi all,

I am currently having issues using the "Get Clipboard" function. See attached code.

In the Output tab, I get the following error...

Starting Get Clipboard contents into the variable "streamnumber"...
Cannot populate the variable "streamnumber".
Finished Get Clipboard contents.

Strangely enough though, in the Variables tab, I can see the variable "streamnumber" populated with the clipboard contents as expected!

I can also manually go into notepad and paste the text.

Is there a way to fix this WITHOUT using "continue on error"?

Thanks guys!

 Category Survey



Task Steps: (Right click, Select All, Copy to copy to the clipboard. Steps can then be pasted into the AutoMate Task Builder)
 04/17/2012 09:43 PM
User is offline View Users Profile Print this message

Author Icon
ChrisJacks
Apprentice (20-49)

Posts: 41
Joined: 08/27/2006

Nevermind, I found the solution.

The error was a "red herring" as they say.

The problem was actually caused by creating the variable named "new".


Even though it wasn't being used at this point in the code, having a variable with this name was obviously confusing Automate.

Presumably it's a reserved word, but doesn't know how to properly trap for this error.

Regardless, the solution was to rename the variable.

...and Robert's your father's brother!



 Category Survey
 04/17/2012 11:10 PM
User is offline View Users Profile Print this message

Author Icon
JeanDelfosse
Supreme Guru (1000+)

Posts: 8883
Joined: 03/30/2005

Chris,
indeed Automate 6 is not properly checking reserved names for variables.
Later versions of Automate have introduced better checking in that respect.

A mnemonic way if you are familiar with basic scripting is to avoid any variable name that sounds like a basic script keyword/statement/function like New, Public, Dim, Line, Input, FileLen, Month, Name, etc

 Category Survey
AutoMate 6 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


Edited: 04/17/2012 at 11:16 PM by JeanDelfosse
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 1372 guests browsing this forum, which makes a total of 1372 users using this forum.

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

Sitemap Network Automation Software Blog