Re: Any Help to get me started would be appreciated.....

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Anthony;
Any thoughts on the information I posted in my last response? As you
mentioned maybe the what I'm trying to accomplish is not do able, it
just seem rather straight forward other than the site requiring a login
issue.

Dave

dave wrote:
Anthony;
I went to the site and was not logged in as it will have a note at the
top "Welcome Dave M....." so I log on with my user name and password
and checked the box "Remeber my Logon". Then I closed all browsers
(IE), waited a few mintues then went to my favorites and selected the
site (http://www.betterinvesting.org/). When it came up I was already
logged in with my Welcome message and name in the page. I then closed
the broswer and restarted my PC. When booted up I went back to the
site and was still logged in. By the way when I am logged in the page
does allow you to "log out" by clicking on that selection which I do
not select. Instead I just close the browser.

Based on this is their a way I can get a srcipt to run that I describe
in the earlier posts and not need a log in sequence?

thanks for your time and help
Dave

Anthony Jones wrote:
"dave" <markie@xxxxxxxx> wrote in message
news:1149246399.369191.74600@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Thanks anthony. I can understand this forbiden response if it was
someone besides me running this script from another PC but can this not
work if I run this on my PC? as whenever I go to the site it already
recognizes me and gives me access to the site without having to log in
again. It seems to remeber me (cookies?) from my previous access. Now
if I'm on the site and I select "log out" I will have to log in next
time I come to the site.

Can I not run a script given this situation without being blocked out?

It's difficult to diagnose without understanding how the site achieves it's
logon security.

The login you describe could be acheived by couple of different mechanisms
OFTOMH.

First though can I confirm that you can visit the site, logon then close all
browsers windows.
Then return to the site and find yourself still logged on? That would be an
unusual scenario.

I suspect that what you will find is that you can navigate away from the
site and return to it still logged in to it because it'll be using a session
cookie. However a VBS script will run it's own process and not be able to
make use of the session cookie (since they are limited in scope to the
process that received them).

Anthony.




Anthony Jones wrote:
"dave" <markie@xxxxxxxx> wrote in message
news:1147655806.532865.187630@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
JW;
Thanks for this. I think ripping dilbert is harder than what I have
so
maybe this will help a little. You see the site I'm working from is
part of a subsciber service that requires a password, etc so giving
you
the specific URL's is not going to help since I can get you to the
site. I will however describe the steps I have to go through. If I
can use a txt file to read the stock symbol (that's what it is not
reciepes) then the data that I would normally get will be saved as a
txt file for that symbol. Then the program would sequence to the next
symbol, retrieve the data and save it as a txt file with the stock
symbol as the file name. So here is the sequence I have to manually
complete.....

1. I am logged in to the site at the following URL
"http://www.betterinvesting.org/";.

The above is the main problem. The rest is a piece of cake. E.g:-


Option Explicit

Dim oXMLHTTP
Dim oStream

Set oXMLHTTP = CreateObject("MSXML2.XMLHTTP.3.0")

oXMLHTTP.Open "GET", "http://www.betterinvesting.org/ssg/XYZ/";. ",
False
oXMLHTTP.Send

If oXMLHTTP.Status = 200 Then
Set oStream = CreateObject("ADODB.Stream")
oStream.Open
oStream.Type = 1
oStream.Write oXMLHTTP.responseBody
oStream.SaveToFile "g:\temp\xyz.ssg"
oStream.Close
End If


However this is going to give you the forbidden response. You will need
to
spoof the cookies, headers or whatever else the site uses for security.
I
would hope that this is impossible but I guess it's probably only very
difficult.




2. A text box allows me to enter a stock symbol (say stock xyz) and
once I enter it I click on the "Go" command button.
3. This this takes me to the following


"http://www.betterinvesting.org/stocks/tools/report.html?ticker=xyz&x=12&y=8
".
You will note the xyz ticker symbol imbedded into the URL. That ticker
symbol is what I want to pull from my ticker symbol txt file which may
have 20 or 30 symbols in it.
4. This page allows me to select from a variety of commands/links
(Get
data, Print, etc) for this particular stock symbol. The one I use is
a
link called "Get Data"
5. Once I select this a Windows File Download window appears and shows
the file name I will be getting and the url it will find it at. In
this case the URL happens to be
"http://www.betterinvesting.org/ssg/XYZ";. The file name in the
download window is XYZ.ssg.
6. I select "Save" (not open) from the download window which opens a
"Save As" Window form where I select the folder to save it in. Let's
use C:\mydocs\Stock Symbols\ as the location.
7. Once it's saved I am back at step #1 where i then enter another
symbol. This is where I'd like it to read the next symbol from a txt
file of symbols and use parsing and string manipulation to create the
proper URL the next steps.

So, what do you think? Is this doable? It seems easier than the code
you already supplied although I'm not sure. If you can supply me with
a start on this I'm sure I could trial and error my way through it.
If
it's too much work then I understand and still appreciate the time you
spent with me on this little task.

Thanks
Dave



.



Relevant Pages

  • Re: Any Help to get me started would be appreciated.....
    ... Can I not run a script given this situation without being blocked out? ... make use of the session cookie (since they are limited in scope to the ... Dim oStream ... Once I select this a Windows File Download window appears and shows ...
    (microsoft.public.scripting.vbscript)
  • Re: Any Help to get me started would be appreciated.....
    ... Can I not run a script given this situation without being blocked out? ... make use of the session cookie (since they are limited in scope to the ... Then the program would sequence to the next ... Once I select this a Windows File Download window appears and shows ...
    (microsoft.public.scripting.vbscript)
  • Re: Any Help to get me started would be appreciated.....
    ... Thanks anthony. ... I can understand this forbiden response if it was ... Can I not run a script given this situation without being blocked out? ... Once I select this a Windows File Download window appears and shows ...
    (microsoft.public.scripting.vbscript)
  • Safari 3 bug
    ... Apparently Safari 3's download window doesn't have access to the cookie ... I tried this morning to paste a URL to some subscription content (I ...
    (comp.sys.mac.apps)
  • run perl cgi script
    ... a download window appears instead of returning the result. ... see mod_cgi by greping the output of apache2ctl -l, ... why the script can't run? ...
    (Debian-User)