Welcome, Guest. Please login or register.
June 03, 2023, 09:49:00 PM
Home Help Login Register
News:

Shanky Technologies Poker Bot Support Forum  |  General Category  |  PPL Support (Moderator: sngbot)  |  Topic: Syntax Highliting with Notepad++ 0 Members and 1 Guest are viewing this topic.
Pages: [1] 2 Print
Author Topic: Syntax Highliting with Notepad++  (Read 41676 times)
Egor
Forum Admin
Extreme Botter
*****

Karma: 377
Posts: 34965



WWW
« on: November 02, 2010, 07:22:38 PM »

This recreated thread into a post is about using Notepad++, which is a free and mature source code editor that supports several languages out of the box. In addition, it also supports User Defined Languages, which is the feature I used to define the syntax highlighting specific to the custom coding language that Egor and Mad Scientist have come up with.

There are several other features that Notepad++ has that make it a superior tool to Notepad for writing code, but in the interest of keeping this post from becoming too long I’ll refer you to the Notepad++ site to discover those. You won't be disappointed.

Bottom line, if you’ll just be writing short code snippets here and there, Notepad++ is probably overkill. But, if you’re writing long profiles and/or are a programmer, Notepad++ is a great way to go. And with post-flop coding on the horizon, folks will probably be generating more, not less, code.

If you’ve read this far and are still with me, you may think that syntax highlighting and Notepad++ are the greatest things since sliced bread (or at least the greatest thing since Shanky’s Hold ‘em Poker Bot    ) … so let’s get this party started.

To use Notepad++ you need to go out, download a copy and install it. As I mentioned before, it’s free to use. The Notepad++ homepage is located at http://notepad-plus.sourceforge.net/uk/site.htm.

If you’re a programmer you might be interested in downloading the binary and/or the source files. For most folks, though, all you really need is the file that's in “executable installer format”, which is called npp.5.1.4.Installer.exe, and can be downloaded from http://sourceforge.net/project/showfiles.php?group_id=95717&package_id=102072.

After you’ve installed Notepad++ you now have a tool that’s waaaay better than Notepad for writing code. Still, out of the box it doesn’t know about the PokerBot, so you need a way to tell Notepad++ how to recognize the syntax of the PokerBot’s language. You can always create your own user-defined language if you choose, of course … or you’re welcome to use the files I’ve already created.
Back to top
« Last Edit: Feb 5th, 2009 at 3:30pm by Bender »  
 


Posts: 211    Syntax Highlighting with Notepad++
Reply #3 - Feb 5th, 2009 at 3:19am        
I’ve created three files and uploaded them to the Internet for you to download …

1) userDefineLang.xml

This is the first of two files you’ll need to copy to your copy of Notepad++.
The file can be downloaded from: http://www.2shared.com/file/4802755/91af479d/userDefineLang.html
The password is shanky.

2) stylers.xml

This is the second of two files you’ll need to copy to your copy of Notepad++.
The file can be downloaded from: http://www.2shared.com/file/4802760/cae8e0d1/stylers.html
Again, the password is shanky.

Once you’ve downloaded the first two files, you’ll need to replace the copies of the files that are already on your PC with the copies you’ve just downloaded.  But first, you need to run Notepad++ at least once to create these files. So, open Notepad++ and then close it, and then you can proceed to the next step.

The userDefineLang.xml and stylers.xml files are located in the “Application Data” subfolder in your user's Documents and Settings folder. To locate this file open a command window (START > Run) and key in …
%APPDATA%\Notepad++


… then hit ENTER. A window will open containing several files. Replace the original userDefineLang.xml and stylers.xml files with the copies you just downloaded.  (Note that the userDefineLang.xml file may not exist if you haven’t used that feature in Notepad++ yet.)

3) Example of a Complete Preflop Limit Profile.txt

This is a copy of the sample code that Egor has written for the Pokerbot Customizing Guide documentation on pages 28-33. If you already have your own code then you don’t really need this file. I included it here so you don’t have to write some new code from scratch.

The file can be downloaded from:
http://www.2shared.com/file/4802765/ba82145e/Example_of_a_Complete_Preflop_Limit...

The password is (you guessed it) shanky.

[Warning: Once you open this file in Notepad++ you may never go back to plain old Notepad again.  ]
Back to top
« Last Edit: Feb 5th, 2009 at 5:39am by Bender »  
 

 

Posts: 211    Syntax Highlighting with Notepad++
Reply #4 - Feb 5th, 2009 at 3:20am        
You can now open this file in Notepad++ and voilà!  

The code should look like the code at the top of this thread. This is all configurable, so you can tailor it to your own preferences if you don’t like my style.
•   In my case I chose to take the “structural” keywords (custom, preflop, flop, turn, river) and color them orange.
•   I colored the When statement keyword as well as the Operators (and, or, not) blue.
•   Comments are green.
•   Keywords that have to do with Conditions (hand, suited, in, bigblind, smallblind, button) and Variables (folds, checks, calls, bets, raises, opponents, opponentsleft, opponentsattable, stilltoact, betsize, folds, checks, calls, bets, raises, opponents, opponentsleft, opponentsattable, stilltoact, betsize, potsize, botslastaction, stacksize, potsize, botslastaction, stacksize) are colored black.
•   Action keywords (beep, call, play, raise, raisemin, raisehalfpot, raisepot, raisemax, fold, bet, betmin, bethalfpot, betpot, betmax, force) are colored magenta.
•   Comparators (=, <, >, <=, >=, %) are black.
•   One feature I added that helps me, and I think you might find useful, is that any code that is enclosed in parenthesis is highlighted with a yellow background. It helps me make sure that parethesis are used in pairs correctly.
I hope you enjoy using Notepad++ and I especially hope that you find my syntax highlighting helpful. Again, you don’t have to use my style … if you have ideas of your own you can certainly configure Notepad++ to your liking. I’ll provide some links below, including links to the Notepad++ documentation.
Back to top
« Last Edit: Feb 5th, 2009 at 3:37pm by Bender »  
    

 

Posts: 211    Syntax Highlighting with Notepad++
Reply #5 - Feb 5th, 2009 at 3:20am        
Here are some links that you might find helpful …

Notepad++ home page
http://notepad-plus.sourceforge.net/uk/site.htm

Notepad++ User Manual
http://notepad-plus.sourceforge.net/commun/helpFiles/Notepad++.UserManual.pdf.zip

Notepad++ User Language Define System Manual
http://notepad-plus.sourceforge.net/uk/UserLangDefineManual.pdf

Some tips about defining your own language in Notepad++
http://notepad-plus.wiki.sourceforge.net/Customise+languages






Excel file for calculation of Random Variable
Aug 2nd, 2010 at 12:49pm      
Since now and then, people are confused about the random variable and there are lots of questions about it,
I have made a small excel file to calculate the correct random variable for up to 6 actions with customizable percentages.
Just fill out the second column and you will get the appropriate numbers and an example codeblock for you to use.

EDIT: added a reverse calculation to go from the random numbers to the actual percentages as requested (only included in the download)

I made the download a .rar file, because the xlsx extension did not work properly on my computer.

http://www.mediafire.com/file/zh5yl8rk7g45hdq/random.rar


Back to top
« Last Edit: Aug 31st, 2010 at 2:14pm by Transporter »  
________________________________________
calculate random variables: http://bonusbots.com/supportforum/YaBB.pl?num=1280749784
    

Posts: 1108    Re: Excel file for calculation of Random Variable
Reply #1 - Aug 8th, 2010 at 1:29am        
I had also made something similar in excell at work when I got bored. I wonder if there is someone out there that could make something like this that does not require excell. I dont really feel like loading excell on my laptop.


Posts: 1108    Re: Excel file for calculation of Random Variable
Reply #2 - Aug 8th, 2010 at 7:05am        
I got the file converted to the older format on the net. This is just what I needed to get the desired reults with layered variable code.

Posts: 229
Switzerland    Re: Excel file for calculation of Random Variable
Reply #3 - Aug 9th, 2010 at 6:14pm        
Transporter! Thank you very much for this contribution. Helped me much !
  

Posts: 36    Re: Excel file for calculation of Random Variable
Reply #4 - Aug 20th, 2010 at 5:41am        
I copied the Random Variable calculator to Google Docs so anyone without Exel can use it.  No sign in needed.  Please drop me a PM if someone jacks it up and I'll copy the original back to it.
https://spreadsheets.google.com/ccc?key=0ArNYywcAEczZdDJuLTNMSy1weEc4eUxpUmxlMy1nMEE&hl=en&authkey=CLiIgcwD#gid=0
Logged

Please do not PM me about license issues or help stuff - email me or use the Help board. Thanks! -Egor
WhatIsAxis
Aspiring Botter
**

Karma: -11
Posts: 51

That Better?


« Reply #1 on: November 09, 2010, 07:25:37 AM »

Im using Win7 64x and wanted to chime in that the AppData folder is hidden and that in order to access it you need to open up the Control Panel (In Icon View) Select "Folder Options/View" and check the Show Hidden Files, Folders, Drives Option. From there the folder is located @ C:\Users\*\Appdata\Roaming\NotePad++

Copy/Paste and Viola
Logged

In The Land Of The Blind - The One Eyed Man Is King
zah11
Wide-Eyed Newbie
*

Karma: 0
Posts: 2


« Reply #2 on: November 23, 2010, 12:01:44 PM »

How can I open for read(and alter) some .ppl profile with that?I try,but Notepad++  shows many identical symbols instead of porfile  banghead
Logged
MyOwnWorstEnemy
Experienced Botter
*****

Karma: -3
Posts: 473

Today's Horoscope: fool yeah!


« Reply #3 on: December 13, 2010, 07:34:57 AM »

Am I the only one who can't download the XML files posted here?  

I would contact Bender, but it doesn't seem like there is a memberlist on here like there was on the last forum.

EDIT: Nevermind...I'm a moron.  Didn't see the save file link near the bottom.  banghead banghead banghead
« Last Edit: December 14, 2010, 08:28:27 AM by MyOwnWorstEnemy » Logged
Egor
Forum Admin
Extreme Botter
*****

Karma: 377
Posts: 34965



WWW
« Reply #4 on: December 13, 2010, 07:45:41 AM »

wish I could help but I use Notepad 2
Logged

Please do not PM me about license issues or help stuff - email me or use the Help board. Thanks! -Egor
Phil Ivey
Serious Botter
***

Karma: -37
Posts: 968


« Reply #5 on: December 13, 2010, 04:32:09 PM »

How can I open for read(and alter) some .ppl profile with that?I try,but Notepad++  shows many identical symbols instead of porfile  banghead

You cannot open .ppl files with notepad. That´s why It´s called "to protect the profile code"

You only can open .txt profiles with it.
Logged
davebot
Wide-Eyed Newbie
*

Karma: 0
Posts: 1


« Reply #6 on: March 11, 2011, 05:31:12 PM »

this is a must have program.   the line numbering feature alone makes it worth having.
Logged
ButBot
Wide-Eyed Newbie
*

Karma: 2
Posts: 46


« Reply #7 on: June 11, 2011, 01:01:48 PM »

This is great! Thanks!
Logged
milliondollar
Botter
***

Karma: 2
Posts: 116


« Reply #8 on: October 12, 2011, 12:29:23 PM »

hi egor

the link for the preflop example does not work for me - & i really like to have a look at things ..

& after dl the first 2 files & bringing them into the right folder - KGB for exapmle still looks the same i.e. no colour

aehhm do i have to dl the notepad version you posted or can it be any other like i dl the latest


cheers
« Last Edit: October 12, 2011, 12:45:19 PM by milliondollar » Logged
Egor
Forum Admin
Extreme Botter
*****

Karma: 377
Posts: 34965



WWW
« Reply #9 on: October 13, 2011, 08:08:07 AM »

This is not my thread, I can remove it if that is what people think is best.

Wish I could be of help, but I use Notepad 2 (just google it)
« Last Edit: October 14, 2011, 03:33:25 AM by Egor » Logged

Please do not PM me about license issues or help stuff - email me or use the Help board. Thanks! -Egor
milliondollar
Botter
***

Karma: 2
Posts: 116


« Reply #10 on: October 13, 2011, 12:07:37 PM »

am with ya

& problem soolved - am glad the thread exists - code looks noice in coloeur
Logged
superbot
Experienced Botter
*****

Karma: 16
Posts: 357



« Reply #11 on: February 11, 2012, 03:38:17 PM »

This is not my thread, I can remove it if that is what people think is best.

Wish I could be of help, but I use Notepad 2 (just google it)

Hi Egor

I use Notepad++ on my Vista notebook with the addons from this thread.
But if I try to use the command "%APPDATA%\Notepad++" on my lab top
with Windows 7 I get the message box that tells me to chose a program
to start the file. Would it be better to use Notepad2 for windows 7 ??
Logged

superbot
Often in error - never in doubt
sngbot
Moderator
Extreme Botter
*****

Karma: 138
Posts: 1483


« Reply #12 on: February 11, 2012, 04:18:48 PM »

I've got Windows 7 64bit and %APPDATA%\Notepad++ works fine for me. Are you doing it from the Search Programs And Files box off the Start menu?

Alternatively, try using the full path:-

C:\Users\Your Username\AppData\Roaming\Notepad++

Or you can navigate to it manually from Computer. You might need to do what WhatIsAxis suggested in the second post of this thread, although you don't need to use Control Panel, you can make the necessary change (if required) in Computer. Just go to Tools, Folder Options, View tab, and see which option is selected. If it's "Don't show hidden files, folders, or drives" change it to "Show hidden files, folders, and drives" then click OK.

HTH. Smiley
« Last Edit: February 12, 2012, 04:22:12 PM by sngbot » Logged
superbot
Experienced Botter
*****

Karma: 16
Posts: 357



« Reply #13 on: February 12, 2012, 03:08:41 PM »

Ok thanks man.  thumbsup

I missed that 2nd post   Roll Eyes

I'll give it a try later!!
Logged

superbot
Often in error - never in doubt
tr34187
Botter
***

Karma: 1
Posts: 135



« Reply #14 on: April 29, 2012, 10:20:56 PM »

i do love notepad++   rockout
Logged
Ja-Sers
Wide-Eyed Newbie
*

Karma: -2
Posts: 17


« Reply #15 on: May 06, 2012, 01:10:11 AM »

Hi

The download of this file 1) userDefineLang.xml isnt working. Can somebody help?

Thank you!
Logged
tr34187
Botter
***

Karma: 1
Posts: 135



« Reply #16 on: May 19, 2012, 04:06:58 PM »

how many times did you try to download it?  The first time i tried it didnt download correctly but the on my second attempt it was fine
Logged
Mongo
Aspiring Botter
**

Karma: 4
Posts: 58


« Reply #17 on: August 06, 2012, 07:39:01 PM »

Hi

The download of this file 1) userDefineLang.xml isnt working. Can somebody help?

Thank you!
Same problem here. 2nd file work fine.
Logged
insgesicht
Wide-Eyed Newbie
*

Karma: 1
Posts: 11


« Reply #18 on: August 15, 2012, 03:13:13 PM »

hi i have the same problem !

egor can you reupload the file please?

Logged
Egor
Forum Admin
Extreme Botter
*****

Karma: 377
Posts: 34965



WWW
« Reply #19 on: August 15, 2012, 06:20:15 PM »

I have never used this guys

Notepad++ is a free program, just google it

as for those add-ons mentioned, I know nothing about them, maybe googling will help you find them or something similar

I just use Notepad 2 myself and don't feel a need for color while PPL-ing
Logged

Please do not PM me about license issues or help stuff - email me or use the Help board. Thanks! -Egor
Pages: [1] 2 Print 
Shanky Technologies Poker Bot Support Forum  |  General Category  |  PPL Support (Moderator: sngbot)  |  Topic: Syntax Highliting with Notepad++
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!