Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently October 5th, 2024, 11:42 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Auto Mouse Click
PostPosted: February 18th, 2013, 3:20 pm 
Offline

Joined: July 1st, 2010, 3:25 pm
Posts: 10
Location: Devon, UK
Opus: 5.5, 9.5
OS: XP W7 W10
I'm writing a program to play online Roulette.
When a number comes up you click on it, the program then tells you what to bet on.

What I need to do is test what if scenarios. I'd like to load a .csv or similar file of previous numbers then have the program run itself.
This would enable me to test various systems.

I have a demo of a previous system online at http://www.youtube.com/watch?v=eOSGRtZkC64


For this message PeterPreston has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject: Re: Auto Mouse Click
PostPosted: February 21st, 2013, 6:13 am 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
PeterPreston wrote:
I'm writing a program to play online Roulette.
When a number comes up you click on it, the program then tells you what to bet on.

What I need to do is test what if scenarios. I'd like to load a .csv or similar file of previous numbers then have the program run itself.
This would enable me to test various systems.

I have a demo of a previous system online at http://www.youtube.com/watch?v=eOSGRtZkC64
Peter, Welcome to the forum and to Opus. Since your Post sat a few days without reply, I can lend a small bit of help perhaps. Let's look at a few small pieces where you can start.

1. load a .csv or similar file
If you had a plain text file where the roulette results-numbers are separated by commas, you can set-up Opus' Action to read each piece of data.
In the Action dialogue, look under category of 'Storage' and you will find various ways to read lines or fields from a file.
e.g., Read Next Field from File action
I do not work with CSV files much and won't try to get into detail at this point.

2. Typically I would either assign that discrete bit of data to a variable in Opus, or I might accumulate the set and operate with the data in other ways. Some steps you can try. Go into Page Properties dialogue and find the Tab for 'Variables'. Simply add one or more with whatever (valid) name you want. Going back over in the Actions dialogue, look under the 'Programming' Tab, and you will see 'Variables' as a category there -- you have some Actions available to set a Variable to the data value you read-in.

3. If you want to see, that is display, that chunk of data... look in the Help File under 'Insert Variable'. On the Opus Page you would add a Text Object, and then Right-click while editing in that space... to insert a variable instead of (on in addition to) typing regular text. When you PREVIEW the Page you can see the value displayed in the text box.

4. Somewhere in here you want to process a SET of those different outcomes. I have no idea what it is you want to do with it. I could presume you want to take 500 numbers and create some sort of pattern as a discrete distribution. Finding the 'zeroes' in the tabulation would not be very difficult. But then maybe you want to 'move' that set up or down (offset in the population) and look at that. Lots of questions I can't answer if not asked. :)

I do not play much with games, and don't gamble much, so I am no good here to design anything. But I think if I were betting on Red or Black, I cannot see how that gets away from 50% probability. Now if you can do something with the bets on 4 numbers or 6 numbers, and it pays off -- that would be fun.

As to having Opus "run by itself", of course that is possible. First take a look at some of the Actions available (under Programming -- see screenshot). You have tools here for LOOP, evaluating a CASE or an IF, etc etc. Here is where you will develop your logic steps. (I suggest you learn OpusScript, as that will tap into the same power but is easier than clicking on Standard Actions --- IMO).
To run automatically, you simply need to trigger the set of actions and run them in a Loop. There are a few other ways to "run automatically", depending what you want. After you've glimpsed this area of Actions, consult the Help File for more thorough explanation. See also 'Triggers'.

Suggestion: start experimenting with the project on a small scope, and divide the problem into chunks. Set the reading fields from a File aside for now --- simply copy some of that data into a Text Object where you can do similar Read actions. You can add the external files source later. Opus can also read excel file, use a database, etc.

Good luck.

Here's "Tips for Posting" >>> viewtopic.php?f=6&t=3514


You do not have the required permissions to view the files attached to this post.

_________________
_good things come to those who wait(0)_


For this message Lar_123 has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Auto Mouse Click
PostPosted: February 21st, 2013, 11:16 am 
Offline

Joined: July 1st, 2010, 3:25 pm
Posts: 10
Location: Devon, UK
Opus: 5.5, 9.5
OS: XP W7 W10
Thanks for your reply, on reflection it shouldn't be in the basic section but I've never used a Forum before and didn't know how to post a question initially. I've managed some scripting and can handle csv files ok.

My problem is each number has at least 10 variables attached to it each one on a different object.

I have numerous layers behind each other eg reds, blacks,evens, odds, highs, lows , dozens, rows and various other combinations.

For example if I click on 36 it registers as even, red, third dozen, top row, top and middle row, top and bottom row, second and third dozen, first and third dozen, the number 36 itself.

To save processing power these variables only need to be counted if the appropriate tactic is switched on.

Currently I save all the numbers entered into a history file which can then be read by clicking on a replay button. This displays the history one number at a time but then I have to click on the appropriate number as soon as I do this the next number is displayed then I click on that.

I could probably work out how to move an object to the appropriate position. Ideally the object would be the mouse cursor which would then click itself before moving on.

I see now that this is the first problem I should have tackled rather than one of the last.

Thanks again for your help you've given me some ideas to go on.

Peter


For this message PeterPreston has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject: Re: Auto Mouse Click
PostPosted: February 21st, 2013, 2:45 pm 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Quote:
I could probably work out how to move an object to the appropriate position.
I see now that this is the first problem I should have tackled rather than one of the last.
Well, I would advise to focus on the core stuff, but just so this does not get in your way... take 5 or 10 minutes and it will be working. (not the actual mouse-click, but the animation)

* Create a new Page. Add an object to that page. Say a Vector object, there is even a predrawn 'hand' in there on the tool pop-out.
* Rename the vector or other object... MouseHand01
* from the vertical, object toolbar... select the Script Object. That creates the object and opens the Editor window.
* copy the following code into that Script window
** you are done. Test it by Previewing that single Page.

Code:
//when the Page displays, the following Script runs. ( Essentially Page.Show() is the implied "trigger" ).
//We'll start with a short delay, so the Action unfolds.

wait(1.5)
MouseHand01.SetPosition(1000,200,2,true)
wait(0.8)
MouseHand01.Rotate(-20,0.1,true)
MouseHand01.Rotate(20,0.1,true)
I use a 1024 x 768 page size for most basic work, but you can change the parameters in the script above.

_________________
_good things come to those who wait(0)_


For this message Lar_123 has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Auto Mouse Click
PostPosted: February 21st, 2013, 3:05 pm 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Quote:
For example if I click on 36 it registers as even, red, third dozen, top row, top and middle row, top and bottom row, second and third dozen, first and third dozen, the number 36 itself.
If I were tackling this, and if I were planning on using OpusScript here, I would layout a truth table for all of the numeric values (numbers). I would have a Column for each of the traits or attributes -- all possible states or ways to bet. Then it is a simple matter of filling in the table cells with 0 or 1 as they apply to each number.

I do not understand what you want to do with those attributes. But once you have the match-up, you can run your analysis and try to say what BETS have not hit in a while. You could also use the values in the truth table to key whether you highlight the winning bets on the board itself.

Others here in the forum will likely have ideas you can use -- how to approach it, how to set it up, ...maybe use object notation and 'dot'-properties. ...or, arrays.

Is this a great learning project, or do you have a goal and a timeline?

_________________
_good things come to those who wait(0)_


For this message Lar_123 has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Auto Mouse Click
PostPosted: February 21st, 2013, 4:02 pm 
Offline

Joined: July 1st, 2010, 3:25 pm
Posts: 10
Location: Devon, UK
Opus: 5.5, 9.5
OS: XP W7 W10
I'm using it to learn but then again I have a book "13 Against The Bank" (Norman Leigh - 1976) which tells a true story of how a team get together and broke the Opus is the best banks in London & Monte Carlo. It was done with teams of 6 and at real casinos.
The methods are quite simple to understand and I've managed to program Opus to use the methods he used.

It would be great if it worked using 1 or two players at online live casinos which weren't even dream t of in those days.

The trouble is the team only won once a day on average, (360 spins) so I need to be able to test the system. There are online casinos that supposedly work on Random Number Generators but I don't trust these and there am using live ones.

Then if it works I will sell it or use it, if it doesn't I'll incorporate other systems.

I think tables are the way to go I'll look into it.

It's not so much if there's a bet, on the six even chances, there always is, its the stake that varies increasing on wins therefore using the casinos money whenever possible.

In other techniques I would determine if there's a bet by using a table as you suggest for example if the top and bottom dozens haven't been hit for x number of times then bet on both.

If I get a lot of history I could experiment with different values of 'x', hence my need for it to run automatically on historic results.

Thanks for your thoughts. I have no timeline my goal is unlimited.
My only problem is time & money!

Thanks for the script I'll give it a go soon.

Peter


For this message PeterPreston has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject: Re: Auto Mouse Click
PostPosted: February 21st, 2013, 6:09 pm 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Quote:
I think tables are the way to go I'll look into it.
To be clear, what I meant by truth table is to construct it in Excel or other (not within Opus). Once you have the truth table, you can export to a comma delimited file, a regular text file, or other. With a little trial and error in OpusPro, you can then read that whole logic table file into a variable, an array, or an Opus Text Object and use it as a look-up. That's just for part of the logic.

The other major part of the solution is that other file you have -- a log of which numbers turned up how frequently in a given time or for a certain sample size. All you need is some counter for the spin count, and of course the OUTCOME (winning number) of each spin. When using this file, you do not need those 10 attributes for here, it will be in the look-up table.

Again, that's just one way to partition the problem.

Quote:
It would be great if it worked using 1 or two players at online live casinos which weren't even dream t of in those days.
Maybe that could be easy -- if you do a bit of work on a hosted server. Opus has capability to do PUTS and GETS (not the real command name). You would have to code a bit of PHP or similar.
----- a simpler alternative if you want to share with just one other person is to allow remote screen access to your Opus Pub, or to do a live Screencast of your PC where he can access it. Just TOL

_________________
_good things come to those who wait(0)_


For this message Lar_123 has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Auto Mouse Click
PostPosted: February 22nd, 2013, 12:37 am 
Offline

Joined: July 1st, 2010, 3:25 pm
Posts: 10
Location: Devon, UK
Opus: 5.5, 9.5
OS: XP W7 W10
Thanks I could do it in Excel I have used similar tables in Excel to test systems before but not linked them to Opus.

I'm not worried about sharing. I don't need to worry about remote access or Screencasts.
As each player can have their own copy of the program and as long as they synchronise it should be ok. And of course each player would have to buy a copy from me! Of course I'll have to look into licencing and copy protection but thats another ball game and will come later.

Thanks


Peter


For this message PeterPreston has been thanked by : mackavi


Top
 Profile Visit website  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group