Title: Message

Sorry.  This is an old page that “snuck” into the documentation.  The object formats talked about here are kind of passé.  Other examples in the documentation are better such as our staples.com example:

 

Sub Script()

Dim Item As String

Dim Quantity As String

 

    ' learned script modified to enter items in file orders.txt

 

    Go_ "staples.com"

    Click "Quick Order by Item<A>@Staples.com:"

    Open App.Path & "\orders.txt" For Input As 1

    While Not EOF(1)

        Input #1, Item, Quantity

        Text("<INPUT>#text1#") = Item

        Text("<INPUT>#text1#") = Quantity

    Wend

    Close 1

    Click "Add To Cart<INPUT>[EMAIL PROTECTED] Online Catalog"

    Click "Clear Cart<INPUT>[EMAIL PROTECTED] Cart"

    Pause "Is Empty<B>@View Cart"

End Sub

 

Rich McNeil

Boston Software Systems

866 653 5105

www.bostonworkstation.com


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dutcher, John
Sent: Tuesday, November 09, 2004 6:15 AM
To: '[EMAIL PROTECTED]'
Subject: [Talk] Using the web/browser object....

 

The brief script below is copied and pasted from the Online Docs.

 

It delivers a compile error on the first line:

 

    "User defined type not defined"

 

Anyone know what is missing  ??

***************************************************************************

Dim Web as CWebBrowser   'Note 1  <----------compile error here

 

Sub Script()
    On Error GoTo scripterrors 'Note 3

 

    Set Web = WBConnect  'Note 2

 

    ' start script commands here   <-------my script code is here

 

    Exit Sub
scripterrors:
    If Err = seDoevents Then DoEvents: Resume 'Note 4
    If Err = seTimeout Then Web.Note = "Timeout" 'Note 5
    If Err = seHalt Then Web.Note = "Halted" 'Note 6
    Err.Raise Err
End Sub

 

 

Reply via email to