Jump to content
Sign in to follow this  

Working With Functions

Recommended Posts


Okay I am new to functions and have very little experience with them.

What I want is to have it where I define a variable called stock symbol and then it will use the function pulldata and pull all of the information as the two array


#include <IE.au3>
#include <array.au3>
#Include <File.au3>
#include <string.au3>
#include <INet.au3>
Global $StockSymbol = InputBox("Stock Symbol", "Enter stock symbol");
Func PullData()
$x = 0;This keeps track of the loop for Stock One
$BloombergDataDirty = _INetGetSource('http://www.bloomberg.com/quote/' & $StockSymbol & ':US');Pulls bloombergs data
InetClose ($BloombergDataDirty);Closes the connection to bloomberg
$BloombergData = _StringBetween($BloombergDataDirty, '"data_values":[', '],"');This seperates the data set
$BloombergDataSet = _StringBetween($BloombergData[0], '[', ']');
$totalcount = Ubound($BloombergDataSet);
Local $StockOneTime[1];
Local $StockOnePrice[1];
   $Finished = StringSplit($BloombergDataSet[$x], ',');
   _ArrayAdd($StockOneTime, $Finished[1]);
   _ArrayAdd($StockOnePrice, $Finished[2]);
   $x = $x + 1;
Until $x = $totalcount

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.