Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
VBS login Google Finance webpage
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
moonhk  
View profile  
 More options Nov 4 2009, 3:06 pm
Newsgroups: microsoft.public.scripting.wsh
From: moonhk <moon...@gmail.com>
Date: Wed, 4 Nov 2009 07:06:31 -0800 (PST)
Local: Wed, Nov 4 2009 3:06 pm
Subject: VBS login Google Finance webpage
Hi

I want download my portfolio.
First login Google finance
https://www.google.com/accounts/ServiceLoginAuth?service=finance
Second, Change to below url
http://www.google.com/finance/portfolio?action=view&pid=4
Then Download this url

Do you know how to do step 1 and Step 2 ?

moonhkt


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tom Lavedas  
View profile  
 More options Nov 4 2009, 6:54 pm
Newsgroups: microsoft.public.scripting.wsh
From: Tom Lavedas <tglba...@cox.net>
Date: Wed, 4 Nov 2009 10:54:42 -0800 (PST)
Local: Wed, Nov 4 2009 6:54 pm
Subject: Re: VBS login Google Finance webpage
On Nov 4, 10:06 am, moonhk <moon...@gmail.com> wrote:

> Hi

> I want download my portfolio.
> First login Google financehttps://www.google.com/accounts/ServiceLoginAuth?service=finance
> Second, Change to below urlhttp://www.google.com/finance/portfolio?action=view&pid=4
> Then Download this url

> Do you know how to do step 1 and Step 2 ?

> moonhkt

I believe this will do what you want, though I suspect there is a more
direct way that does not require opening the page ...

sURL1 = "https://www.google.com/accounts/ServiceLogin?service=finance"
sURL2 = "http://www.google.com/finance/portfolio?action=view&pid=4"
sFilename = "D:\Someplace\somename.html"
with CreateObject("InternetExplorer.Application")
  .Navigate sURL1
  Do until .ReadyState = 4 : WScript.Sleep 100 : Loop
  .visible = true
  With .document.all
    .email.value = "you...@yourdomain.com"
    .passwd.value= "yourpassword" ' or Inputbox to ask the password
    .signin.click
  End With ' document
  .Navigate sURL2
  Do until .ReadyState = 4 : WScript.Sleep 100 : Loop
  sText = .document.body.outerHTML
  with createobject("scripting.filesystemobject")
     .OpenTextFile(sFilename, 2, true, true).write sText
  end with ' FSO
  .quit ' optional
End With   ' IE
_____________________
Tom Lavedas


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tom Lavedas  
View profile  
 More options Nov 4 2009, 8:28 pm
Newsgroups: microsoft.public.scripting.wsh
From: Tom Lavedas <tglba...@cox.net>
Date: Wed, 4 Nov 2009 12:28:29 -0800 (PST)
Local: Wed, Nov 4 2009 8:28 pm
Subject: Re: VBS login Google Finance webpage
On Nov 4, 1:54 pm, Tom Lavedas <tglba...@cox.net> wrote:
> On Nov 4, 10:06 am, moonhk <moon...@gmail.com> wrote:

> > Hi

> > I want download my portfolio.
> > First login Google financehttps://www.google.com/accounts/ServiceLoginAuth?service=finance
> > Second, Change to below urlhttp://www.google.com/finance/portfolio?action=view&pid=4
> > Then Download this url

> > Do you know how to do step 1 and Step 2 ?

> > moonhkt

> I believe this will do what you want, though I suspect there is a more
> direct way that does not require opening the page ...

{code snipped}

I knew there was a more direct method ...

sURL2 = "http://www.google.com/finance/portfolio?action=view&pid=4"
sFilename = "D:\Someplace\somename.html"
' Get page
sUID = "you...@yourdomain.com"
sPW  = "password"
sData = GetXml(sPage, sUID, sPW)
'now save the page to a file.
 CreateObject("Scripting.FileSystemObject")._
   OpenTextFile(FilePath, 2, True, true).Write sData

Wscript.Echo "Done"

Function GetXml(sURL, userID, Password)
 ' Create an xmlhttp object:
 With CreateObject("Microsoft.XMLHTTP")
   .open "GET", sURL, false, userID, password
   .send
   GetXml = .responseText
 End With
End Function

With later versions of IE (7+) loaded, I believe the
"Microsoft.XMLHTTP" is replaced with the "XMLHttpRequest" object
instead.
_____________________
Tom Lavedas


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
moonhk  
View profile  
 More options Nov 5 2009, 12:54 am
Newsgroups: microsoft.public.scripting.wsh
From: moonhk <moon...@gmail.com>
Date: Wed, 4 Nov 2009 16:54:44 -0800 (PST)
Local: Thurs, Nov 5 2009 12:54 am
Subject: Re: VBS login Google Finance webpage
On 11月5日, 上午4時28分, Tom Lavedas <tglba...@cox.net> wrote:

Hi Tom
Thank. it works on First VBS. Due to I does not have IE(7+). I can not
test on second vbs.

moonhkt


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joe Fawcett  
View profile  
 More options Nov 14 2009, 9:35 am
Newsgroups: microsoft.public.scripting.wsh
From: "Joe Fawcett" <joefawc...@newsgroup.nospam>
Date: Sat, 14 Nov 2009 09:35:04 -0000
Local: Sat, Nov 14 2009 9:35 am
Subject: Re: VBS login Google Finance webpage

"Tom Lavedas" <tglba...@cox.net> wrote in message

news:80c6cb8a-6a1c-48e8-8409-2b8a84739c66@a32g2000yqm.googlegroups.com...

IE7+ have both versions so you can use either. Personally I would use
msxml2.Xml.3.0 which is "all" machines and is usually better than the
original microsoft.xmlhttp. If you're running on a specific machine that you
know has the latest update then use msxml2.XmlHttp.6.0.

--

Joe Fawcett
http://joe.fawcett.name


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2010 Google