Intelligent Automation & Macro Software  

Go Back   Tethys Solutions Forums > Products Zone > Workspace Macro Pro - Automation Edition
Register FAQ Search Today's Posts Mark Forums Read

Workspace Macro Pro - Automation Edition Post messages and questions related to Macro Software for Windows Automation here.


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-29-2007, 09:24 PM
PHIL PHIL is offline
Junior Member
 
Join Date: Nov 2007
Posts: 6
Default how to select all files in a Folder

Greetings all

I am attempting to use this automation software to automate repetitive image stitching processes. Everything goes well until I get to a image file selection box and i dont know how to select all the files in the folder in a way that will work if the number of files in the folder will vary each time I run the macro. Therefore I want the macro to be able to select all files in the folder, without me having to tell it how many there are. This will load all images in that folder into the image stitching program and I think I will be ok from there.
Hope someone can help
Regards
Phil
Reply With Quote
  #2 (permalink)  
Old 11-29-2007, 11:21 PM
forumsupport forumsupport is online now
Senior Member
 
Join Date: Apr 2007
Posts: 435
Default

Hello,

Looking at your requirement, we would suggest trying our advanced automation product, Automation Anywhere 4.0, which provides you with over 100 commands to perform variety of actions. You can use 'Loop For Each file in a folder' command to perform some actions for all files in a folder. Often number of files in a folder can change. You can specify a folder and this loop will run for as many times as there are number of files in that folder. You can get the name of the file by using the System Variable $FileName$. Similarly to get the extension of the file you can use $Extension$ System variable and to get the path of the folder under which this file resides use the System Variable $CurrentDirectory$. All these system variables will return empty value when used out side this looping command.

You can find this command under Conditions/Loops command category.
Just double click on Loop command, select 'Loop For' option, 'Each file in a folder' and specify the path for folder. Now within this loop you can perform image stitching processes for particular file in a loop. The text format of your task will look something like this,

1) Start Loop " Each File in C:\ImagesFolder"
//Comment: Please enter your commands to perform image stitching processes for particular file in a loop. Use $filename$ variable for each file name in the Loop.
2) End Loop

Hope that helps.

Last edited by forumsupport : 11-30-2007 at 09:02 AM.
Reply With Quote
  #3 (permalink)  
Old 11-30-2007, 12:13 AM
PHIL PHIL is offline
Junior Member
 
Join Date: Nov 2007
Posts: 6
Default

Thanks for your reply

I want to select all image files in the folder in a single selection
And fortunately I have discovered that keystrokes “ctrl a” will do this.

However, once I have finished processing this group of images in the stitching program I will want to do the same thing with the next group of images in the next sub-folder

I could have say 100 sub folders each with its own group of images to process
And I would like to be able to do this by running a single macro

I don’t yet know how I can progressively move down all the sub folders and then end the process when I have processed the final sub folder

Any help in doing this would be much appreciated

Regards
Phil
Reply With Quote
  #4 (permalink)  
Old 11-30-2007, 09:56 AM
forumsupport forumsupport is online now
Senior Member
 
Join Date: Apr 2007
Posts: 435
Default

Hello,

What you can do is, at the end of macro insert 3 keystrokes command, first keystrokes command to go back to main folder i.e. [Backspace] key, second keystrokes command to move the cursor to next subfolder i.e. [Down Arrow] key and third keystrokes command to open selected subfolder i.e. [Enter] key. The text format of keystrokes command would look like this,

Keystrokes: [BACKSPACE] in "Currently Active Window"
Keystrokes: [DOWN ARROW] in "Currently Active Window"
Keystrokes: [Enter] in "Currently Active Window"

Set this macro to repeat for N times where N is the numbers of subfolders.
When you will run this macro, it will perform image stitching processes for all the files in current subfolder then will go back in main folder to select next subfolder and will open that particular subfolder. This process will repeat as per Repeat property setting.

Alternatively, we suggest trying our advanced automation product, Automation Anywhere 4.0, which provides you with 'Loop For Each folder in a folder' command to perform some actions for all folders in a folder. To access the folder name within the loop use the System Variable, $FolderName$.

You can find this command under Conditions/Loops command category.
Just double click on Loop command, select 'Loop For' option, 'Each folder in a folder' and specify the path for folder. The text format of your task will look something like this,

1) Start Loop " Each Folder in C:\ImagesFolder"
2) Open Folder "$CurrentDirectory$\$FolderName$"
//Comment: Insert actions to perform image stitching processes
3) End Loop

Hope that helps.
Reply With Quote
  #5 (permalink)  
Old 12-02-2007, 06:42 PM
PHIL PHIL is offline
Junior Member
 
Join Date: Nov 2007
Posts: 6
Default

I dont think I have understood the instruction about the 3 keystrokes

as I read it, backspace will move me back to the main folder,
down arrow will move me down to the next subfolder

a single down arrow will only move me to the same subfolder each time

it doesnt progressively move down the folder tree

Regards
Phil
Reply With Quote
  #6 (permalink)  
Old 12-05-2007, 09:01 AM
forumsupport forumsupport is online now
Senior Member
 
Join Date: Apr 2007
Posts: 435
Default

Hello,

The keystrokes series that we provided is just an example. You will have to figure out the keystrokes series (According to your configuration) to move the cursor to next subfolder. All you have to do is, at the end of macro you have to move the cursor to next sub-folder so that on next repeat the macro can perform actions on it. If you need to press one more down arrow key to move on to next sub-folder then insert one more ‘Insert Keystrokes’ command for Down arrow.

Hope that helps.

Last edited by forumsupport : 12-09-2007 at 08:08 PM.
Reply With Quote
  #7 (permalink)  
Old 12-08-2007, 03:43 AM
PHIL PHIL is offline
Junior Member
 
Join Date: Nov 2007
Posts: 6
Default

Hi
what I have done is produce a main macro that does the stitching and another macro that navigates to the next subfolder, however I have had to produce 30 different versions of this small navigation macro each with a different number of [down arrow] commands because I have 30 subfolders in this project.
I have put them all together in their correct sequence in a parent macro and it works well, but I wonder if there is a better way within the functionality of macro pro.

Regards
Phil
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

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



All times are GMT -7. The time now is 05:33 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.0.0 ©2007, Crawlability, Inc.
Copyright © 2003-2008 Tethys Solutions, LLC. All rights reserved