PDA

View Full Version : Plotting Speed Figures Code


douglasw32
09-08-2005, 10:03 AM
Does anyone have a Visiual Basic code, or any code, that will pull aprt the bris single drf file and plot the speed figures like thorograph does.

I do not want to use there speed figs but my own derived from those files.

if no one has any when I am done with it I will post it...

Thanks.

NoDayJob
09-08-2005, 12:59 PM
Does anyone have a Visiual Basic code, or any code, that will pull aprt the bris single drf file and plot the speed figures like thorograph does.

I do not want to use there speed figs but my own derived from those files.

if no one has any when I am done with it I will post it...

Thanks.

Check with Matt Thomas' advertisement at Posttime Daily. He programs in VB and probably has a shell for Bris code that you could use. I know he does custom programming at a very reasonable fee. Several people, I know, have used him and are very satisfied.

http://www.posttimedaily.com/software/index.php (Software)

NDJ [AKA Troll #1]

douglasw32
09-08-2005, 03:28 PM
Thanks, sent off an email, anyone else?

Light
09-08-2005, 09:01 PM
It's a longshot but you might want to visit:

http://excelforum.com/ then go to "Excel programming" and post your question.

I've had several little snippets I needed that someone volunteered the code for. However,with Excel,I use the multi files cause Excel cant import more than 256 columns allthough there is code for doing that too. I would imagine that with multi files,once you import and extract the fields with the "Horse Name" and "Bris speed rating" it would be easy for the guys on that board to write you code to turn the figures into charts.But don't ask me.I'm just learning VBA.

douglasw32
09-08-2005, 09:11 PM
Again thanks so much for the input...

I started to code Visual Basic from a search of the post here and am making headway in just an evening.

Lefty
09-08-2005, 10:12 PM
I had Matt Thomas do a prgm for me and i'm very satisfied.

Vegas711
09-09-2005, 12:50 AM
Again thanks so much for the input...

I started to code Visual Basic from a search of the post here and am making headway in just an evening.

I too am learning visual basic so i am going to put :) it out there....


Attention all programmers that use visual basic can you provide a sample program that shows how to program a program to read a comma delimited file and inport it into a variable... it can be as simple as adding the first call beaten lenghts to the first call fractional time...

Thanks...

NoDayJob
09-09-2005, 01:21 AM
http://www.vbcode.com/

Good Luck

NDJ [AKA Troll #1]

Light
09-09-2005, 02:15 AM
douglasw32

Don't know how familiar you are with Excel,but you don't have to know code to create a chart in Excel.It's very easy. If you have x amount of numbers on a spreadsheet,you can turn them into a chart of your choice with one click of a mouse or 1 keystroke.

Jeff P
09-09-2005, 02:33 AM
posted by Vegas711-
Attention all programmers that use visual basic can you provide a sample program that shows how to program a program to read a comma delimited file and inport it into a variable... it can be as simple as adding the first call beaten lenghts to the first call fractional time...

I posted a code snippet for doing this a while back. Here's a link. Scroll down, it's about the 7th post from the top of the thread:
http://www.paceadvantage.com/forum/showthread.php?t=15725&highlight=visual+basic+bris+file

-jp

.

douglasw32
09-09-2005, 02:38 AM
Jeff P has it...nailed.

I started 7 hours ago and was able to write a small (very rough) EXE file that plots the bris speed figure across a lin with the date and comment much like CJ's
(not as pretty)

I have no idea how thorougraph puts theres on a sheet that is split in columns but I will (I hope)

I also used another bit of code found here that writes the output into an HTML file for display (also jeffP's I think)

wow am I fried but it was fun and easy, anything in the code I did not understand could be found and explained on google.

:cool:

Thanks Again!

douglasw32
09-10-2005, 08:59 AM
If anyone wants visual basic source code to pull all of the data from the bris single file let me know and I will send you the project files from VB6.

Then you can make it do whatever you want..It is the same thing Jeff P talks of.

traynor
09-10-2005, 06:31 PM
Vegas711 wrote: <Attention all programmers that use visual basic can you provide a sample program that shows how to program a program to read a comma delimited file and inport it into a variable... it can be as simple as adding the first call beaten lenghts to the first call fractional time...>

First, the method to split a string is (oddly enough), split.
Split(stringname, ",") will split the line of data into "tokens" at each comma.

Second, easiest way to manipulate the data is to put it into an array (a series of "buckets", which you will probably have to declare with a Dim statement)
Dim MyArray as New MyArray(20) will create a new array called MyArray with 20 "buckets," which can be accessed and manipulated through the index number of the array element. Numbering starts at 0, so first bucket is indexed 0, second 1, third 2, etc.

Once you plug the tokens into an array, it is fairly simple to manipulate the data using the index numbers of the array:
x = MyArray(2) + MyArray(6) adds the values in buckets 2 and 6, and stores them in the variable x.

There is a bit more to it, because you may need to declare variable types, or, if you are reading the data as a string, to convert that string to a number; the conversion is straightforward, CInt(MyArray(2)) "casts" the value of bucket 2 into an integer, CDbl(MyArray(2)) casts it to a double precision number.
Good luck

traynor
09-10-2005, 06:34 PM
Douglasw32 wrote: <If anyone wants visual basic source code to pull all of the data from the bris single file let me know and I will send you the project files from VB6.>

I would very much appreciate it if you would send me the code.
Thanks and good luck!

douglasw32
09-11-2005, 12:01 AM
Tomorrow 9/10/05 I will post it as open source on the web and post alink to it here...

I just want to pull out the speed figure I got going and just replace it with the bris spped fig.

It will plot the last 10 like thorograph does (sort of) if you see how that works you should be able to make it do anything else you want easily.

douglasw32
09-11-2005, 09:00 AM
'Released under the GNU General Public License
'``````````````````````````````````````````
'Do whatever you want with it, but give back your results ;)
'Built with other peoples samples
'``````````````````````````````````````````
Dim FieldVal(1435)
Public FILE As String

'The Button to open the downloaded Bris file
Private Sub Command1_Click()
FILE = InputBox("Enter File Name:")
If Not FILE = "" Then
Call ReadAFile(FILE)
End If
End Sub

'``````````````````````````````````````````
'Read bris file, store it,put it into html format
'``````````````````````````````````````````

Private Sub ReadAFile(FILE)

Err.Clear
On Error GoTo handler:
Open "HTMLReport.html" For Output As #2
'``````````````````````````````````````````
'Write title, html, and body tags
'``````````````````````````````````````````
strHorseHTML = "<html><head><title>OPEN SOURCE THOROGRAPH TyPE SHEETS!</title></head><body>"
Print #2, strHorseHTML

strHorseHTML = ""

Open FILE For Input As #1

Do While Not EOF(1)

'Read A Single Horse:

For j = 1 To 1435
Input #1, fileField
FieldVal(j) = fileField
Next j


'``````````````````````````````````````````
'Display the horse name in a table
'``````````````````````````````````````````
strHorseHTML = strHorseHTML & "<table><tr><td>" & "<FONT SIZE='2'>Race - " & FieldVal(3) & " on " & FieldVal(2) & " at " & FieldVal(1) & " @ " & FieldVal(225) & "</font>" & "<br><br>"
strHorseHTML = strHorseHTML & "<FONT SIZE='2'>" & FieldVal(45) & "</font>" & "<BR>"
strHorseHTML = strHorseHTML & "<FONT SIZE='2'>" & FieldVal(224) & " days rest, going " & (FieldVal(6) / 220) & " Furlongs on " & FieldVal(7) & "</font>" & "<BR>"
strHorseHTML = strHorseHTML & "</td></tr></table><br>"

'``````````````````````````````````````````
'Chart speed figures
'``````````````````````````````````````````


'``````````````````````````````````````````
'race 1
'``````````````````````````````````````````
strHorseHTML = strHorseHTML & "<table width='100%' border='0' >"
strHorseHTML = strHorseHTML & "<tr>"
strHorseHTML = strHorseHTML & "<td width='55%'>"
Dim x As Integer
x = FieldVal(846)
If x < 0 Then GoTo continue:
Dim y As Integer
y = FieldVal(266)
y = ((y) / 7)
If y > 12.9 Then y = 13
For a = 1 To x / 2
strHorseHTML = strHorseHTML & "."
Next a
strHorseHTML = strHorseHTML & "<FONT SIZE='1'><B>" & (x / 10) & "</B>.....=" & FieldVal(306) & FieldVal(326) & (FieldVal(316) / 220) & "</font>"
For b = 1 To y
strHorseHTML = strHorseHTML & "<br>"
Next b
strHorseHTML = strHorseHTML & "</td>"
strHorseHTML = strHorseHTML & "<td width='45%'>"
strHorseHTML = strHorseHTML & "<FONT SIZE='1'>" & FieldVal(536) & " / " & FieldVal(1383) & "</font>"
For b = 1 To y
strHorseHTML = strHorseHTML & "<br>"
Next b
strHorseHTML = strHorseHTML & "</td>"
strHorseHTML = strHorseHTML & "</tr>"
strHorseHTML = strHorseHTML & "</table>"

'``````````````````````````````````````````
'end race 1
'``````````````````````````````````````````


'``````````````````````````````````````````
'race 2
'``````````````````````````````````````````
strHorseHTML = strHorseHTML & "<table width='100%' border='0' >"
strHorseHTML = strHorseHTML & "<tr>"
strHorseHTML = strHorseHTML & "<td width='55%'>"
Dim x2 As Integer
x2 = FieldVal(847)
If x2 < 0 Then GoTo continue:
Dim y2 As Integer
y2 = FieldVal(267)
y2 = ((y2) / 7)
If y2 > 12.9 Then y2 = 13
For a = 1 To x2 / 2
strHorseHTML = strHorseHTML & "."
Next a
strHorseHTML = strHorseHTML & "<FONT SIZE='1'><B>" & (x2 / 10) & "</B>.....=" & FieldVal(307) & FieldVal(327) & (FieldVal(317) / 220) & "</font>"
For b = 1 To y2
strHorseHTML = strHorseHTML & "<br>"
Next b
strHorseHTML = strHorseHTML & "</td>"
strHorseHTML = strHorseHTML & "<td width='45%'>"
strHorseHTML = strHorseHTML & "<FONT SIZE='1'>" & FieldVal(537) & " / " & FieldVal(1384) & "</font>"
For b = 1 To y2
strHorseHTML = strHorseHTML & "<br>"
Next b
strHorseHTML = strHorseHTML & "</td>"
strHorseHTML = strHorseHTML & "</tr>"
strHorseHTML = strHorseHTML & "</table>"

'``````````````````````````````````````````
'end race 2
'``````````````````````````````````````````


'``````````````````````````````````````````
'race 3
'``````````````````````````````````````````
strHorseHTML = strHorseHTML & "<table width='100%' border='0' >"
strHorseHTML = strHorseHTML & "<tr>"
strHorseHTML = strHorseHTML & "<td width='55%'>"
Dim x3 As Integer
x3 = FieldVal(848)
If x3 < 0 Then GoTo continue:
Dim y3 As Integer
y3 = FieldVal(268)
y3 = ((y3) / 7)
If y3 > 12.9 Then y3 = 13
For a = 1 To x3 / 2
strHorseHTML = strHorseHTML & "."
Next a
strHorseHTML = strHorseHTML & "<FONT SIZE='1'><B>" & (x3 / 10) & "</B>.....=" & FieldVal(308) & FieldVal(328) & (FieldVal(318) / 220) & "</font>"
For b = 1 To y3
strHorseHTML = strHorseHTML & "<br>"
Next b
strHorseHTML = strHorseHTML & "</td>"
strHorseHTML = strHorseHTML & "<td width='45%'>"
strHorseHTML = strHorseHTML & "<FONT SIZE='1'>" & FieldVal(538) & " / " & FieldVal(1385) & "</font>"
For b = 1 To y3
strHorseHTML = strHorseHTML & "<br>"
Next b
strHorseHTML = strHorseHTML & "</td>"
strHorseHTML = strHorseHTML & "</tr>"
strHorseHTML = strHorseHTML & "</table>"

'``````````````````````````````````````````
'end race 3
'``````````````````````````````````````````

'``````````````````````````````````````````
'race 4
'``````````````````````````````````````````
strHorseHTML = strHorseHTML & "<table width='100%' border='0' >"
strHorseHTML = strHorseHTML & "<tr>"
strHorseHTML = strHorseHTML & "<td width='55%'>"
Dim x4 As Integer
x4 = FieldVal(849)
If x4 < 0 Then GoTo continue:
Dim y4 As Integer
y4 = FieldVal(269)
y4 = ((y4) / 7)
If y4 > 12.9 Then y4 = 13
For a = 1 To x4 / 2
strHorseHTML = strHorseHTML & "."
Next a
strHorseHTML = strHorseHTML & "<FONT SIZE='1'><B>" & (x4 / 10) & "</B>.....=" & FieldVal(309) & FieldVal(329) & (FieldVal(319) / 220) & "</font>"
For b = 1 To y4
strHorseHTML = strHorseHTML & "<br>"
Next b
strHorseHTML = strHorseHTML & "</td>"
strHorseHTML = strHorseHTML & "<td width='45%'>"
strHorseHTML = strHorseHTML & "<FONT SIZE='1'>" & FieldVal(539) & " / " & FieldVal(1386) & "</font>"
For b = 1 To y4
strHorseHTML = strHorseHTML & "<br>"
Next b
strHorseHTML = strHorseHTML & "</td>"
strHorseHTML = strHorseHTML & "</tr>"
strHorseHTML = strHorseHTML & "</table>"

'``````````````````````````````````````````
'end race 4
'``````````````````````````````````````````

'``````````````````````````````````````````
'race 5
'``````````````````````````````````````````
strHorseHTML = strHorseHTML & "<table width='100%' border='0' >"
strHorseHTML = strHorseHTML & "<tr>"
strHorseHTML = strHorseHTML & "<td width='55%'>"
Dim x5 As Integer
x5 = FieldVal(850)
If x5 < 0 Then GoTo continue:
Dim y5 As Integer
y5 = FieldVal(270)
y5 = ((y5) / 7)
If y5 > 12.9 Then y5 = 13
For a = 1 To x5 / 2
strHorseHTML = strHorseHTML & "."
Next a
strHorseHTML = strHorseHTML & "<FONT SIZE='1'><B>" & (x5 / 10) & "</B>.....=" & FieldVal(310) & FieldVal(330) & (FieldVal(320) / 220) & "</font>"
For b = 1 To y5
strHorseHTML = strHorseHTML & "<br>"
Next b
strHorseHTML = strHorseHTML & "</td>"
strHorseHTML = strHorseHTML & "<td width='45%'>"
strHorseHTML = strHorseHTML & "<FONT SIZE='1'>" & FieldVal(540) & " / " & FieldVal(1387) & "</font>"
For b = 1 To y5
strHorseHTML = strHorseHTML & "<br>"
Next b
strHorseHTML = strHorseHTML & "</td>"
strHorseHTML = strHorseHTML & "</tr>"
strHorseHTML = strHorseHTML & "</table>"

'``````````````````````````````````````````
'end race 5
'``````````````````````````````````````````

'``````````````````````````````````````````
'race 6
'``````````````````````````````````````````
strHorseHTML = strHorseHTML & "<table width='100%' border='0' >"
strHorseHTML = strHorseHTML & "<tr>"
strHorseHTML = strHorseHTML & "<td width='55%'>"
Dim x6 As Integer
x6 = FieldVal(851)
If x6 < 0 Then GoTo continue:
Dim y6 As Integer
y6 = FieldVal(271)
y6 = ((y6) / 7)
If y6 > 12.9 Then y6 = 13
For a = 1 To x6 / 2
strHorseHTML = strHorseHTML & "."
Next a
strHorseHTML = strHorseHTML & "<FONT SIZE='1'><B>" & (x6 / 10) & "</B>.....=" & FieldVal(311) & FieldVal(331) & (FieldVal(321) / 220) & "</font>"
For b = 1 To y6
strHorseHTML = strHorseHTML & "<br>"
Next b
strHorseHTML = strHorseHTML & "</td>"
strHorseHTML = strHorseHTML & "<td width='45%'>"
strHorseHTML = strHorseHTML & "<FONT SIZE='1'>" & FieldVal(541) & " / " & FieldVal(1388) & "</font>"
For b = 1 To y6
strHorseHTML = strHorseHTML & "<br>"
Next b
strHorseHTML = strHorseHTML & "</td>"
strHorseHTML = strHorseHTML & "</tr>"
strHorseHTML = strHorseHTML & "</table>"

'``````````````````````````````````````````
'end race 6
'``````````````````````````````````````````

'``````````````````````````````````````````
'race 7
'``````````````````````````````````````````
strHorseHTML = strHorseHTML & "<table width='100%' border='0' >"
strHorseHTML = strHorseHTML & "<tr>"
strHorseHTML = strHorseHTML & "<td width='55%'>"
Dim x7 As Integer
x7 = FieldVal(852)
If x7 < 0 Then GoTo continue:
Dim y7 As Integer
y7 = FieldVal(272)
y7 = ((y7) / 7)
If y7 > 12.9 Then y7 = 13
For a = 1 To x7 / 2
strHorseHTML = strHorseHTML & "."
Next a
strHorseHTML = strHorseHTML & "<FONT SIZE='1'><B>" & (x7 / 10) & "</B>.....=" & FieldVal(312) & FieldVal(332) & (FieldVal(322) / 220) & "</font>"
For b = 1 To y7
strHorseHTML = strHorseHTML & "<br>"
Next b
strHorseHTML = strHorseHTML & "</td>"
strHorseHTML = strHorseHTML & "<td width='45%'>"
strHorseHTML = strHorseHTML & "<FONT SIZE='1'>" & FieldVal(542) & " / " & FieldVal(1389) & "</font>"
For b = 1 To y7
strHorseHTML = strHorseHTML & "<br>"
Next b
strHorseHTML = strHorseHTML & "</td>"
strHorseHTML = strHorseHTML & "</tr>"
strHorseHTML = strHorseHTML & "</table>"

'``````````````````````````````````````````
'end race 7
'``````````````````````````````````````````

'``````````````````````````````````````````
'race 8
'``````````````````````````````````````````
strHorseHTML = strHorseHTML & "<table width='100%' border='0' >"
strHorseHTML = strHorseHTML & "<tr>"
strHorseHTML = strHorseHTML & "<td width='55%'>"
Dim x8 As Integer
x8 = FieldVal(853)
If x8 < 0 Then GoTo continue:
Dim y8 As Integer
y8 = FieldVal(273)
y8 = ((y8) / 7)
If y8 > 12.9 Then y8 = 13
For a = 1 To x8 / 2
strHorseHTML = strHorseHTML & "."
Next a
strHorseHTML = strHorseHTML & "<FONT SIZE='1'><B>" & (x8 / 10) & "</B>.....=" & FieldVal(313) & FieldVal(333) & (FieldVal(323) / 220) & "</font>"
For b = 1 To y8
strHorseHTML = strHorseHTML & "<br>"
Next b
strHorseHTML = strHorseHTML & "</td>"
strHorseHTML = strHorseHTML & "<td width='45%'>"
strHorseHTML = strHorseHTML & "<FONT SIZE='1'>" & FieldVal(543) & " / " & FieldVal(1390) & "</font>"
For b = 1 To y8
strHorseHTML = strHorseHTML & "<br>"
Next b
strHorseHTML = strHorseHTML & "</td>"
strHorseHTML = strHorseHTML & "</tr>"
strHorseHTML = strHorseHTML & "</table>"

'``````````````````````````````````````````
'end race 8
'``````````````````````````````````````````

'``````````````````````````````````````````
'race 9
'``````````````````````````````````````````
strHorseHTML = strHorseHTML & "<table width='100%' border='0' >"
strHorseHTML = strHorseHTML & "<tr>"
strHorseHTML = strHorseHTML & "<td width='55%'>"
Dim x9 As Integer
x9 = FieldVal(854)
If x9 < 0 Then GoTo continue:
Dim y9 As Integer
y9 = FieldVal(274)
y9 = ((y9) / 7)
If y9 > 12.9 Then y9 = 13
For a = 1 To x9 / 2
strHorseHTML = strHorseHTML & "."
Next a
strHorseHTML = strHorseHTML & "<FONT SIZE='1'><B>" & (x9 / 10) & "</B>.....=" & FieldVal(314) & FieldVal(334) & (FieldVal(324) / 220) & "</font>"
For b = 1 To y9
strHorseHTML = strHorseHTML & "<br>"
Next b
strHorseHTML = strHorseHTML & "</td>"
strHorseHTML = strHorseHTML & "<td width='45%'>"
strHorseHTML = strHorseHTML & "<FONT SIZE='1'>" & FieldVal(544) & " / " & FieldVal(1391) & "</font>"
For b = 1 To y9
strHorseHTML = strHorseHTML & "<br>"
Next b
strHorseHTML = strHorseHTML & "</td>"
strHorseHTML = strHorseHTML & "</tr>"
strHorseHTML = strHorseHTML & "</table>"

'``````````````````````````````````````````
'end race 9
'``````````````````````````````````````````

'``````````````````````````````````````````
'race 10
'``````````````````````````````````````````
strHorseHTML = strHorseHTML & "<table width='100%' border='0' >"
strHorseHTML = strHorseHTML & "<tr>"
strHorseHTML = strHorseHTML & "<td width='55%'>"
Dim x1 As Integer
x1 = FieldVal(855)
If x1 < 0 Then GoTo continue:
Dim y1 As Integer
y1 = FieldVal(275)
y1 = ((y1) / 7)
If y1 > 12.9 Then y1 = 13
For a = 1 To x1 / 2
strHorseHTML = strHorseHTML & "."
Next a
strHorseHTML = strHorseHTML & "<FONT SIZE='1'><B>" & (x1 / 10) & "</B>.....=" & FieldVal(315) & FieldVal(335) & (FieldVal(325) / 220) & "</font>"
For b = 1 To y1
strHorseHTML = strHorseHTML & "<br>"
Next b
strHorseHTML = strHorseHTML & "</td>"
strHorseHTML = strHorseHTML & "<td width='45%'>"
strHorseHTML = strHorseHTML & "<FONT SIZE='1'>" & FieldVal(545) & " / " & FieldVal(1392) & "</font>"
For b = 1 To y1
strHorseHTML = strHorseHTML & "<br>"
Next b
strHorseHTML = strHorseHTML & "</td>"
strHorseHTML = strHorseHTML & "</tr>"
strHorseHTML = strHorseHTML & "</table>"

'``````````````````````````````````````````
'end race 10
'``````````````````````````````````````````


'Last Race Now Continue

continue:
strHorseHTML = strHorseHTML & "<hr>"
Print #2, strHorseHTML

strHorseHTML = ""
strHorseHTML = "<p style='page-break-before: always'>"
'Do it all again until no more horses
Loop

handler:
If Not Err.Number = 0 Then
MsgBox Err.Number & " " & Err.Description, vbCritical, "Error"
Err.Clear
End If

Close #1
'``````````````````````````````````````````
'Close the read file
'``````````````````````````````````````````
strHorseHTML = strHorseHTML & "</body></html>"
Print #2, strHorseHTML
'``````````````````````````````````````````
'Close the html page
'``````````````````````````````````````````
Close #2

End Sub

'The Button to open the report
Private Sub Command3_Click()
Dim objIE As Object
Set objIE = CreateObject("InternetExplorer.Application")
With objIE
'``````````````````````````````````````````
'The line between quotes below needs to point to the directory the executable is located
'``````````````````````````````````````````
.Navigate "file:///C:/classline/HTMLReport.html"
.Visible = True
End With
Set objIE = Nothing
End Sub

douglasw32
09-11-2005, 09:08 AM
Attached.

douglasw32
09-11-2005, 09:11 AM
Okay now with all that said remember programmers out there ;)

I did this in 20 hours over two days and knew no Visual Basic Progamming at all when i began.

There is probably a faster, better way to do this but this works.

It is quick and dirty but it worked !!!

If anyone can add to it and make it easier,faster,smaller please do so.

Light
09-11-2005, 01:31 PM
douglasw32

What environment(application) did you use to run the code?

Light
09-11-2005, 02:07 PM
Oops.Never mind. I have played with your original idea in Excel and it is interesting for finding longshots. On the limited # I've looked at on a graphical design it's easy to see the low points of a horse's performance. Seems that if the horse has an up and down pattern on the graph and he is at the low point in his cycle and that low point is the lowest he ever goes on his graph,then he turns it around true to form(or graph) at a nice price.Doesn't necessarily win though but helps to explain some of these bombs in the exoctics. What kind of sucess have you had in this?

douglasw32
09-11-2005, 03:52 PM
Visual Basic 6

I have great success at it, but I don't use the bris speed (that is whats in the sample) I adjust it for pace also.

any decent figure plotted is a good way to look at it (imho) that is why the sheets are so popular, not the fig they have...but the way they utilize it.

pat
09-11-2005, 05:17 PM
guys i would love to put my bris #s on a graph but i dont have a clue what your talking about

Zaf
09-11-2005, 06:06 PM
Can this code be used in excel ???

ZAFONIC

Vegas711
09-11-2005, 08:27 PM
Visual Basic 6

I have great success at it, but I don't use the bris speed (that is whats in the sample) I adjust it for pace also.

any decent figure plotted is a good way to look at it (imho) that is why the sheets are so popular, not the fig they have...but the way they utilize it.

Thanks for the code.. I just read chapter 1 on vb6 so this is a little ahead of my ability right now, but it should help.

Vegas711
09-11-2005, 08:30 PM
Let it Ride ... A movie all horseplayers should see.:jump:

douglasw32
09-11-2005, 11:11 PM
Agreed Let it Ride is hillarious!

Has every one nailed. :lol:

Okay this is code for Visual Basic 6.

The EXE File is a compiled windows Program of the code.

If you have it in the same place as any single file format of the DRF from bris at www.brisnet.com it will graph the BIS SPEED figure into an HTML page.

I will update it but this is how far I got rather quickly using examples found here.
and there on the web

It is a good place to start anything you want automated from the drf file.

clue
10-11-2005, 07:31 PM
It will plot the last 10 like thorograph does (sort of) if you see how that works you should be able to make it do anything else you want easily.


Hi douglasw32,

Speaking of grabbing BRIS file data and having one's way with it, I'm considering bidding on this item:

http://cgi.ebay.com/Thoroughbred-Handicapping-PP-Data-Grabber_W0QQitemZ8707740228QQcategoryZ31668QQrdZ1Q QcmdZViewItem


I know exactly nothing about VB6 and Excel.

If one requires little from a handicapping program, is it likely he/she can generate all within an Excel spreadsheet with the above tool to read the data? (Or in combination with a VB6 coded application?)

All the commercial programs I've owned or tested have been overkill or, at best, a hit or miss approximation of what I actually want.

Specifically, I want:

1. A clean, simple "form" that consists of little more than running lines with money box and workout data.

2. A way to read BRIS/TSN files and generate the following numbers:

Schmidt's TPRs (for all lines), William Scott's Performance Class Ratings, lifetime earnings per start (by surface), and perhaps a "Taulbot-like" single number pace rating.

3. A generic tabbed interface that displays ratings and rankings (so I can model predictive factors) and allows one to sort by factor.

Maybe an extra gimmick or two but that's it.

Thanks to anyone who can offer suggestions.

-clue
(sorry if I'm off topic)

douglasw32
10-11-2005, 07:50 PM
Hi-

I saw that on ebay also but the free thingy at bris does this same thing with little work on your part.

For that matter the simplest of VB coding can grab all the data in the single file format from bris or tsn filter out only the fields you want and then then comma seperate it for use elsewhere, like excell.

send me exactly what ya want and i will take a stab at making a samll exe that grabs just that data and give it to you in comma seperated values for excell.

The thing on ebay may be worth it to someone who has money to spend on it...not saying it would not, just that it is not hard to do.

Tom
10-11-2005, 08:30 PM
http://www.sports-bet-advantage.com/dgrab2.htm

Look familiar?

douglasw32
10-11-2005, 08:35 PM
Tom-

didn't you mention the free tool bris has?
for grabbing what you need, I played with it for a while, doesn't it do the same thing once you build the control file?

Doug

Tom
10-11-2005, 08:40 PM
Infotran...free and works great. You write the template once and use it from then on as you need it. Simple enought to write "specialty" programs for testing an idea or two.

Anyone struggling writing let me know-I came up with a nifty way to write it in Excel easily and ensure I do not miss a filed number. Then save it as a .csv file and it is ready to use.

Handiman
10-12-2005, 01:57 AM
Hi,

How can I get a copy of Infotran you are speaking about?

Thanks,
Handi

Speed Figure
10-12-2005, 02:02 AM
Here's the link. http://www.brisnet.com/cgi-bin/dynamic.cgi?page=utils

Speed Figure
10-12-2005, 02:05 AM
Infotran...free and works great. You write the template once and use it from then on as you need it. Simple enought to write "specialty" programs for testing an idea or two.

Anyone struggling writing let me know-I came up with a nifty way to write it in Excel easily and ensure I do not miss a filed number. Then save it as a .csv file and it is ready to use.

I would love to check this out.

Handiman
10-12-2005, 02:08 AM
Thank you my friend.

Handi

Tom
10-12-2005, 07:45 PM
I would love to check this out.

Say you want to extract fields:

15, 45,346-355, 356-365.

List numbers in clolumn A of Excel

15
45
346
356
-111 (force line)

In column B, enter the formula =A3+1, then A4+1 for the multiple fields.
Drag the column over until you have 10 columns, each with the appropriate numbers no win them.
Then drag and drop or cut and paste everything into cloumn A and you will not have missed or mis-typed any numbers.

15 15 15
45 45 45
346 347 348
356 357 358
-111 -111 -111

Save to a text file, go in and manually add in the commas and save the file.
I don't know how many times I mis-typed a number or left one out trying to
type in everything in a text file.
Also, I save the Excel template in case I need to make changes later on - the basic info is already there and can manipulated easily in a spreadsheet format.

clue
10-12-2005, 09:08 PM
Doug and Tom,

Thank you both for your input.


Doug wrote:

>send me exactly what ya want and i will take a stab at making a samll exe >that grabs just that data and give it to you in >comma seperated values for >excell.




Hi Doug,

Thanks very much for the offer.

I have to assume that extracting the BRIS file data, calculating ratings and formatting output in a simple table format is what you're suggesting. Like I said, I'm out of my depth here but I suspect I could easily think of one feature/adjustment/interface permutation after another and I doubt you have that sort of project in mind :-)

So I'll try to strictly define the fields and ratings I'd like to have:



1. Race Data Header: Race # / Track / Date / Distance / Surface / Type, Age Sex Restictions, Conditions, Claiming Price / Purse.




2. Horse Data: Program #, Horse (partial name ie first 5 letters) / Morning Line / Running Style, Speed Points / Post Position / Lifetime Earnings Per Start (Dirt) / Lifetime Earnings Per Start (Turf) / 1ST Call Pace Rating / 2ND Call Pace Rating / Late Pace Rating / Total Pace (2ND Call Pace + Late Pace) / Days Since Last Race / Bris Power Rating.



Here's an example of the sort of layout I'm picturing:

http://pages.prodigy.net/whoahaw/race.htm


Regarding the four different pace ratings, these are individual paceline dependent and, again, I don't know how far you can go with this. Given the choice, I'd want the ratings derived from an average of the best two "Bris Speed" rated lines from the last four similar distance/surface races.

The Schmidt TPR pace numbers and William Scott "Performance Class Ratings" I mentioned in my post just feel like asking for too much :-)

I have the QBasic code for the TPRs, which I have always run on a Sharp pocket computer. I also have a floppy with a bare bones DOS TPR program which Dick Schmidt gave me. Though I long for auto-generated Scott PCRs, they involve a bit of subjective judgement (although the "Fast Fred Pro" program outputs them) and even an objective BRIS variation (built on the BRIS "Race Ratings") I was going to propose seems problematic.


All ideas and suggestions are very much appreciated.



-clue

douglasw32
10-12-2005, 09:16 PM
WOW :) :)

I haven't gotten that far, I was going along the idea of getting what you need to manipulate the Specific Data pulled from the single file format in a spreadsheet.

The program from BRIS is veryvery good, but I hate steps and procedures.
So I figured out how to pull just what I need automatically from a very small exe program written in vbasic 6 .

Pretty much you click OPEN and navigate to where you unzipeed the program and it pulls just the data you need out of it and seperates it into a csv just like bris's infotran.

The thing is I am not SMART ENOUGH YET! YET... to allow the person using the program to check off just the fields they want like the one on ebay.
soo... I write an individual exe, sorta like tom mentioned doing in his excell for infotran, for each template I need.

I save the source code and can make changes when needed then compile anothe .exe program for use.

Not so much writing a program that will do the MEAT of what you want just a samll utility for pulling out JUST what is needed for you to do the calculations in sat excell ???

Would this help your project...

Doug :)

clue
10-12-2005, 09:31 PM
LOL!

I had a feeling I'd jumped the rail. :p

Mike (Vegas711) put me in touch with a guy who does custom programming. Maybe that's the way to go.

Or else get the ebay app and try to wrestle my ratings/rankings out of Excel.

Excel's never going to spit out adjusted TPRs, is it?


deluded,
clue

douglasw32
10-13-2005, 07:39 AM
Actually what your asking is not really really hard, let me take a stab...based on what you stated allready I would just need to know what the heck a TPR is...

or how it is arrived at?

I like practicing with the VB6 code and need projects to do that...soo...
lets try it.

I tackle parsing info out of the html charts into csv, and am under the belief that visual basic is the wrong tool for the job.

Most likely php like richrosa posts talk about?

well now I am rambling, give me the skinny on the formulas you want in and I will paly around with it for FREE!!! because a programmer wanna be is about all I am at this point ;)

Handiman
10-13-2005, 04:42 PM
Hi Guys,

I use a language called Liberty Basic. It let's you write windows programs in basic that look aand work great. The guy that created LB is Carl Gundel and it's a super easy language to use and learn. It's very cheap. I have nothing to do with them other than being a user.

Anyway, I work with tsn pp's and procapps' pp's, single data files. I have code already written that copies the data into large array and then selects the data from what ever field you want into a smaller array. I don't know how similar VB is to Liberty Basic, but I can make my code available if that would help.

Handi

douglasw32
10-13-2005, 07:08 PM
Handi-

As someone learning on his own, I would love any code from any language that anyone would post!!! along the lines of data manipulation with single file format.

THANKS!

Doug

QuarterCrack
10-13-2005, 08:28 PM
http://www.sports-bet-advantage.com/dgrab2.htm

Look familiar?


This sounds like exactly what I am looking for at the moment - has anyone here used it and have anything to say about it good/bad?

douglasw32
10-13-2005, 08:32 PM
Yes I agree, it sounds like exactly what you need!, I just think it would be very simple to duplicate what they offer in a home grown program :)

Looks like it would do what your wanting though.

clue
10-13-2005, 08:45 PM
Doug and handi,

I believe I've established that I have the programming IQ of a dry rock, though I did type printed basic code into my Sharp handheld twice. :)

So you guys are talking about getting selected data fields out of the Bris CSV file and into Excel via some repeatable automated procedure, right? (please reply in baby talk)

Then the idea is: formulas and formatting?

Doug, here are my proposed horse data fields/ratings from my previous message:


2. Horse Data: Program #, Horse (partial name ie first 5 letters) / Morning Line / Running Style, Speed Points / Post Position / Lifetime Earnings Per Start (Dirt) / Lifetime Earnings Per Start (Turf) / 1ST Call Pace Rating / 2ND Call Pace Rating / Late Pace Rating / Total Pace (2ND Call Pace + Late Pace) / Days Since Last Race / Bris Power Rating.


The olnly formulas necessary are:

1. Lifetime earnings per start (dirt/turf): divide dirt earnings by dirt starts; divide turf earnings by turf starts.

2. Total pace (this is not related to the "TPR" ratings I also mentioned. forget about those for now) which is arrived at by adding the Bris late pace rating to the Bris 2ND call pace rating.

So we've got two formulas: one simple division and one simple addition. Ah, now we're back to my level.

Is there any appeal left in this for you? Can you take a swing at it? If this turns into something useful that'll be monumental. I can always delve into the TPR and PCR formulas later.

I'll be here at the wireless cafe reciting Cramer's "Eleven Winning Exacta Situations" backwards and forwards.

-clue

Tom
10-13-2005, 08:53 PM
http://www.libertybasic.com/

This looks real interesting....I am going to try it out and see how easy it really is. If I can figure it out, it has to worth a lot more!

Will report progress.

Handi, how long did it take you to get something usefull out of it?

douglasw32
10-13-2005, 09:13 PM
I love your humor :)
and yes, I am interested, give me the weekend, I want to try to pull the required information out of the bris/tsn file and export it into excell to manipulate with formulas to get the answers your looking for, the best part is it is repeatable and simple, over and over...

I am sure I can do this, I will post the CODE that makes it happen and the EXE program for any one else to expand on...Like i said I am a newbie at the programming But I need a project.

Handiman
10-13-2005, 10:17 PM
I've been working with it for quite some time on and off. But in the beginning, it was very easy to learn. It's very similar to basic. There is a huge user group with code and all kinds of stuff available.

I love working with it, cause it's simple and the programs turn out just like a windows program. It comes with 'Freeform' which allows you to create a final window you want to have come on the screen and then it writes the code and an outline for you...you then just copy it from the clipboard into your program.

Let me say this again. I have no relationship with Liberty Basic other than being a user. So if anybody decides to use it, you don't have to mention me, cause I don't get anything!

Handi

Handiman
10-14-2005, 01:05 AM
Here is some partial code from one of my programs.


'************************************************* ***************

[tracks] 'This opens box and let's user pick a track to download
filedialog "Select Track", "C:\horse\data\*.pcs", fileName$

if fileName$<>"" then
open fileName$ for input as #Hdata

else

notice "No file chosen!"
goto [tracks]

end if

trackname$ = mid$(fileName$,15,3) 'assign track name so track sele
return

'************************************************* ***************
'************************************************* **************

[counthorse] ' get number of horses in file to get length of file

count = 0

while not(eof(#Hdata))
input #Hdata, t$

count=count+1
wend

numhorse = count/ 1435
close #Hdata

return

'************************************************* ********************************
'************************************************* ********************************

[fillaray] 'routine to fill master array and then pull needed data into individual horse array for later manipulation.
open fileName$ for input as #Hdata

x=0
for x = 0 to numhorse-1
for y = 0 to 1434

Master$(x,y)= inputto$(#Hdata,",")
temp$ = Master$(x,y)
'print #main, temp$ 'just a place to temporarily test what's going into
next y

racess(x,0) = val(Master$(x,2))' race number
rac = racess(x,0)
horseinfo(x,0) = racess(x,0)
condition$(x)=Master$(x,10) ' race conditions today

horseinfo(x,1) = val(Master$(x,3))' post position
l = len(Master$(x,44))
horsename$(x) = mid$(Master$(x,44),2,l-2) 'horses names
'horsename$(x) = Master$(x,44) 'horses names
m = len(Master$(x,209))
runstylel$(x) = mid$(Master$(x,209),2,m-2)
horseinfo(x,2) =val(Master$(x,1327))'speed number for life
horseinfo(x,3) = val(Master$(x,43))' morning line odds
horseinfo(x,4) = val(Master$(x,64))' lifetime starts
horseinfo(x,5) =val(Master$(x,223))' last days away
horseinfo(x,6) =val(Master$(x,265))' next days away
horseinfo(x,7) = val(Master$(x,266))'next days away
horseinfo(x,8) = val(Master$(x,1328))' speed most recent
horseinfo(x,9) = val(Master$(x,223))' # lifetime places
horseinfo(x,11) = val(Master$(x,745))' beaten lengths
horseinfo(x,78) = val(Master$(x,735))
horseinfo(x,10) = val(Master$(x,43))' morning line odds
horseinfo(x,12) = val(Master$(x,315))' distance
horseinfo(x,13) = val(Master$(x,5))' todays dist
horseinfo(x,70) = val(mid$(Master$(x,615),2,1))'finish
horseinfo(x,71) = val(mid$(Master$(x,585),2,1))'2nd call
horseinfo(x,72) = val(mid$(Master$(x,605),2,1))'3rd
horseinfo(x,73) = val(mid$(Master$(x,575),2,1))'1st call

horseinfo(x,74) = val(mid$(Master$(x,576),2,1))'1st call 2nd race back
horseinfo(x,75) = val(mid$(Master$(x,586),2,1))'
horseinfo(x,76) = val(mid$(Master$(x,606),2,1))'
horseinfo(x,77) = val(mid$(Master$(x,616),2,1))'
horseinfo(x,78) = val(mid$(Master$(x,577),2,1))'1st call 3rd race back
horseinfo(x,79) = val(mid$(Master$(x,587),2,1))'
horseinfo(x,80) = val(mid$(Master$(x,607),2,1))'
horseinfo(x,81) = val(mid$(Master$(x,617),2,1))'


next x
close #Hdata
testraces = horseinfo(x,0)
return
'************************************************* *********************
I'm reworking my program to make the data collection and manipulation less bulkier.

Handi

douglasw32
10-14-2005, 07:28 AM
now were cookin

Lou G
10-14-2005, 11:25 AM
Google csved - it's a lot more friendly than Infotran and will get your data ready for Excel.

Tom
10-15-2005, 11:49 AM
Lou G - this looks like what the doctor ordered.

Thanks.

clue
10-15-2005, 04:37 PM
I loaded CSVD and opened a drf file. When the data, you know, like, populated and stuff, I mean when it finally did...I sat back sipping my luke warm americano glaring like Tom's avatar.

So much data and no clue what to do with it.


Doug,

JeffP offers a VB code sample for importing a Bris comma delimited file into a VB program here:

http://www.paceadvantage.com/forum/...ead.php?t=15725


Also, in this thread:

http://paceadvantage.com/forum/showthread.php?p=183226#post183226

Equipace describes his approach thusly:

Just For Info... This is my first post here at PA, and I just had to inject something here since I have been using Excell to handicap horses since the mid 80's. Renaming the .DRF file to .CSV would be useless... There are over 1000 comma separated fields in the .DRF file, and Excel is limited to 256 columns.

There are several good parsing programs on the market... Or you can do what I use to do. Install Microsoft Query (Part of the Office or Excel program CD.) Use the old Past Performance Generator (FREE!) From Bris.

Then Query the .DBF Files From Bris Past Performance Program Folder to Excel... This sounds much harder than it really is. But there are several files you can bring into Excel. I used HANDICP1.DBF, Through HANDICP6.DBF as well as others. First load the card into the Bris Past Performance Generator (Old Ver) not the latesest Custom PP Generator, Then close the program. Start Excel and select Data on the top of the menu bar... Select Import External Data, then New Database Inquiry. Select Dbasefiles* , select Browse and select the .DBF file in the Generatr directory. You can choose just the data fields you feel are important then following the prompts, after a few seconds the data will appear in the spreadsheet. Once you have it set up... Name It & Save It!

Lately, I have been using Equisim ver 5 FV for several months now, because it will export a .CSV comma delimited file with just the information I program it to retrieve and calculate or it can be cut & pasted to Excel. At that point, I can further manipulate the data anyway I choose. It's the biggest bang for the buck on the market bar none. And it can let you handicap the Bris .DRF info your way. And Nathan is always adding new changes to the program that are constantly aproaching limitless possibilities. ;)

BTW, Nathan did not pay me to add this last statement. It's just the facts.

Here is a link to one of the Excel spreadsheets I did awhile back, It is only a sample of the many reports I have created using ES and Excel...This was data exported to Excel from Equisim and then through a series of macros formated into something (a report) that worked for me.

http://www.members.aol.com/equipace/Ex2.xls

Hopefully this helps! Good Luck!
John
~żo

-clue

hcap
10-16-2005, 06:39 AM
I have my own excel program to open all fields in either the TSN .50 cent file-.EG, the TSN procap file-.PCS, or the BRIS single file-.DRF.

All 1400+ fields are opened on 6 rows, each 256 colums or less All fields are numbered. There is an "output" row where any field may be referenced and all data is copied from this output row into a typical database table-one horse at a time. Intermediate formulas may be constructed from the raw data fields and referenced as well, Which is what I do.

Also it runs in a batch mode. You put data files unzipped in one sub directory and each will be opened in sequence. You may process a month of data files for a specific track automatically. It also will extract information from the corresponding result files (xrd)-if you have them, and have put them unzipped in another sub directory. It extracts win, place, show prices, exacta prices, off odds, and determines if any horses were scratched, or if any races were cancelled.

It is set to output one hundred factors. Either raw or calculated. It can output max 256 factors on one sheet. I can set it up to create multiple tables on multiple sheets. I will give it to anyone who is interested and has some understanding of excel.

Be aware that sometimes the raw data may be missing certain fields, or for instance in the EG files you wil get a "/" instead of a 99 if a horse did not finish. You will have to set up some error correcting formulas.

I have not tested the BRIS XRD files. But if the file structure is the same as the TSN XRD file, at least up to the first 100 fields it should work. If anyone can supply me with a DRF file and the corresponding XRD file I will test it.
All of my actual use is with the EG or PCS files. It will work on excel 2000 and later versions. I have not tested it with excel '97. On my machine, an athlon 1500 256 megs memory it takes approx.10 seconds to process one card.
One friend with a newer machine does it in 5.

I am only giving it to those who have a working understanding of excel. If you are not familiar with excel you may have some difficulty building calculations. Some of my own derived formulas like trainer and jockey stats, will give you an idea of what you can do.

douglasw32
10-17-2005, 12:22 AM
Clue,

Thanks those posts are what got me into this rogramming heaven :)

and equisim...WOW love it, plan on buying it

as for the program nailed it, now I am making it pretty, and documenting the source code...just a few more days (monday is back)

I wish Monday would go away :(

socantra
10-20-2005, 02:01 PM
Here is some partial code from one of my programs.......................................... ..

I'm reworking my program to make the data collection and manipulation less bulkier.

Handi

Thanks Handi for the code samples. It looked familiar enough that I went ahead and ordered the Liberty Basic Gold package. Price is right and they have improved it considerably since I looked at it several years ago. It looks like it might be suitable for us old basic duffers who want to do some personal programming without jumping into all the complexities of the "modern, serious" programming languages.

Have you found anyone else working on handicapping programs in Liberty Basic?

socantra...

headhawg
10-20-2005, 04:19 PM
Thanks Handi for the code samples. It looked familiar enough that I went ahead and ordered the Liberty Basic Gold package. Price is right and they have improved it considerably since I looked at it several years ago. It looks like it might be suitable for us old basic duffers who want to do some personal programming without jumping into all the complexities of the "modern, serious" programming languages.

Have you found anyone else working on handicapping programs in Liberty Basic?

socantra...
After looking some of the things on their site, as well as handi's code, I agree it looks like an "old basic duffer's" kind of language. However, I sent them two emails -- the first one a week ago -- and they have yet to respond. Not thrilled with their pre-sale customer service so far, so it leaves me more concerned about customer support after the sale.

socantra
10-20-2005, 08:13 PM
Try them again. So far, all of my communications have been answered within 24 hours.

The developer's name is Carl Gundel, and the actual product appears to be a largely one man show. There is however a large user base, and a great deal of the support and development appears to be third party and GNU licensed, including a compiler for stand alones Its been in existence for over ten years and is considerably more impressive looking now than when I checked it out several years ago. The current version is v4.02 and last time I looked it was v2. something.

He's also got a free project going called Justbasic.

socantra...

Handiman
10-22-2005, 01:01 AM
Hi Guys,


I don't know of anybody else working on handicapping. But it is a wonderfull language to use. There is a huge user group and info all over the place. Carl is just about a one man show like you said. Sometimes I've had trouble getting a response from support, but there are so many people that are available to get help from, that shouldn't really be a problem.

A woman named Alyce, she has Alyce's restaurant I think it's called, and she is just about a Liberty Basic expert. She has helped a gazillion people.


Handi

P.S. One blonde says to her friend, I read in the paper that 2 Brazilian workers were killed yesterday. Her friend says, how many is a brazillian? :lol:

douglasw32
10-23-2005, 09:24 AM
Here is the VB6 (visual basic 6) code for making a comma seperated file from a bris single drf file...
next step would be to make iut so you do not have to type in the name of the file but can just select it with a GUI, and to be able to select WHAT you want from the entire drf file with check boxes before processing instead of hardcoding it each time.
but this is a start and is the ground work for future projects.

hope it adds to something for someone.

begin code=
--------------------------------------------------------------------------

'Released under the GNU General Public License
'``````````````````````````````````````````
'Do whatever you want with it, but give back your results ;)
'The following link define the drf(values)
'http://brisnet.com/cgi-bin/static.cgi?page=drfsff
'
'``````````````````````````````````````````
Dim drf(1435)
Public FILE As String 'make FILE a string
Dim printthis As String 'make printthis a string
Dim race As Integer 'make race a number
Dim countit As Integer 'make count a number
Dim horse As String 'make horse a string


'The Button to open the downloaded Bris file
Private Sub Command1_Click()
FILE = InputBox("Enter File Name:")
If Not FILE = "" Then
Call ReadAFile(FILE) ' calls the subroutine we will use
End If
End Sub

'``````````````````````````````````````````
'Read bris/tsn file (it has to be a bris single file format drf file
'and has to be located in the same folder as the execuatbale file)
'Now we will, store it in a string,then put it into html format
'``````````````````````````````````````````

Private Sub ReadAFile(FILE) 'Name the subroutine

'Set up for errors
Err.Clear
On Error GoTo handler:

Open "racedata.csv" For Output As #2 'open the Comma File to write to it

printthis = "" 'reset the string we will put into the CSV file

Open FILE For Input As #1 'opens the drf file we selected for reading
race = 0 'set race to be the first
horse = "" 'set horse to be blank
countit = 0 'set count to 0
Do While Not EOF(1) 'does the folowing until the END OF THE FILE

'Read All fileds of a Single Horse each time it loops

For j = 1 To 1435
Input #1, fileField
drf(j) = fileField
Next j
countit = countit + 1 'count number of loops

'``````````````````````````````````````````
'Print to file
'
'Track and date
'``````````````````````````````````````````
If countit <> 1 Then GoTo startraces:
printthis = drf(1) & "," & drf(2)
Print #2, printthis
printthis = ""
'``````````````````````````````````````````
'Then any Race Data First
'``````````````````````````````````````````
startraces:
If drf(3) = race Then GoTo horse: 'if not new race skip printing
printthis = drf(3) & "'" & drf(6) / 220 & "," & drf(16)
Print #2, printthis
printthis = ""
race = race + 1
'``````````````````````````````````````````
'Any Horse Data Next
'``````````````````````````````````````````
horse:
If drf(45) = horse Then GoTo pplines: 'if not new horse skip printing
printthis = drf(43) & "," & drf(44) & "," & drf(45) & ","
printthis = printthis & drf(210) & "," & drf(211) & "," & drf(28) & "'" & drf(33)
Print #2, printthis
printthis = ""


'``````````````````````````````````````````
'Then The last 10 Races put in whatever data you want taken from the data file
'
'race 1
'``````````````````````````````````````````
pplines:
If drf(256) = "" Then GoTo nomorelines:
printthis = drf(616) & "," & drf(396)
printthis = printthis & "," & drf(846)
Print #2, printthis
printthis = ""
'``````````````````````````````````````````
'race 2
'``````````````````````````````````````````
If drf(257) = "" Then GoTo nomorelines:
printthis = drf(617) & "," & drf(397)
printthis = printthis & "," & drf(847)
Print #2, printthis
printthis = ""

'``````````````````````````````````````````
'race 3
'``````````````````````````````````````````
If drf(258) = "" Then GoTo nomorelines:
printthis = drf(618) & "," & drf(398)
printthis = printthis & "," & drf(848)
Print #2, printthis
printthis = ""
'``````````````````````````````````````````
'race 4
'``````````````````````````````````````````
If drf(259) = "" Then GoTo nomorelines:
printthis = drf(619) & "," & drf(399)
printthis = printthis & "," & drf(849)
Print #2, printthis
printthis = ""
'``````````````````````````````````````````
'race 5
'``````````````````````````````````````````
If drf(260) = "" Then GoTo nomorelines:
printthis = drf(620) & "," & drf(400)
printthis = printthis & "," & drf(850)
Print #2, printthis
printthis = ""
'``````````````````````````````````````````
'race 6
'``````````````````````````````````````````
If drf(261) = "" Then GoTo nomorelines:
printthis = drf(621) & "," & drf(401)
printthis = printthis & "," & drf(851)
Print #2, printthis
printthis = ""
'``````````````````````````````````````````
'race 7
'``````````````````````````````````````````
If drf(262) = "" Then GoTo nomorelines:
printthis = drf(622) & "," & drf(402)
printthis = printthis & "," & drf(852)
Print #2, printthis
printthis = ""
'``````````````````````````````````````````
'race 8
'``````````````````````````````````````````
If drf(263) = "" Then GoTo nomorelines:
printthis = drf(623) & "," & drf(403)
printthis = printthis & "," & drf(853)
Print #2, printthis
printthis = ""
'``````````````````````````````````````````
'race 9
'``````````````````````````````````````````
If drf(264) = "" Then GoTo nomorelines:
printthis = drf(624) & "," & drf(404)
printthis = printthis & "," & drf(854)
Print #2, printthis
printthis = ""
'``````````````````````````````````````````
'race 10
'``````````````````````````````````````````
If drf(265) = "" Then GoTo nomorelines:
printthis = drf(625) & "," & drf(405)
printthis = printthis & "," & drf(855)
Print #2, printthis
printthis = ""

'Last Race Done Now Continue to do things with the data in vbasic or just use the CSV generated for Excell or Access etc.

nomorelines:
horse = drf(45)
Loop 'Do it all again until no more horses

handler: 'displays error if one is hit
If Not Err.Number = 0 Then
MsgBox Err.Number & " " & Err.Description, vbCritical, "Error"
Err.Clear
End If

Close #1 'close the read file

Close #2 'close the CSV file

End Sub 'End subroutine




-----------------------------------------------------end code-------------


P.S. I will now try to attache the source files and the EXE itself.

Handiman
10-23-2005, 08:04 PM
I download tsn files into C:\horse\data and when I use my program, it lets you click on track menu and a listbox opens up with all the tracks held in that file and then you just click on the one you want and the info is imported into the program and with a click on handicap, a listbox opens up and you can select race number, and then a scratch box opens to allow you to scratch horses and then when done, the data display appears on the screen.

If anybody interested I can post some more code that accomplishes all that. At least the stuff that gets you to the scratch box.

Handi :)

douglasw32
10-23-2005, 11:28 PM
PLEEEEEAASE :) willing to learn from any of it.

socantra
10-24-2005, 02:14 AM
Wow. That's an offer I can't refuse. Please post whatever you are willing to. I'm just starting my study of Liberty Basic, so a lot of it won't make much sense yet, but it sounds like a wonderful learning tool to keep my nose to the grindstone.

socantra...

Handiman
10-24-2005, 03:12 AM
Here is code to open tsn file...

[tracks] 'This opens box and let's user pick a track to download
filedialog "Select Track", "C:\horse\data\*.pcs", fileName$


if fileName$<>"" then
open fileName$ for input as #Hdata


else


notice "No file chosen!"
goto [tracks]


end if


trackname$ = mid$(fileName$,15,3) 'assign track name so track sele
return

Actually here is the whole first part up to the date load for the 2nd race.

Have fun.

nomainwin
WindowWidth = 785
WindowHeight = 455
UpperLeftX=int((isplayWidth-WindowWidth)/2)
UpperLeftY=int((isplayHeight-WindowHeight)/2)

BackgroundColor$ = "buttonface"
ForegroundColor$= "black"

Dim Master$(1434)
Dim race1(17,35)
Dim race2(17,35)
Dim race3(17,35)
Dim race4(17,35)
Dim race5(17,35)
Dim race6(17,35)
Dim race7(17,35)
Dim race8(17,35)
Dim race9(17,35)
Dim race10(17,35)
Dim race11(17,35)
Dim race12(17,35)
Dim horsename1$(17)
Dim horsename2$(17)
Dim horsename3$(17)
Dim horsename4$(17)
Dim horsename5$(17)
Dim horsename6$(17)
Dim horsename7$(17)
Dim horsename8$(17)
Dim horsename9$(17)
Dim horsename10$(17)
Dim horsename11$(17)
Dim horsename12$(17)
DIM name$(17)
Dim singlerace(17,40)
Dim speednums(8,150)
Dim speedrate(8,150)
Dim beatenlengths(22)
Dim jonesspeed(10,50)
Dim races$(12)
Dim f5(86)

races$(0) = "Race 1"
races$(1) = "Race 2"
races$(2) = "Race 3"
races$(3) = "Race 4"
races$(4) = "Race 5"
races$(5) = "Race 6"
races$(6) = "Race 7"
races$(7) = "Race 8"
races$(8) = "Race 9"
races$(9) = "Race 10"
races$(10) = "Race 11"
races$(11) = "Race 12"
beatenlengths(0)= 0.2
beatenlengths(1)= 0.4
beatenlengths(2)= 0.6
beatenlengths(3)= 0.8
beatenlengths(4)= 1
beatenlengths(5)= 1.2
beatenlengths(6)= 1.4
beatenlengths(7)= 1.6
beatenlengths(8)= 1.8
beatenlengths(9)= 2
beatenlengths(10)= 2.2
beatenlengths(11)= 2.4
beatenlengths(12)= 2.6
beatenlengths(13)= 2.8
beatenlengths(14)= 3
beatenlengths(15)= 3.2
beatenlengths(16)= 3.4
beatenlengths(17)= 3.6
beatenlengths(18)= 3.8
beatenlengths(19)= 4
beatenlengths(20)= 5
beatenlengths(21)= 6








global bl,bl1,d,e,f1,f2,time,speed,R
' BeginGUIobjectscode

statictext #one.statictext1, "TRACKS", 520, 22, 54, 20
textbox #one.textbox2, 490, 47, 100, 25
statictext #one.statictext3, "1.", 475, 52, 10, 20
statictext #one.statictext4, "2.", 475, 82, 10, 20
textbox #one.textbox5, 490, 77, 100, 25
statictext #one.statictext6, "3.", 475, 112, 10, 20
textbox #one.textbox7, 490, 107, 100, 25
statictext #one.statictext8, "4.", 475, 142, 10, 20
textbox #one.textbox9, 490, 137, 100, 25
statictext #one.statictextl0, "5.", 475, 172, 10, 20
textbox #one.textbox11, 490, 167, 100, 25
textbox #one.textbox13, 610, 47, 30, 25
textbox #one.textbox14, 610, 77, 30, 25
textbox #one.textbox15, 610, 107, 30, 25
textbox #one.textbox16, 610, 137, 30, 25
textbox #one.textbox20, 610, 167, 30, 25
button #one.button18, "Quit for the day", [quit], UL, 310, 377, 109, 25
statictext #one.statictext19, "Races", 630, 0, 40, 20
statictext #one.statictext20, "Handicapped", 610, 22, 83, 20

' Begin menu code

menu #one, "Load track", "Track 1.", [firsttrack], "Track 2.", [secondtrack]
menu #one, " Handicap", "Track-1.", [handicap.1], "Track-2.",[handicap.2]

' End menu code
open "Simulator Super System" for window as #one
print #one, "font ms sans serif 0 16"
print #one, "trapclose [quit]"

[one.inputLoop] 'wait here for input event
wait

[closeprogram] 'Perform action for the button named 'button18,
goto [quit]
[firsttrack] 'Perform action for menu Load track, item Track 1.

'************************************************* *********
gosub [tracks] 'al

gosub [counthorse] 'bl
gosub[load_speed_dat]
gosub[fillaray] 'mastersubroutinetofillmaster array





goto [one.inputLoop]
'************************************************* ***************

[tracks] 'This opens box and let's user pick a track to download
filedialog "Select Track", "C:\horse\data\*.pcs", fileName$

if fileName$<>"" then
open fileName$ for input as #Hdata

else

notice "No file chosen!"
goto [tracks]

end if

trackname$ = mid$(fileName$,15,3) 'assign track name so track sele
return

'************************************************* ***************
'************************************************* **************

[counthorse] ' get number of horses in file to get length of file

count = 0

while not(eof(#Hdata))
input #Hdata, t$

count=count+1
wend

numhorse = count/ 1435
close #Hdata

return

'************************************************* ********************************
[fillaray] 'routine to fill master array and then pull needed data into individual horse array for later manipulation.
open fileName$ for input as #Hdata
ax = 0
bx = 0
cx = 0
dx = 0
ex = 0
fx = 0
gx = 0
hx = 0
ix = 0
jx = 0
kx = 0
lx = 0
for zz = 0 to numhorse-1
for y = 0 to 1434
Master$(y)= inputto$(#Hdata,",")
next y
select case val(Master$(2))
case 1
l = len(Master$(44))
horsename1$(ax)= mid$(Master$(44),2,l-2) 'horses names
race1(ax,0) =val(Master$(1327))'speed number for life
race1(ax,1) =val(Master$(43)) ' mlo
race1(ax,2)= val(Master$(1328))' recent speed
race1(ax,3)= val(Master$(5))' todays dist
race1(ax,4) =val(Master$(223))' last days away
race1(ax,5) =val(Master$(265))' next days away
race1(ax,6) = val(Master$(266))'next days away
race1(ax,7) = val(mid$(Master$(615),2,1))'finish
race1(ax,8) = val(mid$(Master$(585),2,1))'2nd call
race1(ax,9) = val(mid$(Master$(605),2,1))'3rd
race1(ax,10) = val(mid$(Master$(575),2,1))'1st call
race1(ax,11) = val(mid$(Master$(576),2,1))'1st call 2nd race back
race1(ax,12) = val(mid$(Master$(586),2,1))'
race1(ax,13) = val(mid$(Master$(606),2,1))'
race1(ax,14) = val(mid$(Master$(616),2,1))'
race1(ax,15) = val(mid$(Master$(577),2,1))'1st call 3rd race back
race1(ax,16) = val(mid$(Master$(587),2,1))'
race1(ax,17) = val(mid$(Master$(607),2,1))'
race1(ax,18) = val(mid$(Master$(617),2,1))'
race1(ax,19)= .10 * (int(val(Master$(315))/220)*10)'last dist
test = race1(ax,19)
race1(ax,20)= val(Master$(316))/220'1 back dist
testdist1 = race1(ax,20)
race1(ax,21)= val(Master$(1035))' final time last race
timetest = race1(ax,21)
race1(ax,22)= val(Master$(1036))' final time 1 race back
timetest2 = race1(ax,22)
race1(ax,23)= int(val(Master$(745)))' beaten lengths last race
race1(ax,24)= int(val(Master$(746)))' beaten lengths 2 race back
race1(ax,25)= val(Master$(64))' lifetime starts
race1(ax,30)= val(Master$(815))' late pace

if race1(ax,20) = 0 then ' check to see if only one race run
deadend = 0
else
f2 = race1(ax,24)' beaten lengths 2 back
if f2 > 20 and f2 < 26 then ' checking to make sure beaten lengths are under 23
f2 = 21
end if
if f2 > 25 then
f2 = 22
end if
end if
if race1(ax,19) = 0 then ' check to see if first time starter
goto [firsttime_starter]' if horse first time starter then skip getting jones speed numbers
else
f1 = race1(ax,23)' beaten lengths last
if f1 > 20 and f1 < 26 then ' checking to make sure beaten lengths are under 23
f1 = 21
end if
if f1 > 25 then
f1 = 22
end if
end if
gosub [jones_beatenlengths] ' go get beaten lengths time adjustments
time1 = .10 * int((bl + race1(ax,21))*10) ' add beaten lengths seconds to final time
test = time1
time2 = .10 * int((bl2 + race1(ax,22))*10)' same as above
test1 = time2
d1 = race1(ax,19)'dist last
d2 = race1(ax,20)' dist
If race1(ax,19) = 0 then ' get number for dist for index on jones speed
race1(ax,19) = 0
else
select case d1
case 5
d = 0
case 5.5
d = 1
case 6
d = 2
case 6.5
d = 3
case 7
d = 4
case 8
d = 5
case 8.5
d = 6
case 9
d = 7
case 10
d = 8
case 12
d = 9
end select
end if
time = time1 ' transfer last race final time to global variable
gosub [jones_speed]
race1(ax,27) = speed ' jones speed rating for last race
testm = race1(ax,27)
speed = 0
speedtest = race1(ax,27)
If race1(ax,20) = 0 or int(10*race1(ax,20)) = 83 then ' get number for dist for index on jones speed
race1(ax,20) = 0
else
select case d2
case 5
d = 0
case 5.5
d = 1
case 6
d = 2
case 6.5
d = 3
case 7
d = 4
case 8
d = 5
case 8.5
d = 6
case 9
d = 7
case 10
d = 8
case 12
d = 9
end select
end if
time = time2 ' transfer 2 races back final time to global variable
gosub [jones_speed]
race1(ax,28) = speed ' jones speed number for 2 races back
testm = race1(ax,28)
speed = 0
[firsttime_starter] ' landing spot for jump over if haorse first time starter
' get total numbers for horses calls factors
for poop = 8 to 18
if race1(ax,poop) = 1 then
race1(ax,29) = race1(ax,29) + 3
end if
if race1(ax,poop) = 2 then
race1(ax,29) = race1(ax,29) + 2
end if
if race1(ax,poop) = 3 then
race1(ax,29) = race1(ax,29) + 1
end if
next poop

ax = ax + 1
numhorse1 = ax
numrace = 1

case 2


Handi

douglasw32
10-24-2005, 08:44 AM
Thanks :)

headhawg
10-24-2005, 09:30 AM
...
' get total numbers for horses calls factors
for poop = 8 to 18
if race1(ax,poop) = 1 then
race1(ax,29) = race1(ax,29) + 3
end if
if race1(ax,poop) = 2 then
race1(ax,29) = race1(ax,29) + 2
end if
if race1(ax,poop) = 3 then
race1(ax,29) = race1(ax,29) + 1
end if
next poop
...

The developer finally replied to my emails so I too got on board the Liberty Basic programming wagon. Handi, they should probably give you some kind of commission. I tried using VB6 but never liked the approach of drawing the objects and then writing code to attach to them.

BTW, thanks for the coding examples, and I sure love your choice of variable name. :D

richrosa
10-24-2005, 10:30 AM
I've been following this thread that has morphed into a dicsussion about programming, most specifically about Basic, then further about Liberty Basic.

I make my living by producing commercial software. For the last 10 years, its been all web-enabled software, so I have a specific point of view. From this I'd like to make a couple of comments that you may like to consider.

1) Proprietary Platforms and languages never win long term - If you choose a proprietary platform you are stuck in that vendors implimentation. All information and support usually decends from the vendor. If the vendor is disinterested in a feature or a bug, it goes nowhere. In the long term either the platform gets adopted widely or becomes marginalized when developers jump to the standard platforms. When that happens support suffers from the vendor.

2) Larger development communities help the developer - In the VB, Java, PHP, Perl, and other worlds where there are a large base of developers, those developers document enhancements, libraries, bugs, workarounds, tips and tricks. I've been saved thousands of times from documented issues and problems that others have encountered and posted.

3) Web-based languages are easier to program - (I'm ready for the flame here) With the exception of ASP, which IMHOO was a kludge, web-based languages are easier to learn and program, assuming one has a simple grasp on HTML. With event-driven languages you need to accomodate those events then a User Interface (UI) on top of that. In web-based programming events are confined to a simple GET or POST when a user chooses a link or a submit button. Its a simpler chain to follow. Secondly, the UI base is already built and contained in a web browser, the developer just needs to report the presentation layer in HTML which is far simpler than many of the event-driven programming languages.

4) Open Source helps the small developer - With millions of developers around the world documenting problems, and tricks based on free software, one cannot ignore the value of piggy-backing off the intellectual property of others. If you've ever posted a question to an open-source board and got a quick response from dozens of developers you know what I mean.

Sorry this sounds like a rant, I wrote this quick, but I wanted to submit a few ideas for our new developers to consider.

headhawg
10-24-2005, 11:40 AM
richrosa,

Speaking for myself -- a coding "dabbler" and not a professional -- there was some comfort in the familiarty of the style and syntax of LB. Add that to the fact that there is a GUI creator called Freeform that will generate the code for the user interface and I figured it was worth a try. And actually, I had no intention of writing a program until reading this and the parsing HTML charts threads.

And as a matter of fact I did look at another language. About 4 or 5 weeks ago based on one of your previous posts I downloaded your sample code (PHP Bris) from the link you provided. As I didn't have PHP or MySql I searched around and found WAMP v5.1 which installed the latest versions of PHP, Apache, and MySql on my XP box through a single installation process -- EZ. Long story short, I got things running and then tried to make your code work and got several errors. I discovered what I did wrong -- up until the point that it said that I was using the wrong password and didn't have administrative rights, something like that (not a Windows error). All this before I even tried to write my own program. Pretty much gave up at that point as I didn't feel like investing time in making things work and not producing code.

So for me, not being a gifted coder, I feel that LB gives me the best chance to actually produce something that works given that I have a limited amount of time to devote to programming of any kind. However, I can't see where LB is going to be able to integrate very well into a database, so at some later point I will be spending some time learning PHP and MySql.

HH

richrosa
10-24-2005, 12:06 PM
Greetings Headhawg,

I'm glad you tried my stuff. I'm sorry you didn't get it working all the way. You can always email me and I'll try to help. IM at night is good too. I do travel a lot and sometimes I can't get to help as quick as I would like.

I need to make an addition in the to the (very small) README file.

In the file index.php, the following need to be filled out to correspond to your MySQL settings. You should create a MySQL user with privleges to the handicappingOS database so that the PHP server can get access to it.

// database type
$db_databaseType = "mysql";
// MySQL host
$db_hostname = "localhost";
// MySQL username
$db_user = "root";
// MySQL password
$db_password = "";
// MySQL database
$db_database = "handicappingOS";

I'm glad you found WAMP, as I call application server in a box. As you can see its truly simple and FREE to get that working.

I'm not exactly trying to steer anyone to PHP or my stuff, just trying to help people consider attributes that professional programmers would consider.

In my thread, I'm trying to make a point that the web-based languages are easier to use and to get help using. I can support that Liberty Basic is easier to learn initially out of the box , but there are thousands of PHP websites verus a handful for Liberty Basic. There 208 Barnes & Noble PHP books, and none for Liberty Basic.

My personal opinion is that you should make sure your investment in learning will pay off before you lock in.

Regards,
Richard Rosa

clue
10-24-2005, 09:53 PM
Doug,

Thanks for posting the .exe

I converted a sample bris file to csv and opened it in CSVed. Sure enough, there it is - 560 records with 2 columns. For some reason it's mostly comments I see. So, uh, I think I'm making progress or something. I'm going to stare at it for a while before dinner.

And I'd like to say how totally bitchin' I think you programmers are constructing logical tools bit by bit. I want to learn to do it too. I think Rich makes good points regarding open standards and large user bases. A friend suggested Python might be a good language to learn.

I've purchased a couple little homespun handicapping programs off ebay in the past week just to see what others have done and because I like to support quiet loners and oddball geniuses.


-clue

eating thread dust

douglasw32
10-24-2005, 11:35 PM
I need to point out that RichRosa is serious when he says contact him, he even IM's me when he's playing to just shoot comments back and forth at night.

On the programmers note, I too do web design as a profession (not the programming part so much like rich) I must say after 'consulting' many a newbie on what the web pages actually are and "do" and why??? that to get set up to program on the web is harder than learning HOW to program the web for most.

Learn what make the internet tick first and the rest follows real easy like ;)

Clue the code I wrote only pulls a few very few parts of the whole drf file... thats the drf(some number) variable with the & "," & between them...

those some number parts are from the bris file explanation at brisnet.com under the library link.

So you are seeing the right stuff, just the stuff I "hard coded in" you would need to add, subtract, modify the fields you want pulled or stuffed into the CSV file...

I am hoping next weekend (this weekends breeders cup) to make it possible to just checkmark EVERY SINGLE FIELD YOU WANT in a GUI, and hit "PROCESS" to have it cick out that file.

That I am sure I can make happen, now hmmmm, how will i dsave those selections into templates to reload rather than having to check them off each time????? this I do not know but I plan to figure it out :)

Doug.

BTW- IN PHP with some HTML and a MYSQL database this projectI describe might take a total of 30 miniutes to make happen with RICH's Open Source code underneath doing all the data pulling work ;)

clue
10-25-2005, 04:13 PM
ok doug,

thanks for the tips and for sharing your work.

much appreciated.


-clue

socantra
10-25-2005, 07:47 PM
The contribution of code from everyone is much appreciated. Handi, I will be following your code closely as I study Liberty Basic and having an example project that I am actually interested in should be an enormous help.

Douglas, I will be very interested in comparing the VB code with the Liberty Basic code and curious about the similarities and differences.

Rich, you have certainly been very helpful and have sent me a great deal of support materials for your PHP/MYSQL approach. Unfortunately, after about three days of playing with it, I started getting the same sort of headaches I haven't had since I was working with dBase II many years ago.

My last programming was punching Basic into a Sharp pocket computer. Most of my experience comes from old numbered line basic that you had to do to make your TRS80 computer functional, and diagnostic programming I did as a hardware tech.

I make a good bit of my living from my handicapping and my only interest in programming is that I have never used someone else's program that I was completely comfortable with and had a firm grasp on the inner workings of. Hopefully, Liberty Basic will afford me that opportunity without a very steep learning curve.

I can appreciate your reservations as a professional software developer, but I'm coming at the whole thing from a completely different perspective. Liberty has been around for over a dozen years and has a fairly vigorous user community which has been responsible for a lot of the development of the program. Yes, it is limited and it certainly cannot compete with Java, Perl, PHP and VB in terms of user base, but for under $40 you get the complete language with documentation, a compiler, several years worth of newsletters, an eBook and a fairly vigerous, if small user base.

It would probably come in as a hobbyist language and I would certianly not recommend it for serious professional development. That being said, not everyone is interested in a "serious" language with a steep learning curve and what is an easy language for you to learn may well be something totally different for a non-programmer. As I mentioned in an earlier post, I think it serves a very useful niche as an 'old duffers basic' that allows a fairly easy interface with windows. I have hopes that it may meet my needs.

socantra...

douglasw32
10-26-2005, 08:25 AM
Sounds like it will :) and looks like we all have our own ways of aproaching the same problem....

Thats the great thing about technologies.

socantra
10-28-2005, 11:48 AM
Yes, in reading this and the other thread on programming, it is rather amazing the number of alternatives offered up as choices to do the job.

I do have to say that, even though I have chosen the 'quick and dirty' route of Liberty Basic as my preferred platform for the immediate future, I do think that Rich Rosa's web-based ideas show incredible potential for the future, especially in terms of tying into tote board odds and other internet information that either hasn't been considered, or may not even exist at this point.

Unfortunately, it requires skills that I do not posess and have decided are too many tricks for this 'old dog' to learn.

socantra...

Handiman
10-28-2005, 11:13 PM
I want to make note, that although the code I offered up, looks a bit intense maybe, I too am just a hobbyist programmer. If I were to become serious, I would probably move on to a web based language...but I don't ever plan on that, becoming serious that is...just trying to live and not die...kinda like james Bond...but in the programming world.


LB is just fun and I thought some people might enjoy it. I do have a project I'm working on, and when I get the BETA version done, I'm wondering if anyone here would like to test it for me...say maybe for 30 days or so. Just a thought.

Handi

traynor
10-31-2005, 12:10 AM
Socantra wrote: <It would probably come in as a hobbyist language and I would certianly not recommend it for serious professional development. That being said, not everyone is interested in a "serious" language with a steep learning curve and what is an easy language for you to learn may well be something totally different for a non-programmer. As I mentioned in an earlier post, I think it serves a very useful niche as an 'old duffers basic' that allows a fairly easy interface with windows. I have hopes that it may meet my needs.>

A suggestion: Before you put a lot of time and effort into something, you may do yourself a huge favor by checking out Python. Like PHP, it is freely available, well supported, lots of stuff to go with it, and if you have written BASIC for a hand-held, it will look like old home week.

The only problem is that a lot of the "free" documentation is worth every penny you pay for it. To avoid a huge cognitive overload caused by earnest programmers who should have equally earnest writers doing the writing rather than attempting to do it themselves, try http://www.melonfire.com/community/columns/trog/archives.php?category=Python and the Python 101 series. Easy stuff, introduced gently, and in short order you will be able to do some really amazing stuff.

The basics are easy, and that is all you need to start. Python stands alone, runs off the command line like BASIC (interpreted, rather than compiled), which reduces complexity substantially. Python 101 is a series of very simple introductory lessons in how to do various things, short, easy to read, and lets you get started with minimal effort.

Python is great for "quick and dirty" utilities to do specific things (like download files automatically), but can be used for "full-featured applications." If you like buttons and text boxes, you can add to the basic DOS-like shell editor ("IDLE") with wxPython (a set of free widgets and tools), and a really simple "visual" GUI builder called Boa Constructor. All free. If you decide to try it out, do a search on the "Python Cookbook," which is a source for tons of utility routines that you can cut and paste into whatever you are doing.

Like PHP, Python has many forums and bulletin boards where you can all the help anyone could possibly want--again, all for free. It is a good system that works well.
Good luck

michiken
11-08-2005, 08:43 PM
This is a sample of what can be done with PHP and MYSQL (both are open source software).

Not only can you graph speed figs, but ability times, final fractions etc.