Two Plus Two Newer Archives

Two Plus Two Newer Archives (http://archives1.twoplustwo.com/index.php)
-   Software (http://archives1.twoplustwo.com/forumdisplay.php?f=47)
-   -   What computer language to use for simple hand result calculations (http://archives1.twoplustwo.com/showthread.php?t=517014)

Troll_Inc 10-06-2007 03:56 PM

What computer language to use for simple hand result calculations
 
Here's what I want to do:

1. I have 10,000 hand results (just net win/loss) in excel.

2. I want to do simple math calculations on these hands.

What is the best computer language for someone who hasn't programmed since using Basic 20+ yrs ago. I have a PC with XP.

yli 10-06-2007 04:15 PM

Re: What computer language to use for simple hand result calculations
 
Excel?

TheIrishThug 10-06-2007 04:32 PM

Re: What computer language to use for simple hand result calculations
 
You can even still use Visual Basic for Applications in Excel if you need to do real computations beyond cell formulas.

Troll_Inc 10-06-2007 07:19 PM

Re: What computer language to use for simple hand result calculations
 
Sorry, I want to set this up so that I can do multiple sets of hands.

I use Excel daily, and I think some of the things that I want to do will require some automation that I don't know if Excel will do. For example, I want the program to upload a set of hands of variable size. Then take out all the hands that are zeros. Stuff like that. Can Visual Basic for Applications in Excel do stuff like this?

_dave_ 10-06-2007 07:48 PM

Re: What computer language to use for simple hand result calculations
 
[ QUOTE ]

Can Visual Basic for Applications in Excel do stuff like this?


[/ QUOTE ]

It can certainly take out the hands that are zeros, however:
[ QUOTE ]

I want to set this up so that I can do multiple sets of hands.


[/ QUOTE ][ QUOTE ]
I want the program to upload a set of hands

[/ QUOTE ]

If I understand this correctly, you have a load of Excel files you wish to process?

If so, Excel automation via WSH - using JScript or VBScript may be a sensible option - then you could just set it going on a folder full of Excel files, and it would open/process/close as needed.

TheIrishThug 10-06-2007 10:07 PM

Re: What computer language to use for simple hand result calculations
 
You can write a full text parser for hand histories in VBA, if you want to. Bringing up an Open dialog, selecting multiple files, read in each line and storing the values (or formulas) however you want them in the spreadsheet is not complicated. You can also add sheets and charts and format almost everything the way you could do with the various GUIs in Excel.

BradleyT 10-07-2007 04:27 PM

Re: What computer language to use for simple hand result calculations
 
Microsoft Visual Basic 2005 Express Edition - free.

Troll_Inc 10-10-2007 10:53 PM

Re: What computer language to use for simple hand result calculations
 
[ QUOTE ]

If I understand this correctly, you have a load of Excel files you wish to process?

If so, Excel automation via WSH - using JScript or VBScript may be a sensible option - then you could just set it going on a folder full of Excel files, and it would open/process/close as needed.

[/ QUOTE ]

OK, I fiddled around enough to do some basic Vscripts.

I found the following script:at this website.


The explanation is pretty good, but I can't figure out what this line does:

Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")

_dave_ 10-11-2007 06:11 AM

Re: What computer language to use for simple hand result calculations
 
As far as I can guess, that line connects to WMI service so he can later get a file listing from it - allowing the script to work on remote machines identified by name.

Probably not necessary in your case, but I guess useful if you wanted to make a script to process a similar file from various employees machines or something?

If you haven't seen this site, I learned my limited WSH skills from here: http://www.winscripter.com/WSH/default.aspx


All times are GMT -4. The time now is 08:44 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.