Adeel,
The following sequence is good for the first 3 steps of your wish list:
Call RunProcess ("Client:SaveAllDocuments")
Call RunProcess ("Client:CloseAllOpenDocumentsInView")
Call RunProcess ("Client:CloseProject")Then, it should be placed in a loop to iterate through all opened databases:
For i = 1 To N
Call RunProcess ("Client:SaveAllDocuments")
Call RunProcess ("Client:CloseAllOpenDocumentsInView")
Call RunProcess ("Client:CloseProject")
Next iAnd I see 2 problems here: 1. How to know the N parameter - no way to do it with Client Basic! You may just put the number which is equal or greater than the maximum number of databases that you usually have opened. Those additional, idle passes of the loop shouldn't do any harm 2. According to my quick test - it looks like the second loop starts executing before the first one finishes to complete the task, so Protel crashes. I don't have any quick idea how to make a short pause between the loops.
Last step - close Protel:
Call RunProcess ("Client:QuitFromEdaClient")So, the "skeleton" of a macro should look like:
Sub Main
For i = 1 To N
Call RunProcess ("Client:SaveAllDocuments")
Call RunProcess ("Client:CloseAllOpenDocumentsInView")
Call RunProcess ("Client:CloseProject")
Next i
Call RunProcess ("Client:QuitFromEdaClient")
End SubWhen you have a working macro, store it in a easily accessible place (database) - it may be Templates.ddb
Then assign it to a toolbar button or a key with following Properties:
Process - Macro:RunMacro
Parameters - DesignName=C:\Program Files\Design Explorer 99 SE\System\Templates.ddb | DocumentName = Macros\SaveAllProjects.bas | Language = ClientBasic
Good luck,
Wojciech Oborski
____________________________________________________________ You are subscribed to the PEDA discussion forum
To Post messages: mailto:[email protected]
Unsubscribe and Other Options: http://techservinc.com/mailman/listinfo/peda_techservinc.com
Browse or Search Old Archives (2001-2004): http://www.mail-archive.com/[email protected]
Browse or Search Current Archives (2004-Current): http://www.mail-archive.com/[email protected]
