![]() |
| |||||||
Workspace Macro Pro - Automation Edition Post messages and questions related to Macro Software for Windows Automation here. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| |||
| Hi, In your example, there is a brief description about running Macro for all files in a folder. 1. If I have to repeat the macro in the first file for 1000s times, how can I record it and use it for next file in the folder ? 2. How to give a new name for the results of the first file and save it, then move onto next file in the folder and do so, on and on. thanks, |
| |||
| Hello PeterKem, What you need to do is record a macro that does your action once and then uses the Repeat property of the macro to repeat is 1000 times since it is the same action. Since you want to repeat this for each file in a folder then I would recommend you to try our advanced automation product, Automation Anywhere that has a command to Loop through Each File in a Folder. So you can do something as follows Loop through each file in a folder Open File $CurrentDirectory$\$Filename$.$Extension$ Run Task A.atmn (Repeat it 1000 times) Close Window (Microsoft Excel*) End Loop Automation Anywhere also supports Wild card characters in the commands. You can download the FREE trial of Automation Anywhere from http://www.tethyssolutions.com/automation-software.htm Here is an online sample task that explains the use of Loop for each file in a folder http://www.tethyssolutions.com/T40.htm |
| |||
| Depending on your particular application software, this can be accomplished using Workspace Macro fairly easily. I have used the following method on quite a few occasions, saving a LOT of time updating hundreds of CAD drawing Title Blocks in a given directory using BENTLY's Microstation software....without even being present. Also for PLOTTING drawings where a program does not have a 'Batch Plot' procedure. In fact, without programming, it was ONLY by a combination of Macros WITHIN Microstation AND Workspace Macro that the result I needed was at all possible! Microstation remembers the directory you were last in AND highlights, in a Windows Explorer dialog box, the file that you last opened. BUT, if you try to open a new file, the Microstation Macro ends and cannot continue. To be successful in what I needed, the Workspace Macro keystroke macro was this....... [CTRL O] (opens the Windows Explorer dialog box with the current entry highlighted) [CURSOR DOWN] (selects next file) [ENTER] (opens next drawing) [Click the Title Bar of the program you are using] (to give it back 'focus') [your chosen commands, mouse and keystrokes] (either carries out the process you want, or spawns a Macro WITHIN the program you are using, to achieve the change you want) Then it is just a matter of counting the files in the directory, and having Workspace Macro repeat the process over the entire directory. PS If you're using this to PLOT drawings, make sure the printer has enough paper loaded ![]() |