safdar19 Posted September 19, 2010 Share Posted September 19, 2010 Hello friends. I am trying to automate downloading from the website www.bseindia.com the ulr is ::: http://www.bseindia.com/stockinfo/stockprc2_excel.aspx?scripcd=512093&FromDate=09/18/2000&ToDate=09/18/2010&OldDMY=D&ScripName=CRANES I want to create an application which should ask the user to enter the script id and date range. It should have the capability to import the list of script ids from a text file, and run at least run 5 threads of the ulr simultaneously. In the above ulr the script id is 512093 and the date range is from 09/18/2000 to 0918/2010. Is it possible to write a small programme ? Safdar Link to comment Share on other sites More sharing options...
seandisanti Posted September 19, 2010 Share Posted September 19, 2010 yes it's possible, easy even. Shouldn't take you more than 5 minutes once you've researched InputBox() Run() maybe @ComSpec Link to comment Share on other sites More sharing options...
Kalin Posted September 19, 2010 Share Posted September 19, 2010 Hello friends.I am trying to automate downloading from the website www.bseindia.comthe ulr is :::http://www.bseindia.com/stockinfo/stockprc2_excel.aspx?scripcd=512093&FromDate=09/18/2000&ToDate=09/18/2010&OldDMY=D&ScripName=CRANESI want to create an application which should ask the user to enter the script id and date range.It should have the capability to import the list of script ids from a text file, and run at least run 5 threads of the ulr simultaneously.In the above ulr the script id is 512093 and the date range is from 09/18/2000 to 0918/2010.Is it possible to write a small programme ?SafdarLurk the helpfile some more, find the topic type about what you're trying to do.I'm sure there is a function or UDF for this. Link to comment Share on other sites More sharing options...
safdar19 Posted September 19, 2010 Author Share Posted September 19, 2010 I have used inetget() with success. Inetget("http://www.bseindia.com/stockinfo/stockprc2_excel.aspx?scripcd=512093&FromDate=01/18/2010&ToDate=09/18/2010&OldDMY=D&ScripName=CRANES","E:\data\512093.csv") It has given me a great deal of pleasure, as, me being a compleate newbee, this is my first ever code. Now I will try to incorporate it somehow in to inputbox(). Thanks for the suggestions. Safdar Link to comment Share on other sites More sharing options...
safdar19 Posted September 19, 2010 Author Share Posted September 19, 2010 Kindly Help as I am not able to figure out how to replace "scripcd=512093" from the url to user defined input using iputbox() $scripcd = InputBox("Question", "Enter the scrip Id") when the user enters , say, 500410 the "scripcd=512093" in the url should change to 500410 http://www.bseindia.com/stockinfo/stockprc2_excel.aspx?scripcd=512093&FromDate=09/18/2000&ToDate=09/18/2010&OldDMY=D&ScripName=CRANES Safdar Link to comment Share on other sites More sharing options...
KurogamineNox Posted September 19, 2010 Share Posted September 19, 2010 Try this $scripcd = "scripcd=" & InputBox("Question", "Enter the scrip Id") MsgBox(4096, "Info", $scripcd);Note this just shows what it is Link to comment Share on other sites More sharing options...
seandisanti Posted September 19, 2010 Share Posted September 19, 2010 when the user enters , say, 500410 the "scripcd=512093" in the url should change to 500410 http://www.bseindia.com/stockinfo/stockprc2_excel.aspx?scripcd=512093&FromDate=09/18/2000&ToDate=09/18/2010&OldDMY=D&ScripName=CRANES Safdar you could do like... $firsturl = "http://www.bseindia.com/stockinfo/stockprc2_excel.aspx?scripcd=512093&FromDate=09/18/2000&ToDate=09/18/2010&OldDMY=D&ScripName=CRANES" inetget(StringReplace($firsturl,"512093",InputBox("Scripcd","prompt")) that assumes they're only going to give you the number you're looking for, and only the number has to change... you could also do like... $scripcd = InputBox("Question", "Enter the scrip Id") _IECreate("http://www.bseindia.com/stockinfo/stockprc2_excel.aspx?scripcd=" & $scripcd & "&FromDate=09/18/2000&ToDate=09/18/2010&OldDMY=D&ScripName=CRANES") Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now