From: rob^_^ on
Document.body.outerHTML returns the head block as well.

"AvWG" <dretrain(a)hotmail.com> wrote in message
news:263af$4af6a406$5352a1ff$29878(a)cache4.tilbu1.nb.home.nl...
> Hi,
>
> With vbscript I.ve created the following:
> I start the IE-application, use sendkeys to login in on a site. Next I
> create 10 more tabs (internet-pages), each with slightly another address.
> When this is done I want to go to the 2nd tab, save the source information
> and do this for the rest of the 9 remaining tabs....
>
> The problem is: I can't get the focus off the first (login) tab. Though I
> can go to the next tab with sendkeys :-( , the html-source I want to
> review is still of the first tab...
>
> Manually I can click on the tabs and get the source. But first this time
> consuming and second I want to read many more internetpages/tabs then the
> 10 I mentioned.
>
> So is there a vbscript-"command" to switch to other tabs?
>
> Part of the script:
> Set oIE = CreateObject("InternetExplorer.Application") ', "oIE_")
> oIE.Visible = True
> oIE.FullScreen = False
>
> 'open a new window
> oIE.Navigate2 aLinks(0)
> Do While oIE.Busy
> WScript.Sleep 50
> Loop
>
> 'open url In new tab
> Logon() ' My own logon subroutine
>
> WScript.Sleep 2000
> For J=1 To 9
> oIE.Navigate2 aLinks(J), navOpenInBackgroundTab 'navOpenInNewTab '
> Do While oIE.Busy
> WScript.Sleep 50
> Loop
> WScript.Sleep 3000
> Next
>
> WshShell.SendKeys "^{TAB}" 'go to the 2nd tab
> WScript.Sleep 100
> on error goto 0
>
> WScript.Sleep 2000
> WScript.Echo "***********************************************************"
>
>
> Here I used code as
> oIE.Document.body.innerHTML
> or
> Set oHTML = CreateObject("Microsoft.XMLHTTP")
> oHTML.open "GET" , sURL, True
>
> Does anybody have suggestions how to stear between the tabs?
>
> I hope so,
>
> Andr�
>
>
From: AvWG on
Hi Rob,

This method is new to me. Have already tested it. It gives met HTML code but
not of the page I want...

Still thanks,

Andr�

"rob^_^" <iecustomizer(a)hotmail.com> schreef in bericht
news:eUGwKXKYKHA.4452(a)TK2MSFTNGP04.phx.gbl...
> Document.body.outerHTML returns the head block as well.
>
> "AvWG" <dretrain(a)hotmail.com> wrote in message
> news:263af$4af6a406$5352a1ff$29878(a)cache4.tilbu1.nb.home.nl...
>> Hi,
>>
>> With vbscript I.ve created the following:
>> I start the IE-application, use sendkeys to login in on a site. Next I
>> create 10 more tabs (internet-pages), each with slightly another address.
>> When this is done I want to go to the 2nd tab, save the source
>> information and do this for the rest of the 9 remaining tabs....
>>
>> The problem is: I can't get the focus off the first (login) tab. Though I
>> can go to the next tab with sendkeys :-( , the html-source I want to
>> review is still of the first tab...
>>
>> Manually I can click on the tabs and get the source. But first this time
>> consuming and second I want to read many more internetpages/tabs then the
>> 10 I mentioned.
>>
>> So is there a vbscript-"command" to switch to other tabs?
>>
>> Part of the script:
>> Set oIE = CreateObject("InternetExplorer.Application") ', "oIE_")
>> oIE.Visible = True
>> oIE.FullScreen = False
>>
>> 'open a new window
>> oIE.Navigate2 aLinks(0)
>> Do While oIE.Busy
>> WScript.Sleep 50
>> Loop
>>
>> 'open url In new tab
>> Logon() ' My own logon subroutine
>>
>> WScript.Sleep 2000
>> For J=1 To 9
>> oIE.Navigate2 aLinks(J), navOpenInBackgroundTab 'navOpenInNewTab
>> '
>> Do While oIE.Busy
>> WScript.Sleep 50
>> Loop
>> WScript.Sleep 3000
>> Next
>>
>> WshShell.SendKeys "^{TAB}" 'go to the 2nd tab
>> WScript.Sleep 100
>> on error goto 0
>>
>> WScript.Sleep 2000
>> WScript.Echo
>> "***********************************************************"
>>
>>
>> Here I used code as
>> oIE.Document.body.innerHTML
>> or
>> Set oHTML = CreateObject("Microsoft.XMLHTTP")
>> oHTML.open "GET" , sURL, True
>>
>> Does anybody have suggestions how to stear between the tabs?
>>
>> I hope so,
>>
>> Andr�
>>
>>


From: Robert Aldwinckle on

"AvWG" <dretrain(a)hotmail.com> wrote in message news:7bebb$4af6eb13$5352a1ff$12218(a)cache1.tilbu1.nb.home.nl...
> Hi Robert,
>
> Thank you for your quick response.
>
> I used sendkeys but it seemed not to change the focus......


Did you put a waitfor in after it? ; )


>
> My expections were more into IE-object methods/properties and /or IE.Document methods/properties. I am looking for some answers
> that don't use the sendkey construction, but more like oIE.Tab(x).SetFocus and oIE.Tab(x).GetSource.....
>
> For now they only exist in my imagination.


For everyone I suspect. Unless there has been something added to IE8
to support tabs by an API my understanding is that tabs are strictly the
end users choice of presentation for multiple windows. I.e., a web site
author should neither know nor care if there are tabs or windows or,
if tabs, how they relate to each other (e.g. using the options I mentioned.)
Hence, the only way that you could control such presentation would be
by simulating keystrokes which you knew to be the most reliable in either
case.

BTW the IE General NG is not the best forum for discussing workarounds
for this limitation. I suggest you try the MSDN forum for IE web development
instead.


Robert
---


From: mr_unreliable on
AvWG wrote:
> With vbscript I.ve created the following:
> I start the IE-application, use sendkeys to login in on a site. Next I
> create 10 more tabs (internet-pages), each with slightly another address.
> When this is done I want to go to the 2nd tab, save the source information
> and do this for the rest of the 9 remaining tabs....
>

hi AvWG,

Unless you are using microsoft's tab control (with its own
methods and properties), then you will have to "roll-yer-own"
tab control. There are several examples of how to do this
via html/dhtml posted on the web. Lets say you decide to
implement your own tab control using a series of (html) buttons.
In that case, you can select the tab you want using a
button.click statement.

I have attached a script which shows a row of "made-up" tabs,
which is just a row of buttons. The trick here is in how you
"decorate" the buttons. I found the underlying tab control code
on the web, but can't remember where I found it (sorry if the
real author is lurking out there). Anyway, if you decide to do
something like this, you can see what it would take to "click-
a-tab".

Beyond that, if you just want to open a series of webpages
one-at-a-time, then I agree with mayayana -- you don't need
any tabs to do that...

cheers, jw
____________________________________________________________

You got questions? WE GOT ANSWERS!!! ..(but, no guarantee
the answers will be applicable to the questions)

p.s. Achtung Vorsicht! If you decide to try out the attached
script (er, I mean hta) then you will discover that it is not
fully debugged, and was only taken to the "proof-of-concept"
point. If you dismiss the error dialogs, you should get a
working "tab control". Also, don't get too annoyed with the
comments promising to show a "fake status bar" -- that isn't
there. I used another script as a template but didn't clean
up the comments. Sorry about that.

Note also, the extensions of the "hta" file and the accompanying
"css" file were changed to "txt", to avoid having any nasty AV
software from screening them out as "malicious" scripts.
From: AvWG on
Hi Robert,

Yes I used a waitfor... and yes I will look outside this Group

Tnx for your explanation, very clear!

Andr�

"Robert Aldwinckle" <robald(a)techemail.com> schreef in bericht
news:eSo3o5UYKHA.4688(a)TK2MSFTNGP06.phx.gbl...
>
> "AvWG" <dretrain(a)hotmail.com> wrote in message
> news:7bebb$4af6eb13$5352a1ff$12218(a)cache1.tilbu1.nb.home.nl...
>> Hi Robert,
>>
>> Thank you for your quick response.
>>
>> I used sendkeys but it seemed not to change the focus......
>
>
> Did you put a waitfor in after it? ; )
>
>
>>
>> My expections were more into IE-object methods/properties and /or
>> IE.Document methods/properties. I am looking for some answers that don't
>> use the sendkey construction, but more like oIE.Tab(x).SetFocus and
>> oIE.Tab(x).GetSource.....
>>
>> For now they only exist in my imagination.
>
>
> For everyone I suspect. Unless there has been something added to IE8
> to support tabs by an API my understanding is that tabs are strictly the
> end users choice of presentation for multiple windows. I.e., a web site
> author should neither know nor care if there are tabs or windows or,
> if tabs, how they relate to each other (e.g. using the options I
> mentioned.)
> Hence, the only way that you could control such presentation would be
> by simulating keystrokes which you knew to be the most reliable in either
> case.
>
> BTW the IE General NG is not the best forum for discussing workarounds
> for this limitation. I suggest you try the MSDN forum for IE web
> development
> instead.
>
>
> Robert
> ---
>
>


First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4
Prev: Script
Next: Script for IBM AS/400 session keystrokes