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: 2464
Discussions: 200,495, Posts: 2,374,279, Members: 245,823
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? (1610)
FT HOOD attack: 7 killed 12 injured (56)
Looking for a graphic card that wil.. (30)
HELP!!! What do you think of this s.. (7)
Aero in Vista (7)
Assosiations (21493)
PC Modern Warfare 2: it's much wors.. (12)
core i7 extreme 975, nvidia 9400gt (8)
Motherboards and my curse... (24)
slaving laptop drive (7)
[F@H SPAM 11/1/09]New month . . . n.. (32)
Building my first computer (13)
How to Ship a PC (16)
Windows 7 Keeps Restarting Itself (7)
Recent Discussions
My 1st pc build (32)
HELP!!! What do you think of this sys.. (7)
New build 10 second reboot cycle! Won.. (3)
New Linksys Routers (3)
sometime power/Amber light (0)
psp 3000 Rock band bundle (3)
Refurbished paintball guns and Free S.. (2)
hard drive problem (0)
Win7 TrustedInstaller Permissions (1)
Motherboards and my curse... (24)
Mic won't work. (2)
Weird Vista Internet Issue (2)
1st ever Harddisk benchmark thread (87)
high network traffic (0)
Excel password changed..... (3)
SSD or 2x640gb RAID 0 (4)
Weird symptoms after installing new C.. (1)
MFT corruption, program to fix? (1)
Aero in Vista (7)
ext. sound card laptop to stereo syst.. (1)
Domain user adjust time when it is Da.. (14)
How To Share Youtube Videos With Peop.. (1)
Musical Maxtor (262)
core i7 extreme 975, nvidia 9400gt (8)
copyrighted material on youtube (1)


All times are GMT -4. The time now is 04:38 PM.
TechIMO Copyright 2008 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