Shanky Technologies Poker Bot Support Forum

General Category => PPL Support => Topic started by: Egor on November 02, 2010, 07:22:38 PM



Title: Syntax Highliting with Notepad++
Post by: Egor 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 (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 (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 (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 (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 (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 (http://notepad-plus.sourceforge.net/uk/site.htm)

Notepad++ User Manual
http://notepad-plus.sourceforge.net/commun/helpFiles/Notepad++.UserManual.pdf.zip (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 (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 (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 (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 (https://spreadsheets.google.com/ccc?key=0ArNYywcAEczZdDJuLTNMSy1weEc4eUxpUmxlMy1nMEE&hl=en&authkey=CLiIgcwD#gid=0)


Title: Re: Syntax Highliting with Notepad++
Post by: WhatIsAxis 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


Title: Re: Syntax Highliting with Notepad++
Post by: zah11 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.gif


Title: Re: Syntax Highliting with Notepad++
Post by: MyOwnWorstEnemy 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.gif banghead.gif banghead.gif


Title: Re: Syntax Highliting with Notepad++
Post by: Egor on December 13, 2010, 07:45:41 AM
wish I could help but I use Notepad 2


Title: Re: Syntax Highliting with Notepad++
Post by: Phil Ivey 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.gif

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.


Title: Re: Syntax Highliting with Notepad++
Post by: davebot on March 11, 2011, 05:31:12 PM
this is a must have program.   the line numbering feature alone makes it worth having.


Title: Re: Syntax Highliting with Notepad++
Post by: ButBot on June 11, 2011, 01:01:48 PM
This is great! Thanks!


Title: Re: Syntax Highliting with Notepad++
Post by: milliondollar 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


Title: Re: Syntax Highliting with Notepad++
Post by: Egor 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)


Title: Re: Syntax Highliting with Notepad++
Post by: milliondollar on October 13, 2011, 12:07:37 PM
am with ya

& problem soolved - am glad the thread exists - code looks noice in coloeur


Title: Re: Syntax Highliting with Notepad++
Post by: superbot 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 ??


Title: Re: Syntax Highliting with Notepad++
Post by: sngbot 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. :)


Title: Re: Syntax Highliting with Notepad++
Post by: superbot on February 12, 2012, 03:08:41 PM
Ok thanks man.  thumbsup.gif

I missed that 2nd post   ::)

I'll give it a try later!!


Title: Re: Syntax Highliting with Notepad++
Post by: tr34187 on April 29, 2012, 10:20:56 PM
i do love notepad++   party0007.gif


Title: Re: Syntax Highliting with Notepad++
Post by: Ja-Sers on May 06, 2012, 01:10:11 AM
Hi

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

Thank you!


Title: Re: Syntax Highliting with Notepad++
Post by: tr34187 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


Title: Re: Syntax Highliting with Notepad++
Post by: Mongo 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.


Title: Re: Syntax Highliting with Notepad++
Post by: insgesicht on August 15, 2012, 03:13:13 PM
hi i have the same problem !

egor can you reupload the file please?



Title: Re: Syntax Highliting with Notepad++
Post by: Egor 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


Title: Re: Syntax Highliting with Notepad++
Post by: Keyone on October 14, 2012, 08:15:15 PM
Please can somebody reupload this?  :(


Title: Re: Syntax Highliting with Notepad++
Post by: fleurie on October 14, 2012, 11:07:44 PM
The download instructions are provided in the first post on this topic? Did you try that yet?


Title: Re: Syntax Highliting with Notepad++
Post by: jbj81 on October 15, 2012, 12:29:08 AM
"The file link that you requested is not valid. Please contact link publisher or try to make a search."


Title: Re: Syntax Highliting with Notepad++
Post by: Keyone on October 15, 2012, 11:46:31 AM
The download instructions are provided in the first post on this topic? Did you try that yet?

The first file seems to not be available unfortunately :(


Title: Re: Syntax Highliting with Notepad++
Post by: fleurie on October 15, 2012, 02:17:44 PM
I have userDefineLang.xml but don't know how to upload it on this site - not sure if it can be done. It was posted as public domain so if someone can explain how to upload it, I'll do that.

The other option is to send me an email address and I'll send it to you.


Title: Re: Syntax Highliting with Notepad++
Post by: Keyone on October 15, 2012, 02:41:42 PM
Just upload it on mediafire or zippyshare  :)


Title: Re: Syntax Highliting with Notepad++
Post by: jbj81 on October 15, 2012, 03:24:14 PM
Why dont you guys use Dropbox? Just copy the file in Public folder and copy the public link and post it here. So easy.


Title: Re: Syntax Highliting with Notepad++
Post by: fleurie on October 15, 2012, 06:22:56 PM
Here's the link:  http://www.mediafire.com/file/1csk88rrx2xl9bp/userDefineLang.xml  (http://www.mediafire.com/file/1csk88rrx2xl9bp/userDefineLang.xml)


Title: Re: Syntax Highliting with Notepad++
Post by: Keyone on October 16, 2012, 06:10:33 PM
Thank you so much :)

I hope someone will edit the op  :)


Title: Re: Syntax Highliting with Notepad++
Post by: NoMoreChips on January 29, 2014, 06:59:56 PM
Guys u can select PPL as programming language an that´s fine  anim_03.gif


Title: Re: Syntax Highliting with Notepad++
Post by: Roshambo on October 06, 2014, 12:07:26 PM
Egor

Can you please re-post the userdefinelang.xml

The download link is broken.

Thanks,


Title: Re: Syntax Highliting with Notepad++
Post by: Egor on October 06, 2014, 06:41:50 PM
Wasn't mine, sorry. I only reposted this from the old forum.

Personally I use Notepad 2 (so does MS) and have never used ++.


Title: Re: Syntax Highliting with Notepad++
Post by: keiths on October 07, 2014, 12:09:22 AM
Egor

Can you please re-post the userdefinelang.xml

The download link is broken.

Thanks,

Hi Roshambo,

I placed a copy here for you:

http://www.widgetmaven.com/files/Tools/userDefineLang.xml (http://www.widgetmaven.com/files/Tools/userDefineLang.xml)

(Right click the link and choose 'Save As')

Keiths




Title: Re: Syntax Highliting with Notepad++
Post by: FdMrr on August 14, 2019, 01:08:25 PM
Anyone can update the stylers link to??

tks


Title: Re: Syntax Highliting with Notepad++
Post by: Himper84 on August 16, 2021, 01:18:56 AM
FdMrr, I've been using this one. Link still works.

Here's the link:  http://www.mediafire.com/file/1csk88rrx2xl9bp/userDefineLang.xml  (http://www.mediafire.com/file/1csk88rrx2xl9bp/userDefineLang.xml)