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 05-25-2009, 06:54 AM
trentonponder trentonponder is offline
Senior Member
 
Join Date: Jan 2009
Posts: 102
Default Use Variables in 'String Manipulation' for 'Occurence'

I'm having difficulty with a particular web extraction that is not in a table.

The results appear as follows on the website:

Bob is a child
Bob is a child
Bob is a child

I want to extract each line into a separate Excel row. Normally, I can do this pretty easily by looping through an HTML table, but this is not a table. My solution was to save to Clipboard and then use String Manipulation to save the data to a variable and then set the Excel cell with that variable.

However, there can be up to 100 lines and under 'occurrence' you cannot use variables or I would be able to use a list variable to loop through 1-100 times. Instead I have to copy/paste the code 100 times and use Error Handling to make sure it works.

Is there a better way?
Reply With Quote
  #2 (permalink)  
Old 05-27-2009, 01:27 PM
forumsupport forumsupport is offline
Senior Member
 
Join Date: Apr 2007
Posts: 1,342
Default

Hello,

You can convert Enter key into a variable and use that variable in String Manipulation command to get the data in each row. We have attached a sample task for your reference. To run this task,

. Please copy it under location, 'C:\...\My Documents\Automation Anywhere\Automation Anywhere\My Tasks' folder.
.Copy sample.txt under c:\.
. Before you replace Variables.dat file, exit from Automation Anywhere completely even from system tray. Clicking on cross (X) button does not exit from Automation Anywhere completely; it is still running in system tray. To exit from system tray, right click on Automation Anywhere icon, select Exit from context menu. Now, overwrite Variables.dat file located under, 'C:\...\My Documents\Automation Anywhere\' folder.

Hope that helps.
Attached Files
File Type: zip sample.zip (1.0 KB, 7 views)
Reply With Quote
  #3 (permalink)  
Old 05-27-2009, 02:16 PM
trentonponder trentonponder is offline
Senior Member
 
Join Date: Jan 2009
Posts: 102
Default

Quote:
Originally Posted by forumsupport View Post
Hello,

You can convert Enter key into a variable and use that variable in String Manipulation command to get the data in each row. We have attached a sample task for your reference. To run this task,

. Please copy it under location, 'C:\...\My Documents\Automation Anywhere\Automation Anywhere\My Tasks' folder.
.Copy sample.txt under c:\.
. Before you replace Variables.dat file, exit from Automation Anywhere completely even from system tray. Clicking on cross (X) button does not exit from Automation Anywhere completely; it is still running in system tray. To exit from system tray, right click on Automation Anywhere icon, select Exit from context menu. Now, overwrite Variables.dat file located under, 'C:\...\My Documents\Automation Anywhere\' folder.

Hope that helps.
I don't understand how this works. How do you convert the Enter key into a variable? Is it a system variable? The Enter key is not text in the Clipboard so how does the task pull the data just up until that point?
Reply With Quote
  #4 (permalink)  
Old 05-27-2009, 04:04 PM
forumsupport forumsupport is offline
Senior Member
 
Join Date: Apr 2007
Posts: 1,342
Default

Hello,

To create $enterkey$ variable, please follow below mentioned steps.

. Go to Tools->Task Editor.
. Double click on 'Insert Keystrokes' command.
. From 'Select Window' dropdown in 'Insert Keystrokes' window select 'Currently Active Window'.
. Insert [Enter] from special keystrokes.
. Save the command.
. Now, right click on this command and select 'Convert to Variable' from context menu.
. In 'Convert to a Variable' window specify variable name, enterkey and eventually hit save button.

You are done!
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 04:52 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