home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Ask a Tech Support Question (free)!

Stock Quotes Script

Reply
Get bargains at  »  Dealighted.com
 
Thread Tools Search this Thread
Currently Active Users: 1822
Discussions: 200,902, Posts: 2,378,838, Members: 246,268
Old July 3rd, 2009, 08:07 AM   Digg it!   #1 (permalink)
Junior Member
 
Join Date: Jul 2009
Posts: 2
Stock Quotes Script

I don't understand anything about variables in VBScripts so I ask help.
Two years ago someone made a script for me that worked fine until now, as the website I got the quotes from moved the table.
This is the URL : IEX.NL: van beleggers, voor beleggers -columns, realtime koersen, nieuws, forums,agenda en meer-. Beleggen aandelen, beurs, AEX
There you see a (Streaming Realtime) block in which the quotes are presented. Those quotes I want to write to a textfile at a fixed timeinterval one after the other to read it in my analysing spreadsheet.
This is the script I used until now and I hope someone will make changes sothat it works again.
>
>
>
On Error Resume Next
Const ForReading=1, ForWriting=2, ForAppending=8
' Assign the table's contents to a variable.
Do While Hour(now) < 18
Dim objXMLHTTP, xml, Dat, Tm, Vm, Trd, Td, f, fso

Set xml = CreateObject("Microsoft.XMLHTTP")
xml.Open "GET", "http://www.iex.nl/webService/tbmTrades.aspx?Id=12272", False
xml.Send
pgcode = xml.responseText
Set xml = Nothing

' Break the variable up into peices based on html tags.
Dat = Split(pgcode, "<td align='right'>")
Tm = Split(Dat(1), "</td>")
Vm = Split(Dat(2), "</td>")
Trd = Split(Dat(3), "</td>")
Td = Replace(Trd(0), ",", ".")

' Create a text file with today's date as the name & write the data we are interested in to the text file.
Dy = Day(now)
If Dy < 10 Then Dy = "0" & Dy
Mn = Month(now)
If Mn < 10 Then Mn = "0" & Mn
Yr = Year(now)
Fn = "C:\Program Files\vtplus\s\vtplus\1min.txt"
Set fso=CreateObject("Scripting.FileSystemObject")
Set f=fso.OpenTextFile(Fn,ForAppending,True)
f.Write Tm(0) & "," & Vm (0) & "," & Td & vbCrLf
f.Close

Wscript.sleep 60000
Loop
wedeje is offline   Reply With Quote
Old July 31st, 2009, 08:09 AM     #2 (permalink)
Junior Member
 
Join Date: Jul 2009
Posts: 2
Good Hint

Thanks for showing me new roads to follow.

These are all Java Stuff , another scripting lanquage that I don't speak.
I will dive into it and see if there is something usable for me.

Thanks , Wim
wedeje is offline   Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar Threads
Thread Thread Starter Forum Replies Last Post
Football Quotes Masuk46 IMO Community 9 September 14th, 2005 01:49 AM
Best Movie Quotes RedFury IMO Community 78 November 19th, 2003 10:50 PM
Two quotes Theophylact IMO Community 22 July 15th, 2003 05:24 AM
reading stock quotes. Nick098 IMO Community 3 May 17th, 2002 06:35 PM
Free Stock Quotes via Phone brandon184 IMO Community 0 December 10th, 2001 03:41 AM


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Most Active Discussions
Is It Just Me? (2789)
Is the PSU I received dead? (5)
Install XP pro and a Vista laptop ?.. (5)
Foreign voltage (5)
New Computer wont recognize XP disc (7)
California Passes Anti-Flat-HDTV Le.. (38)
A good PSU? (9)
HIS HD5770 graphic card question (10)
Dept. of HS: NSA 'Helped' Develop V.. (12)
Print spooler problem (5)
EVGA 9800 gtx help with finding a g.. (5)
Mysterious Boot manager (9)
Ideal cheap graph card for PC-Gamin.. (12)
New Build the Montior is blank (8)
Recent Discussions
Install XP pro and a Vista laptop ?? (5)
Is the PSU I received dead? (5)
HIS HD5770 graphic card question (10)
Dept. of HS: NSA 'Helped' Develop Vis.. (12)
Foreign voltage (5)
Convert 5 pin Keyboard to USB (11)
Print spooler problem (5)
hybernate option (2)
Steam ID's, Gamertags etc... (1)
New Computer wont recognize XP disc (7)
World's largest Monopoly Game using G.. (328)
A good PSU? (9)
Modern Warfare 2: Who Bought It? (60)
[F@H SPAM 11/16/09] ! 1/2 months to r.. (28)
blender help (2)
Hard drive freezes boot (1)
Mysterious Boot manager (9)
System recovery disk maker (2)
Like New Wacom 12x19 Intuos 3 + Grip .. (1)
windows 7 internet problem (3)
EVGA 9800 gtx help with finding a goo.. (5)
New Build the Montior is blank (8)
Skillsoft Network+ Study Software Que.. (8)
Ideal cheap graph card for PC-Gaming? (12)
Internet very slow since updating AVG.. (13)


All times are GMT -4. The time now is 09:56 PM.
TechIMO Copyright 2009 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28