home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / C / BC_502 / SCRPTEXM.PAK / MISC.SPP < prev    next >
Encoding:
Text File  |  1997-05-06  |  822 b   |  33 lines

  1. //--------------------------------------------------------------------------
  2. // Object Scripting
  3. // Copyright (c) 1996, 1997 by Borland International, All Rights Reserved
  4. //
  5. // MISC.SPP: Miscellaneous. Miscellaneous script.
  6. //--------------------------------------------------------------------------
  7. print typeid(module());
  8.            
  9. import "kernel32.dll" {
  10.   void  Sleep  (long);
  11. }
  12.  
  13. //
  14. // Pauses execution for the given number of seconds.
  15. //
  16. Pause(seconds)
  17. {
  18.   Sleep(seconds * 1000);
  19. }
  20.  
  21. // 
  22. // Converts a fully qualified module name to its fully qualified directory name
  23. //
  24. GetModuleDir(modName){
  25.    declare String fullName(modName);
  26.    declare String dirName(fullName.SubString(0, fullName.Index("\\", SEARCH_BACKWARD) - 1));
  27.    dirName = dirName.Lower();
  28.    return dirName.Text;
  29. }
  30.  
  31.  
  32.  
  33.