WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Constants

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Sample Code to Object Browser Constants

Keywords: 	 Object Browser Constants

The following code puts up an AskItemList box, and then lists Object Browser Constants.
; Too tired for the Object Browser Constants
; another Stan-work-in-Progress
; Stan Littlefield, October 5, 2002

mainlist = StrCat( "MSAccess",@TAB,"MSWord",@TAB,"Excel",@TAB,"ADO",@TAB,"CDO",@TAB,"PDF",@TAB,"Outlook" )
choice = AskItemList( "OLE Constants - Select Category",mainlist,@TAB,@SORTED,@Single )
n      = ItemLocate( choice,mainlist,@TAB )

Switch n
   Case 1
      file = StrCat( dirget(),"ACCONST.TXT" )
      msg  = "MS Access Constants"
      break
   Case 2
      file = StrCat( dirget(),"WDCONST.TXT" )
      msg  = "MS Word Constants"
      break
   Case 3
      file = StrCat( dirget(),"XLCONST.TXT" )
      msg  = "Excel Constants"
      break
   Case 4
      file = StrCat( dirget(),"ADOCONST.TXT" )
      msg  = "ADO Constants"
      break
   Case 5
      file = StrCat( dirget(),"CDOCONST.TXT" )
      msg  = "CDO Constants"
      break
   Case 6
      file = StrCat( dirget(),"PDFCONST.TXT" )
      msg  = "PDF Constants"
      break
   Case 7
      file = StrCat( dirget(),"OLCONST.TXT" )
      msg  = "OUTLOOK Constants"
      break
    Case n
      Exit
      break

Endswitch

If ! FileExist( file ) Then Exit

msg = StrCat( msg, " - [SELECT MULTIPLE]" )
fs = FileSize( file )
b  = BinaryAlloc(fs)
BinaryRead(b, file )
BinaryReplace( b, @CRLF, @TAB, @TRUE )
n = BinaryEodGet(b)
list = BinaryPeekStr( b,0,n )
BinaryFree( b )

ButtonNames("&ToClipBoard","")
selected = AskItemList( msg,list,@TAB,@SORTED,@MULTIPLE )
selected = StrReplace( selected,@TAB,@CRLF )
ClipPut( selected )
message( "Selection Complete","Items Placed in Clipboard" )
Exit
The following zip includes all the TXT files:
askole.zip

Article ID:   W15605
File Created: 2017:08:29:11:58:42
Last Updated: 2017:08:29:11:58:42