I use a method called WindowList which puts a list of all the Design 
Environment windows open onto the clipboard. I paste this into a method called 
_Work to keep "project" parts readily available. So, when I need to work on 
something else for a while, all the other project windows can be closed and 
opened back up later.

Basically:

WINDOW LIST($aWinRef)
ARRAY TEXT($aWinName;Size of array($aWinRef))
For ($Ndx;1;Size of array($aWinRef))
  $aWinName{$Ndx}:=Get window title($aWinRef{$Ndx})
End for 

plus a big Case statement for windows I don't want to keep, like the Explorer, 
etc. And, of course I put a comment character at the beginning of each line.


Here's the full code for anyone interested:

  // WindowList
  // Puts a list of all the Design Environment windows open onto the clipboard

C_LONGINT($Ndx)
C_TEXT($Text;$Title)
C_BOOLEAN($Add)

ARRAY LONGINT($aWinRef;0)

WINDOW LIST($aWinRef)
ARRAY TEXT($aWinName;Size of array($aWinRef))
For ($Ndx;1;Size of array($aWinRef))
$aWinName{$Ndx}:=Get window title($aWinRef{$Ndx})
End for 

SORT ARRAY($aWinName)
$Text:="` ----------- "+String(Current date;7)+" -----------"+Char(13)
For ($Ndx;1;Size of array($aWinName))
$Title:=$aWinName{$Ndx}
$Add:=False
Case of 
  // The first block is NOT added to the list of windows.
: ($Title="")
: ($Title="Custom")
: ($Title="Structure @")
: ($Title="List of tables")
: ($Title="@ - Explorer")
: ($Title="Method: aaa@")
: ($Title="Method: _@")
: ($Title="Method: .@")
: ($Title=("Method: "+Current method name))
: ($Title="Form:@")
$Title:=Replace string($Title;"]";"];\"")+"\""
$Add:=True
: ($Title="Form Method:@")
$Title:=Replace string($Title;"Form Method: ";"")
$Title:=Replace string($Title;"]";"];\"")+"\""
$Add:=True
: ($Title="Object Method:@")
$Title:=Replace string($Title;"Object Method: ";"")
$Title:=Replace string($Title;"].";"];\"")
$Title:=Replace string($Title;".";"\";")
$Add:=True
Else 
$Add:=True
End case 
If ($Add)
$Title:=Replace string($Title;"Form: ";"")
$Title:=Replace string($Title;"Method: ";"")

$Text:=$Text+"` "+$Title+Char(13)
End if 
End for 
$Text:=$Text+"` -----------------------------------"+Char(13)+Char(13)
SET TEXT TO PASTEBOARD($Text)
BEEP



-- 
   ------------------------------------------------------------------
   Tom Dillon                                           825 N. 500 W.
   DataCraft                                           Moab, UT 84532
   tomdil...@datacraft-inc.com                           720/209-6502
   ------------------------------------------------------------------
       Chasing a thing does not ensure that it's actually there.
       --- Sunastar
   ------------------------------------------------------------------


**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to