home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 67 / IOPROG_67A.ISO / soft / Tools / mwsppv4.exe / SETVSSPATH.SCRIPT < prev    next >
Encoding:
Text File  |  2001-06-28  |  799 b   |  41 lines

  1. !!Script
  2.  
  3. var gOutput     = getOutput();
  4. var gVssMapFile = getMapFile( "vss.map" );
  5.  
  6. function DoCommand()
  7. {
  8.     var project = getCurrentProject();
  9.     
  10.     if ( project )
  11.     {
  12.         var vssPath = "";
  13.         
  14.         // Check for location of SS.exe
  15.         var vssExe = gVssMapFile.lookup( "vssPath", "" );
  16.         
  17.         if ( vssExe.length == 0 )
  18.         {
  19.             vssExe = chooseFile( "Choose the location of ss.exe", "SourceSafe Executable", "ss.exe" );
  20.             
  21.             if ( vssExe )
  22.             {
  23.                 gVssMapFile.add( "vssPath", vssExe.path );
  24.                 project.setProperty( "vssPath", vssExe.path );
  25.                 setGlobal( "vssPath", vssExe.path );
  26.             }
  27.         }
  28.         else
  29.         {
  30.             gOutput.writeLine( "vssPath is already defined. Path:"+vssExe );
  31.         }
  32.     }
  33.     else
  34.     {
  35.         alert( "A project must be open before you can use this command." );
  36.     }
  37. }
  38.  
  39. !!/Script
  40.  
  41.