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: 2632
Discussions: 203,417, Posts: 2,407,432, Members: 248,942
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? (3732)
and she wanted to be VP? (62)
nVIDIA GTX 260 vs ATI 5770 (6)
Guns (108)
GPU upgrade from 8600 GT (14)
New PC Heavy Gaming Rig (9)
[F@H Chat]2/6/10 New thread for ya'.. (25)
Need for Speed Shift (7)
Best route for upgrade (several opt.. (5)
Motherboards with 2 PCIE x16 slots (8)
Graphene transistors promise 100GHz.. (7)
Animated GIFs don't animate? (13)
I want to buid a pc with this case (14)
Upgrading (5)
Recent Discussions
How Good is This $450 MSI Laptop? (4)
should i upgrade whole pc or just vid.. (3)
New PC Heavy Gaming Rig (9)
[F@H Chat]2/6/10 New thread for ya' s.. (25)
GPU upgrade from 8600 GT (14)
tecumseh snow blower (0)
nVIDIA GTX 260 vs ATI 5770 (6)
PLEASE MUCH NEEDED HELP! (4)
Information on the Foxconn RC4107MA M.. (5)
3 monitors (1)
HD5870 Question (18)
Microsoft Wireless Keyboard 3000 (13)
Laptop - HDTV Connection Using HDMI C.. (2)
Wireless G printer w/wrt160n (0)
SpeedFan Temp Monitor Help (3)
BSOD - IRQL not less or equal - HELP! (0)
Unable to find LAN (7)
Best route for upgrade (several optio.. (5)
WEBCAM / XP / XP64 / VISTA (7)
routers and switches OPERATING SYSTEM.. (0)
One dumb nube and a cisco 3550 (1)
120mm fan on top of case??? (12)
Is my hard drive going bad? Please h.. (2)
rsync over passwordless ssh in a cron.. (4)
Wii at buy.com for $374 - Carnival Sm.. (7)


All times are GMT -4. The time now is 04:46 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