HP3000-L Archives

June 2001, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Joe Silagi <[log in to unmask]>
Reply To:
Joe Silagi <[log in to unmask]>
Date:
Mon, 18 Jun 2001 16:15:57 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (63 lines)
Hi John,

Here is a little RB script that will do what you want.  Note: this is just a
sample.  At a minimum error handling should be added for real use.

HTH,
Joe Silagi
WRQ, Inc.


Sub Main
 Begin Dialog UserDialog 280, 62
  Caption "File Upload"
  Text 4, 3, 79, 11, "Default filename", .label1
  TextBox  4, 14, 193, 14, .textBox1
  ButtonGroup .buttons
  Button 29, 34, 45, 14, "Upload", .buttonUpload
  Button 208, 14, 45, 14, "Browse", .buttonBrowse
  CancelButton 104, 35, 45, 14, .cancelButton
 End Dialog

Dim db         As UserDialog
Dim inFilename As String
Dim selection  As Integer

 inFilename = "myfile"
    Do While True
     db.textbox1=inFilename
  selection = Dialog(db)
  If selection = 2 Then 'browse
   inFilename = Application.GetOpenFilename("anyfile (*.*),*.*", 1,"Name of
file to upload")
  End If
  If selection = 1 Then   'upload
   inFilename = db.textBox1
   application.WRQSendFile inFilename, "", rcASCII, rcAskUser
  End If
  If selection = 0 Then 'cancel
   Exit Do
  End If
 Loop

End Sub


"John Pollard" <[log in to unmask]> wrote in message
news:9gdb4v$4rv$1@slb6.atl.mindspring.net...
> I am writing a script to upload a file to the HP.  I would like the user
> to choose the file, but I would like to present them with a default file
> name since I have a high probability of knowing what file they will be
> uploading.  I have Reflection for HP, v6.0 and I am looking at the
> GetOpenFileName method but I can not see anyway to supply a default file
> name.  Is there any way to do this?  Other methods?  Other versions of
> Reflection?  Other?
>
> --
> Remove "nixthespam." to reply
>
>

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2