Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Web Site input and output

Status
Not open for further replies.

deboe

Technical User
Sep 28, 2006
18
US
I have a process in which i have a list of items that I would like to add to a website for searching purposes.

I would like to pull up the website and attach the text into the search area from excel and pull off the results and put back into excel document.

All of this information is coming from attachmate but I already know how to pull the information from there.

Example:

xxdsx
smplx
eeslr

This is what I pulled off of attachmate
 
Here is a little code I use to do something similar....
I think this is what your intending to do.

'--------------------------------------------------------------------------------
' This macro was created by Christadelphian
' Session Document: "CSS.EDP"
' Date: Saturday, January 19, 2008
'
'--------------------------------------------------------------------------------

' Global variable declarations
Global g_HostSettleTime%
Global g_szPassword$

Sub Main()

'--------------------------------------------------------------------------------
Dim Explorer As Object
Dim Sess0 As Object
Dim Sys As Object
Dim Sessions As Object
Dim System As Object

Dim result As String
Dim surname As String
Dim ouc As String
Dim JobNo As String
Dim UserId As String

SessName0$ = "CSS.Edp"

Set System = CreateObject("EXTRA.System") ' Gets the system object
If (System is Nothing) Then
Msgbox "Could not create the EXTRA System object. Stopping macro playback."
STOP
End If
Set Sessions = System.Sessions

If (Sessions is Nothing) Then
Msgbox "Could not create the Sessions collection object. Stopping macro playback."
STOP
End If
'--------------------------------------------------------------------------------
' Set the default wait timeout value
g_HostSettleTime = 30 ' milliseconds

OldSystemTimeout& = System.TimeoutValue
If (g_HostSettleTime > OldSystemTimeout) Then
System.TimeoutValue = g_HostSettleTime
End If

' Get the necessary Session Object
Set Sess0 = System.ActiveSession
If (Sess0 is Nothing) Then
Msgbox "Could not create the Session object. Stopping macro playback."
STOP
End If

If Not Sess0.Visible Then Sess0.Visible = TRUE
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)

'---------------------------------------------------------------------------------
'Read Job Number To Revert Extra! Back To
JobNo = Sess0.Screen.GetString(4, 62, 9)
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)

If JobNo ="" Then
MsgBox "You must Be Within The DAP screen For this to Return you to your current job"
End If

'Stores User Id For Later Use
Sess0.Screen.Copy
Sess0.Screen.Sendkeys("<Reset><Home>zdud<Enter>") ' Navigates to User Details
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
Sess0.Screen.Paste
Sess0.Screen.Sendkeys("<Enter>")
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)

'Initialise Internet Explorer Application
Set Explorer = CreateObject("InternetExplorer.Application")

With Explorer
.Visible = False
.Navigate "the_address_for_the_page_you wish_to_search_on_goes_here.html"
End With

If (Explorer is Nothing) Then
Msgbox "Could not create the IE object. Stopping Program."
STOP
End If

'Populates the necessary variables from Extra!

' Read Surname From Extra!
surname = Sess0.Screen.GetString(12, 25, 8)
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)

' Read OUC From Extra!
ouc = Sess0.Screen.GetString(13, 25, 6)
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)

Sess0.Screen.Sendkeys("<Reset><Home>DAP<Tab>")
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
Sess0.Screen.Sendkeys(JobNo)
Sess0.Screen.Sendkeys("<Enter>")
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)

Explorer.Document.Forms.surname.Value = surname
Explorer.Document.Forms.org_unit.Value = ouc

Explorer.Visible = True
Explorer.Document.Forms.submit

System.TimeoutValue = OldSystemTimeout

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top