![]() |
| |||||||
Workspace Macro Pro - Automation Edition Post messages and questions related to Macro Software for Windows Automation here. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| |||
| 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 |
| |||
| 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. |
| |||
| 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 |
| |||
| 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. |
| |||
| 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 |
| |||
| 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. |
| |||
| 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 |