How to learn to program for the total novice?
I have no computer instruction. Only turn on and off the computer and use Internet explorer and Word and maybe other common softwares.
I want to learn to program for not having to wait and depend on others. Only aimed at roulette, do not ask to teach me to create another Windows system.
Would even be willing to pay some for the time of a tutor. Within the forum if possible.
Maybe a school program for those interested in the forum and the admission money goes to financial support from the site? Someone has been devising this possibility?
There are several developers in the forum. Ophis, Mr. Bayes, Mr. Victor, Mikeo, ThomasGrant and others. If they can donate some time in dealing with rookies I'm sure more than one person is interested in learning to program from zero and could help fund the site in the process.
The course graduation would be able to program their own roulette systems that you want.
When you're learning something new is better done in a group with someone who already has knowledge of the subject and has already gone through it.
The frustration is greater when only give you a link to read and to fend for yourself. By the attendance of a person who acts as a mentor it is fair to request support of a certain amount of money.
Just wondering if possible.
If not possible give me the link to read the free tutorial and finish in 2050 by figuring myself :-X
WannaWin
I would start play with sikuli: link:://sikuli.org/ (link:://sikuli.org/) for basics, there are also some tutorials for that. Programming language used in sikuli is python. Just play with that for now. Sikuli is very good for roulette programming, because you can make bots directly.
Thanks Mr. Ore
Sikuli is a casino bot? You can read the numbers on the screen? What must I do to start programming using it?
I got into the Sikuli website but did not read anything about roulette programming or casino.
Are you a developer? Consider to devote time to what I explained above.
I'm not good at following tutorials, but I do understand when I get explained things directly: install this, type that in notepad, etc.
Thank you.
WannaWin
Sikuli is a tool to make programs which can read and click and write anything you see on screen. Watch videos, read tutorials and try to make a simple script that click a start button.
How to Legally Hack Facebook Games (Autopilot) Using MIT's Si... - Video (link:://:.metacafe.com/watch/5006198/)
It could be used for a bot too...
Thank you Mr. Ore I'll try.
I think IF you are totally new to ANY programming it would be much easier to program for RX.
There are so many different languages you could use for a bot and they all have different ways of, for example, reading the screen and clicking, RX will be a much shallower curve.
My 2 cents
I agree with superman in that if you only want to program for roulette then RX is the best specialised tool for the job. Having said that it's quite limited for general purpose programming and as far as I'm aware it doesn't have the capability to code bots.
If you want to keep your options open then it's better to go for a 'general purpose' programming language. Any version of BASIC would be ok, FreeBASIC has a good forum (important for newbies) as well as several tutorials and good documentation. link:://:.freebasic.net/ (link:://:.freebasic.net/)
Thank you Mr. Bayes, I want to keep my options open and I am delighted that FreeBASIC also maintains a version of Linux.
I have been studying FreeBASIC much as I can in recent days but my head is spinning trying to make a window with a list for numbers and a list to keep track of progression. I must say at the moment I'm lost.
This code says that is the basis for making a window for the user:
link:://:.freebasic.net/wiki/wikka.php?wakka=TutMessageIntro (link:://:.freebasic.net/wiki/wikka.php?wakka=TutMessageIntro)
Quote
Option Explicit
Option Private
#include once "windows.bi"
Declare Function WinMain ( ByVal hInstance As HINSTANCE, _
ByVal hPrevInstance As HINSTANCE, _
szCmdLine As String, _
ByVal iCmdShow As Integer ) As Integer
''
'' Entry point
''
End WinMain( GetModuleHandle( null ), null, Command$, SW_NORMAL )
'' ::::::::
'' name: WndProc
'' desc: Processes windows messages
''
'' ::::::::
Function WndProc ( ByVal hWnd As HWND, _
ByVal message As UINT, _
ByVal wParam As WPARAM, _
ByVal lParam As LPARAM ) As LRESULT
Function = 0
''
'' Process messages
''
Select Case( message )
''
'' Window was created
''
Case WM_CREATE
Exit Function
'' User clicked the form
Case WM_LBUTTONUP
MessageBox NULL, "Hello world from FreeBasic", "FB Win", MB_OK
''
'' Windows is being repainted
''
Case WM_PAINT
Dim rct As RECT
Dim pnt As PAINTSTRUCT
Dim hDC As HDC
hDC = BeginPaint( hWnd, @pnt )
GetClientRect( hWnd, @rct )
DrawText( hDC, _
"Hello Windows from FreeBasic!", _
-1, _
@rct, _
DT_SINGLELINE Or DT_CENTER Or DT_VCENTER )
EndPaint( hWnd, @pnt )
Exit Function
''
'' Key pressed
''
Case WM_KEYDOWN
'Close if esc key pressed
If( LoByte( wParam ) = 27 ) Then
PostMessage( hWnd, WM_CLOSE, 0, 0 )
End If
''
'' Window was closed
''
Case WM_DESTROY
PostQuitMessage( 0 )
Exit Function
End Select
''
'' Message doesn't concern us, send it to the default handler
'' and get result
''
Function = DefWindowProc( hWnd, message, wParam, lParam )
End Function
'' ::::::::
'' name: WinMain
'' desc: A win2 gui program entry point
''
'' ::::::::
Function WinMain ( ByVal hInstance As HINSTANCE, _
ByVal hPrevInstance As HINSTANCE, _
szCmdLine As String, _
ByVal iCmdShow As Integer ) As Integer
Dim wMsg As MSG
Dim wcls As WNDCLASS
Dim szAppName As String
Dim hWnd As HWND
Function = 0
''
'' Setup window class
''
szAppName = "HelloWin"
With wcls
.style = CS_HREDRAW Or CS_VREDRAW
.lpfnWndProc = @WndProc
.cbClsExtra = 0
.cbWndExtra = 0
.hInstance = hInstance
.hIcon = LoadIcon( NULL, IDI_APPLICATION )
.hCursor = LoadCursor( NULL, IDC_ARROW )
.hbrBackground = GetStockObject( WHITE_BRUSH )
.lpszMenuName = NULL
.lpszClassName = StrPtr( szAppName )
End With
''
'' Register the window class
''
If( RegisterClass( @wcls ) = FALSE ) Then
MessageBox( null, "Failed to register wcls!", szAppName, MB_ICONERROR )
Exit Function
End If
''
'' Create the window and show it
''
hWnd = CreateWindowEx( 0, _
szAppName, _
"The Hello Program", _
WS_OVERLAPPEDWINDOW, _
CW_USEDEFAULT, _
CW_USEDEFAULT, _
CW_USEDEFAULT, _
CW_USEDEFAULT, _
NULL, _
NULL, _
hInstance, _
NULL )
ShowWindow( hWnd, iCmdShow )
UpdateWindow( hWnd )
''
'' Process windows messages
''
While( GetMessage( @wMsg, NULL, 0, 0 ) <> FALSE )
TranslateMessage( @wMsg )
DispatchMessage( @wMsg )
Wend
''
'' Program has ended
''
Function = wMsg.wParam
End Function
What is the code to make a window in Ubuntu? Perhaps it is easier? If the same code I can make a window in FreeBasic linux and FreeBASIC windows with the same file?
I am learning the freebasic keywords from this list:
link:://:.freebasic.net/wiki/wikka.php?wakka=CatPgFullIndex (link:://:.freebasic.net/wiki/wikka.php?wakka=CatPgFullIndex)
Reading slowly so far. My impression is that there are too many to be a basic language for beginners. I can not imagine how many keywords have advanced languages. I ​will probably never use anything advanced in any case. I am only focusing on the basics but to me it is a lot.
Maybe anyone can provide where to insert the freebasic code to create list and the code when user click the number from the list?
I am doing my best to learn to program but still I can use some guidance from the more advanced programmers in the forum.
Thank you very much.
WannaWin
Hello mate
this is the function to create the window
CreateWindowEx()
everything pertaining to that window will be explained in the help file, as you can see from the example above there are a good few options.
Like I said in my first reply, you look like you are trying to run before you can crawl, let alone walk. I would strongly suggest learning rx first because you can also use basic like statements within rx, that is how you will slowely learn what you need to put where and what it actually does.
Creating code that just runs on its own is one thing, creating code that runs in/with windows/linux is another ballgame.
HTH
If I decided to program my library for roulette system again, I would go with python and sikuli. Sikuli is basicaly a python interpreter with advanced abilities. The code with winmain will not work in ubuntu, it is windows specific Windows API and that is a something you can study a year after you learn programming. Knowledge of Windows API is useless today anyway, you are losing your time. I will try to make a simple example application in python and then test it in sikuli and post there. I cannot program in python, so it might take a few minutes more, but all those programming languages are similar.
There are many options of course, in ubuntu, open a konsole and type aptitude install monodevelop or try to find it with your package manager. Just for fun, you can draw windows there, add buttons and boxes, if you click something it add a function to be executed when clicked on. It uses C# as a programming language. Not that you should decide to learn it, just look at it.
To install mono in ubuntu, maybe you need rather this command:
sudo aptitude install mono-mcs mono-utils libgtksourceview-common libgtksourceview2-2.0-cil libgtk2.0-cil libgecko2.0-cil monodevelop monodoc
I am not sure about all dependencies.
BTW to make a window in linux, you need to use GTK or QT library, or some other of many UI libraries. You need a wrapper for freebasic for them, if there is any.
Hmm, you want your own gui, now I can't find a way howto do that with sikuli other than import part of it into a java and make rest there. It would be too advanced. I will look into wxpython if it can be imported...
In sikuli swing from java can be include, because it uses jython. To make a window I used this code, which is much simplier:
from javax.swing import JButton, JFrame
frame = JFrame('Hello, Jython!',
size = (300, 300)
)
def change_text(event):
print 'Clicked!'
button = JButton('Click Me!', actionPerformed=change_text)
frame.add(button)
frame.visible = True
Good luck with your coding.
We need more people who are just like you.
Both interested in Roulette and coding for Roulette.
I would not recommend RX because it is a misleading language and it does not contain loops(like for, while, do ... while and similar constructions in other languages). Therefore it is not a real programming language, just a script for roulette simulator. Actually keyword "while" is used in the meaning of "if" in other languages, so it is really bad for a beginner, when he change for another language.
He apparently wanted normal programming language, that's why he tried to use freebasic. There are better alternatives of course for simple gui. Jython in sikuli is quite simple to program gui with swing, I have basic tracker almost done, and then I will make it into simple bot, but before that I will post it there as a template. Jython is python interpreter in java which can import java libraries and call them, so it is good option in my opinion, and combined with sikuli it seems more than interesting. Also many things in swing can be styled with some html tags, so it is really useful.
This program in sikuli has about 189 lines and can already track numbers. There is some junk code already, and it's design will have to be polished or changed somehow...
[reveal]from javax.swing import (BoxLayout, ImageIcon, JButton, JFrame, JPanel,
JPasswordField, JLabel, JTextArea, JTextField, JScrollPane,
SwingConstants, WindowConstants)
from java.awt import Component, GridLayout
# object with roulette tracker
class MyRoulette(object):
def __init__(self):
# roulette related data
self.reds = [ 1, 3, 5, 7, 9, 12, 14, 16, 18, 19, 21, 23, 25, 27, 30, 32, 34, 36]
self.blacks = [ 2, 4, 6, 8, 10, 11, 13, 15, 17, 20, 22, 24, 26, 28, 29, 31, 33, 35]
self.evens = [ 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36]
self.odds = [ 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35]
self.lows = [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18]
self.highs = [19,20,21,22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36]
self.dozens = [
[ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
[13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24],
[25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36]
]
self.columns = [
[1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 34],
[2, 5, 8, 11, 14, 17, 20, 23, 26, 29, 32, 35],
[3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36]
]
self.numbers = []
self.progression = [1, 2, 4, 8, 16]
self.progressionPosition = 1
# window with caption
self.frame = JFrame("My roulette tracker", size=(256,512))
# panel 2x2
self.panel = JPanel(GridLayout(2,2))
self.frame.add(self.panel)
# text area for past numbers
#self.numbersArea = JTextArea(
# text = "",
# editable = False,
# wrapStyleWord = True,
# lineWrap = True,
# alignmentX = Component.LEFT_ALIGNMENT
#,size = (128,480)
# )
self.numbersAreaHtml = ""
self.numbersArea = JLabel(self.numbersAreaHtml)
self.numbersArea.setVerticalAlignment(SwingConstants.TOP)
self.numbersScrollpane = JScrollPane(
JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
JScrollPane.HORIZONTAL_SCROLLBAR_NEVER
)
self.numbersScrollpane.viewport.view = self.numbersArea
self.initialText = "<html>\n" + "Color and font test:\n" + "<ul>\n" + "<li><font color=red>red</font>\n" + "<li><font color=blue>blue</font>\n" + "<li><font color=green>green</font>\n" + "<li><font size=-2>small</font>\n" + "<li><font size=+2>large</font>\n" +"<li><i>italic</i>\n" + "<li><b>bold</b>\n" +"</ul>\n";
# text area for progression
#self.progressionArea = JTextArea(
# text = initialText,
# editable = False,
# wrapStyleWord = True,
# lineWrap = True,
# alignmentX = Component.LEFT_ALIGNMENT
#,size = (128,480)
# )
self.progressionAreaHtml = ""
self.progressionArea = JLabel(self.progressionAreaHtml)
self.progressionScrollpane = JScrollPane(
JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
JScrollPane.HORIZONTAL_SCROLLBAR_NEVER
)
self.progressionScrollpane.viewport.view = self.progressionArea
# text area for input
self.inputArea = JTextArea(
text = "",
editable = True,
wrapStyleWord = True,
lineWrap = True,
alignmentX = Component.LEFT_ALIGNMENT
#,size = (1,64)
)
# button
self.buttonInsertNumber = JButton(
"Insert number",
actionPerformed=self.insert_number
)
#self.buttonInsertNumber = JButton("<html><b><u>T</u>wo</b><br>lines</html>");
# insert all parts into the window's panel
self.panel.add(self.numbersScrollpane)
self.panel.add(self.progressionScrollpane)
self.panel.add(self.inputArea)
self.panel.add(self.buttonInsertNumber)
# make the window smaller
self.frame.pack()
# show window
self.frame.setAlwaysOnTop(True)
self.show()
def makeNumbersAreaHtml(self):
html = "<html><table>"
for number in self.numbers:
html += "<tr><td align=right width=32 >"
if (number>0) and (number<37):
if number in self.reds:
html += "<font color=red>"+str(number)+"</font>"
else:
html += "<font color=black>"+str(number)+"</font>"
elif number==0:
html += "<font color=green>0</font>"
elif number==37:
html += "<font color=green>00</font>"
html += "</td>"
html += "<td></td>"
if number in self.reds:
html += "<td>R</td>"
elif number in self.blacks:
html += "<td>B</td>"
else:
html += "-"
if number in self.evens:
html += "<td>E</td>"
elif number in self.odds:
html += "<td>O</td>"
else:
html += "<td>-</td>"
if number in self.lows:
html += "<td>L</td>"
elif number in self.highs:
html += "<td>H</td>"
else:
html += "<td>-</td>"
html += "<td></td>"
for dozen in self.dozens:
if number in dozen:
html += "<td>X</td>"
else:
html += "<td></td>"
html += "<td></td>"
for column in self.columns:
if number in column:
html += "<td>X</td>"
else:
html += "<td></td>"
html += "</tr>"
html += "</table></html>"
return html
def insert_number(self, event):
print "insert_number: " + self.inputArea.text
try:
if self.inputArea.text=="00":
self.number = 37
else:
self.number = int(self.inputArea.text)
if (self.number < 0) or (self.number > 36):
raise ValueError
self.numbers.append(self.number)
self.numbersArea.text = self.makeNumbersAreaHtml()
except ValueError:
popup("Error: 00 or numbers 0-36 expected")
self.inputArea.text = ""
def show(self):
self.frame.visible = True
MyRoulette()
[/reveal]
Hi Wannawin,
If you want to write GUI trackers and the like I can't think of anything easier than Euphoria, which is the language I use. Euphoria is also good for stats/simulations and isn't object-oriented which makes it easier for a beginner. It has a GUI library which includes a visual editor for creating windows without having to write code - it's generated for you, just add code for what you want to happen when you click a button etc. This sounds a bit like visual Basic but it's even easier, there really isn't an easier way to write windows programs that I know of. link:://:.rapideuphoria.com (link:://:.rapideuphoria.com)
I'm also a Ubuntu user so I can help you with getting it set up etc. Or, having invested some time and effort in FreeBASIC, you may wish to persevere with it. Unfortunately I can't help as I don't know the language, I just recommended a BASIC because it's easy for beginners.
Wannawin,
Let me know exactly what you want to create (as long as it's not too complex), and I'll give you step-by-step demo of how to do it in Euphoria. :thumbsup:
Bayes, he already wrote what he wanted to do:
QuoteMy head is spinning trying to make a window with a list for numbers and a list to keep track of progression. I must say at the moment I'm lost.
So the application will have some textbox with numbers, texbox with a progression, input for a new number and a button to enter that number. Progression might be anything - for example martingale as the most simple progression. There might be of course only one textbox and the progression might be written on the same line as the number entered.
So you might show us how to do it in euphoria, I would do similar thing in jython :thumbsup:.
Thank you very much for the help.
My first program takes a list for numbers that have already came from spin 1 to 12.
From spin 13 the bet is set to group with only 1 time out in the list with progression.
The betting is set from spin 13 to 25. If no hit after spin 25 it is a loss.
Then we wait 12 more numbers and repeat the process with list set with last 12 numbers again and bet 1 time numbers in the list from spin 13 to spin 25.
Perhaps after a loss it can climb the progression starting from 2 units, and so on, until you recover or reach a level of defined complete loss. In which case all bets must go back to 1 unit again.
I want to learn if it may be the same for windows and ubuntu. So I can share with friends that use windows and some others that use Linux.
If you do not have to make too many changes for this it is good too. I do not want is having to do the programing twice. I know it is possible to make because there are programming languages ​​that offer Linux and Windows versions of the same.
Thank you very much for your advices and I want to consider my options for now.
WannaWin
Quote from: WannaWin on May 30, 03:33 PM 2011
I want to learn if it may be the same for windows and ubuntu. So I can share with friends that use windows and some others that use Linux.
If you do not have to make too many changes for this it is good too. I do not want is having to do the programing twice. I know it is possible to make because there are programming languages ​​that offer Linux and Windows versions of the same.
Euphoria programs will run on Linux and Windows, with only minor changes necessary (if at all) in the code. The GUI library I use is Windows only, but that's no problem because you can use Wine (type 'sudo apt-get install wine' at the console or get it using the Ubuntu software centre).
Sidenote There are actually 2 versions of Euphoria - the latest (version 4.1) has more commands and is more complex than the earlier version (3.1.1). I use version 3.1.1 and suggest you do the same to begin with, it's simpler and there is more documentation for it.
You can download both Windows and Linux versions from the link I gave above (but make sure you have Wine installed first before installing the windows version.
Next, you need to download the EuWinGUI library - go here (link:://:.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=Euwingui) and download the 'Euwingui library and IDE' (3rd from the top).
Assuming you have the Windows version of Euphoria installed, extract the Euwingui folder into its directory (you should have a menu item to access the the C:\ directory - see screenshot).
[attachimg=#]
Now, just one more step before you can begin using the library. In the EuWinGUI folder you will see other folders including 'Bin' and 'Include'. You need to 1) move the contents of the Bin directory into the EUPHORIA Bin directory, and 2) move the contents of the Include directory into the EUPHORIA Include directory.
Now check that everything is ok by running some of the programs in the EWG-Demos folder.
Ok, I'll stop here until I hear from you that it's running ok. I don't want to give you information overload and I think it's better to keep this in a tutorial style, so next I'll ask you to create your GUI using the IDE - you don't need to write any code for this, it's all point and click graphics.
p.s. When installing Euphoria for Linux, you need to add a couple of lines to your bash_profile in order to run the interpreter from the console. You will find instructions in the package, but let me know if you need help. :thumbsup:
Thanks Mr. Bayes. I'll try to do those steps.
WannaWin
Hello. With a referral from Mr. Esoito I am going to take the programming course by Mr. Victor
link:://rouletteforum.cc/VLS'-view-b57/vic's-programming-school-for-the-absolute-newbies/ (link:://rouletteforum.cc/VLS'-view-b57/vic's-programming-school-for-the-absolute-newbies/)
Hopefully it will be easier than simple languages ​​I've seen so far. And the good thing is to have someone whom you can ask and can not escape from here >:D
Since I have no hurry to learn I can take my time to produce the files.
Thank you all for your programming suggestions.
If I learn to code programs I hope to contribute many of them to the forum.
WannaWin