Hi all,
I'm doing an experimental project at work trying to do some screen scraping so we can create reports from Hummingbird HostExplorer 7. At the moment the main problem I'm having is ensuring the Hummingbird window is actually the active window.
As you'll be able to tell from the code below, this is still very much a work in progress. If anyone can advise a better option than emulating an Alt+Tab, it'd be much appreciated!
Sub test_HummingbirdHE()
Dim HE
Dim CS
Dim Book As String
' Set HostExplorer
Book = ActiveWindow.Caption
Set HE = CreateObject("HostExplorer")
Set CS = HE.CurrentHost
' ActiveWindow.Activate
Application.SendKeys ("%{TAB}")
DoEvents
Application.SendKeys ("%(x)")
Application.Wait (Now + TimeValue("0:00:04"))
Application.SendKeys ("{F12}")
Application.Wait (Now + TimeValue("0:00:01"))
Application.SendKeys ("{ESC}")
Application.Wait (Now + TimeValue("0:00:01"))
Application.SendKeys ("A226")
Application.SendKeys ("~")
Application.Wait (Now + TimeValue("0:00:01"))
Application.SendKeys ("001")
Application.SendKeys ("DIS")
Application.SendKeys ("010101")
' Create code to convert TODAY() into ddmmyy and input string in next sendkey
Application.SendKeys (" ")
End Sub
Kind regards as always,
Peter
Bookmarks