I recently purchased the scripting version of imacros browser, and have begun working on a project for Trading Stocks. I was wondering if there was a way i could Extract Stock data still from MSN money or my Zecco Accounts Real Time Feeds in chrome, i had them set up for the imacros browser but this google chrome looks alot faster, and of course a lil more complicated. I wrote an Access database that used imacros to extract Stock symbols and tickers from US stock exhanges, and then i've set the database to then use imacros to insert tickers into both MSN's Money and my Zecco account's real time feed, but it was going too slow. I was extracting maximum 2 records a second through zeccos real time feed and about .5 records/sec through MSN. Any help would be appreciated. Here is the old code for the imacros browser and for VBA
Imacros and VBA for Zecco Trading Account
ZeccoTradingAccount:
Just a simple macro to login to my trading account, i've already replicated it in the chrome version
ZeccoSnapquote:
VERSION BUILD=6900210
FRAME F=9
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:mainForm ATTR=ID:symbol CONTENT={{Symbol}}
TAG POS=1 TYPE=IMG ATTR=HREF:https://trading.zecco.com/Zecco/english ... _quote.gif
TAG POS=10 TYPE=TD ATTR=TXT:* EXTRACT=TXT
VBA Script for Running quotes through the ticker symbol
Private Sub Zecco_Quotable_Securities_Click()
Dim Symbols_Table As Recordset
Dim iim1, iret
Dim Company_Symbol
Dim Snapquote, myarray, nextarray
Set iim1 = CreateObject("imacros") 'opens imacros
Set Symbols_Table = CurrentDb.OpenRecordset("Symbols", dbOpenTable) 'Opens the TABLE SPfive
Symbols_Table.MoveFirst
iret = iim1.iiminit 'Initializes Imacros App
iim1.iimplay ("ZeccoTradingAccount")
Do
Company_Symbol = Symbols_Table!Symbol
iret = iim1.iimset("-var_Symbol", Company_Symbol)
iim1.iimplay ("ZeccoSnapQuote")
Snapquote = iim1.iimGetLastExtract()
If Left(Snapquote, 1) = "$" Then
myarray = Split(Snapquote, " ")
With Symbols_Table
.Edit
!Last_sale = myarray(0)
!Change = myarray(1)
.Update
.MoveNext
End With
Else
Symbols_Table.MoveNext
End If
Loop Until Symbols_Table.EOF
iret = iim1.iimexit
End Sub
Here is the Imacros code and VBA Script for MSN Money
MSNMoney Imacro:
VERSION BUILD=6900210
TAB T=1
TAB CLOSEALLOTHERS
URL GOTO=http://moneycentral.msn.com/home.asp
MSNSQ Imacro
VERSION BUILD=6900210
SET !ERRORIGNORE YES
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:http://moneycentral.msn.com/detail/stock_quote ATTR=ID:txtQbe CONTENT={{SYMBOL}}
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:http://moneycentral.msn.com/detail/stock_quote ATTR=ID:getquote
TAG POS=1 TYPE=SPAN ATTR=CLASS:s1&&TXT:* EXTRACT=TXT
TAG POS=3 TYPE=SPAN ATTR=CLASS:s1&&TXT:* EXTRACT=TXT
TAG POS=1 TYPE=TD ATTR=CLASS:cl1&&TXT:* EXTRACT=TXT
TAG POS=2 TYPE=TD ATTR=CLASS:cl1&&TXT:* EXTRACT=TXT
TAG POS=3 TYPE=TD ATTR=CLASS:cl1&&TXT:* EXTRACT=TXT
TAG POS=4 TYPE=TD ATTR=CLASS:cl1&&TXT:* EXTRACT=TXT
TAG POS=5 TYPE=TD ATTR=CLASS:cl1&&TXT:* EXTRACT=TXT
TAG POS=6 TYPE=TD ATTR=CLASS:cl1&&TXT:* EXTRACT=TXT
TAG POS=7 TYPE=TD ATTR=CLASS:cl1&&TXT:* EXTRACT=TXT
TAG POS=8 TYPE=TD ATTR=CLASS:cl1&&TXT:* EXTRACT=TXT
TAG POS=9 TYPE=TD ATTR=CLASS:cl1&&TXT:* EXTRACT=TXT
TAG POS=10 TYPE=TD ATTR=CLASS:cl1&&TXT:* EXTRACT=TXT
TAG POS=11 TYPE=TD ATTR=CLASS:cl1&&TXT:* EXTRACT=TXT
TAG POS=12 TYPE=TD ATTR=CLASS:cl1&&TXT:* EXTRACT=TXT
Private Sub Nasdaq_Bid_Ask_Click()
Dim Nasdaqtable As Recordset
Dim iim1, Nasdaqsymbol, iret, myarray
Dim askbidprice As String
Set iim1 = CreateObject("imacros") 'opens imacros
Set Nasdaqtable = CurrentDb.OpenRecordset("Nasdaq", dbOpenTable) 'Opens the TABLE Nasdaq
Nasdaqtable.MoveFirst
iret = iim1.iiminit 'Initializes Imacros App
iim1.iimplay ("MSNMoney")
Do
Nasdaqsymbol = Nasdaqtable!Symbol
iret = iim1.iimset("-var_Symbol", Nasdaqsymbol)
iret = iim1.iimplay("MSNSQ")
askbidprice = iim1.iimGetLastExtract()
myarray = Split(askbidprice, "[EXTRACT]")
If myarray(0) = "#EANF#" Then
Nasdaqtable.MoveNext
Else
'Updates Nasdaq table
Nasdaqtable.Edit
If myarray(3) = "NA" Then
Nasdaqtable!Bid = myarray(0)
Else
Nasdaqtable!Bid = myarray(3)
End If
If myarray(7) = "NA" Then
Nasdaqtable!Ask = myarray(0)
Else
Nasdaqtable!Ask = myarray(7)
End If
Nasdaqtable!Last_sale = myarray(0)
If Right(myarray(1), 3) = "." Then
Nasdaqtable!Real_time = myarray(1)
End If
Nasdaqtable!Previous_Close = myarray(2)
If myarray(4) = "NA" Then
Nasdaqtable!Open = myarray(0)
Else
Nasdaqtable!Open = myarray(4)
End If
Nasdaqtable!Bid_Size = myarray(5)
If myarray(6) = "NA" Then
Nasdaqtable!Day_High = myarray(0)
Else
Nasdaqtable!Day_High = myarray(6)
End If
If myarray(8) = "NA" Then
Nasdaqtable!Day_Low = myarray(0)
Else
Nasdaqtable!Day_Low = myarray(8)
End If
Nasdaqtable!Ask_Size = myarray(9)
Nasdaqtable!Volume = myarray(10)
Nasdaqtable!Year_High = myarray(11)
Nasdaqtable!ADV = myarray(12)
Nasdaqtable!Year_Low = myarray(13)
Nasdaqtable.Update
Nasdaqtable.MoveNext
End If
Loop Until Nasdaqtable.EOF
iret = iim1.iimexit 'Exits Imacros
MsgBox ("Completed Updating Nasdaq Bid Ask Prices")
End Sub
Stock Data Extract for Chrome
Forum rules
iMacros EOL - Attention!
The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.
Thank you again for your business and support.
Sincerely,
The Progress Team
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
iMacros EOL - Attention!
The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.
Thank you again for your business and support.
Sincerely,
The Progress Team
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
-
- Posts: 1483
- Joined: Tue Jan 26, 2010 11:35 am
Re: Stock Data Extract for Chrome
Hello,
Did I understand correctly, that you want to force that code to work with Chrome instead of Internet Explorer?
I am afraid you can currently use either Internet Explorer or Firefox from within a scripting language. Our Chrome Plugin is still in Beta and is quite limited, largely due to Chrome's limited Add-ons support.
If you want to try your script with Firefox, rather than IE, it is as easy as adding a "-fx" switch to iimInit.
Best regards,
Did I understand correctly, that you want to force that code to work with Chrome instead of Internet Explorer?
I am afraid you can currently use either Internet Explorer or Firefox from within a scripting language. Our Chrome Plugin is still in Beta and is quite limited, largely due to Chrome's limited Add-ons support.
If you want to try your script with Firefox, rather than IE, it is as easy as adding a "-fx" switch to iimInit.
Best regards,
Daniel, iOpus Support