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 06-02-2007, 11:38 AM
PeterKem PeterKem is offline
Junior Member
 
Join Date: Jun 2007
Posts: 6
Default Run macro for all files in a folder

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,
Reply With Quote
  #2 (permalink)  
Old 06-02-2007, 06:19 PM
forumsupport forumsupport is offline
Senior Member
 
Join Date: Apr 2007
Posts: 524
Default

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
Reply With Quote
  #3 (permalink)  
Old 07-09-2007, 02:31 PM
razzaq1 razzaq1 is offline
Junior Member
 
Join Date: Jul 2007
Posts: 1
Talking

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
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 12:36 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