<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>pnotepad.org forums &#187; Tag: PyPN - Recent Posts</title>
		<link>http://pnotepad.org/forums/tags/pypn</link>
		<description>Programmer&#039;s Notepad Forums</description>
		<language>en-US</language>
		<pubDate>Thu, 09 Feb 2012 06:34:29 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.3</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://pnotepad.org/forums/search.php</link>
		</textInput>
		<atom:link href="http://pnotepad.org/forums/rss/tags/pypn" rel="self" type="application/rss+xml" />

		<item>
                        <title>PyPN for Python 2.7 (Patabugen)</title>
			<link>http://pnotepad.org/forums/topic/7452#post-10649</link>
			<pubDate>Wed, 08 Feb 2012 01:18:35 +0000</pubDate>
			<dc:creator>Patabugen</dc:creator>
			<guid isPermaLink="false">10649@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;In case you have had much trouble finding it as I did (since it's not listed on the Python website any longer) you can download 2.6 from here:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.python.org/ftp/python/2.6.6/&#34; rel=&#34;nofollow&#34;&#62;http://www.python.org/ftp/python/2.6.6/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Simon, it might be handy to chuck a link to that on the PyPN add-ons page ( &#60;a href=&#34;http://www.pnotepad.org/add-ons/&#34; rel=&#34;nofollow&#34;&#62;http://www.pnotepad.org/add-ons/&#60;/a&#62; ).
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>auto-indent Python code (fongandrew)</title>
			<link>http://pnotepad.org/forums/topic/5441#post-10636</link>
			<pubDate>Sun, 05 Feb 2012 07:09:54 +0000</pubDate>
			<dc:creator>fongandrew</dc:creator>
			<guid isPermaLink="false">10636@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;In case anyone is stumbling on this via Google, here's a fix for the comment and multiple indentation bugs. Edit PN_dir\init.py and change the python_indent function as follows:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;import re

# Indention regex - look for colon, then optional spaces and comment
PY_INDENT_RE = re.compile(r&#38;#039;:\s*(#.*)?$&#38;#039;)

@indenter(&#38;quot;python&#38;quot;)
def python_indent(c, doc):
    sci = scintilla.Scintilla(doc)
    if c == &#38;#039;\n&#38;#039; or c == &#38;#039;\r&#38;#039;:
        pos = sci.CurrentPos
        line = sci.LineFromPosition( pos )
        prev_line = sci.GetLine(line - 1)

        # If the previous line matches regular expression above, then indent
        if PY_INDENT_RE.search(prev_line):
            indent = sci.GetLineIndentation( line )

            # The DumbIndent system may already have indented this line...
            previndent = sci.GetLineIndentation( line - 1 )
            if indent == previndent or indent == 0:
                indent += 4
                sci.IndentLine( line, indent )&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
                        <title>PyPN for Python 2.7 (simon)</title>
			<link>http://pnotepad.org/forums/topic/7452#post-10633</link>
			<pubDate>Wed, 01 Feb 2012 08:52:40 +0000</pubDate>
			<dc:creator>simon</dc:creator>
			<guid isPermaLink="false">10633@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;It's intentional in that I haven't had a chance to build PyPN with 2.7 and test it yet. Other than that, there will be a version at some point that uses 2.7.
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>PyPN for Python 2.7 (tanveer)</title>
			<link>http://pnotepad.org/forums/topic/7452#post-10631</link>
			<pubDate>Wed, 01 Feb 2012 02:08:13 +0000</pubDate>
			<dc:creator>tanveer</dc:creator>
			<guid isPermaLink="false">10631@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;Hi,&#60;br /&#62;
I find the installer for PyPN for Python 2.6 but there is no installer for Python 2.7. Is this intentional or unsupported on 2.7?&#60;/p&#62;
&#60;p&#62;Thanks
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>RegEx in PN  - Example (NickDMax)</title>
			<link>http://pnotepad.org/forums/topic/7416#post-10570</link>
			<pubDate>Thu, 12 Jan 2012 15:30:06 +0000</pubDate>
			<dc:creator>NickDMax</dc:creator>
			<guid isPermaLink="false">10570@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;Well I think that the dot operator should be [^\r\n] because as the defect points out the current behavior is not consistent. However I love that PN does actually support multi-line regex - i.e. that [\s\S] WILL match across new-line chars. Though I suppose that it would be nice to have a &#34;single-line/muti-line&#34; option that would either look at the document on a line-by-line basis or (as it is currently) as a single stream.&#60;/p&#62;
&#60;p&#62;Since this is one area of PN that I use extensively I too will be looking into improving PN's regex support. For my personal use I have already added the &#60;a href=&#34;http://code.google.com/p/pnotepad/issues/detail?id=1534&#38;amp;q=regex&#38;amp;sort=-id&#34;&#62;format_perl&#60;/a&#62; features from Xpressive.&#60;/p&#62;
&#60;p&#62;I also spectacularly failed in my attempt to add Unicode support for replace! However, I am still looking into how you managed to get unicode search working and I am confident that I can sort things out. My fail-safe plan is to parse the replace string and &#34;encode&#34; the unicode chars into \x00\x00 etc. so that the replace string can remain a std::string. However, I know next to nothing about the non-ASCII world so I don't know how successful I will be. I will probably pester you with questions. :)
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>RegEx in PN  - Example (simon)</title>
			<link>http://pnotepad.org/forums/topic/7416#post-10567</link>
			<pubDate>Thu, 12 Jan 2012 10:20:39 +0000</pubDate>
			<dc:creator>simon</dc:creator>
			<guid isPermaLink="false">10567@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;Excellent stuff! This would be great content for the docs or blog - perhaps both. &#60;/p&#62;
&#60;p&#62;It's definitely worth looking into Xpressive's newline matching behaviour. I agree that generally we don't want to match newlines, although for some multi-line matching it can be useful.
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>RegEx in PN  - Example (NickDMax)</title>
			<link>http://pnotepad.org/forums/topic/7416#post-10563</link>
			<pubDate>Wed, 11 Jan 2012 23:37:56 +0000</pubDate>
			<dc:creator>NickDMax</dc:creator>
			<guid isPermaLink="false">10563@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;As long as we are on the topic of RegEx: &#60;a href=&#34;http://code.google.com/p/pnotepad/issues/detail?id=1533&#38;amp;sort=-id&#34;&#62;There is a defect logged about the nature of the dot (.) operator.&#60;/a&#62; As I understand it the dot operator should not match to EOL chars. The XPressive search is given the option regex_constants::not_dot_newline which keeps the dot from matching to \n. However windows tends to use \r\n as a newline marker and the dot will match to \r.&#60;/p&#62;
&#60;p&#62;So when it comes to the end of the line, the dot operator can be a little funny. So often it is best just to not use it!&#60;/p&#62;
&#60;p&#62;the dot operator operates as: [^\n] -- matches everything BUT the new line char.&#60;br /&#62;
What windows users typically expect: [^\r\n] -- match everything BUT the windows new line chars&#60;br /&#62;
How to match any char: [\s\S] -- will match any char.&#60;/p&#62;
&#60;p&#62;Example: Say you want to replace the inner most div tags with span tags.&#60;/p&#62;
&#60;p&#62;Find What: &#38;lt;div&#38;gt;(?![\s\S]*?&#38;lt;div&#38;gt;[\s\S]*)([\s\S]*?)&#38;lt;/div&#38;gt;&#60;br /&#62;
Replace with: &#38;lt;span&#38;gt;\1&#38;lt;/span&#38;gt;&#60;/p&#62;
&#60;p&#62;The basic version of this regex is: &#38;lt;div&#38;gt;([\s\S]*?)&#38;lt;/div&#38;gt;&#60;/p&#62;
&#60;p&#62;this captures all chars inside of a div tag-- however if the tags are nested then problems happen since this will match the first open div tag with the first close div tag. So we add an assertion that the match does not include a div tag itself. The result is that we will look for the inner most div tag (assuming of course valid HTML).&#60;/p&#62;
&#60;p&#62;The point of the example is that we can use [\s\S] to capture all chars in the tags (including new line chars). \s is the class of all white-space characters and \S is the set of all NON-white-space characters. One could equally use [\w\W] or [\d\D] &#60;/p&#62;
&#60;p&#62;Sometimes however it is nice to be able to limit our searches to a single line. Using [\s\S] can get us into trouble here since even something like: //([\s\S]*)$ &#60;/p&#62;
&#60;p&#62;an attempt to grab the content of an end-of-line comment - but this will match past the end of lines. We would need: //([\s\S]*?)$  to ensure the non-greedy match.&#60;/p&#62;
&#60;p&#62;Or we could just be more specific on what we were looking for: //([^\r\n]*)&#60;/p&#62;
&#60;p&#62;So it is true that the dot operator is a little buggy in PN (when operating of files using \r\n or \r line endings) but a little knowledge can get you around and let you use the full power of PN's regular expression search and replace.
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>RegEx in PN  - Example (NickDMax)</title>
			<link>http://pnotepad.org/forums/topic/7416#post-10562</link>
			<pubDate>Wed, 11 Jan 2012 15:05:11 +0000</pubDate>
			<dc:creator>NickDMax</dc:creator>
			<guid isPermaLink="false">10562@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;So how might this be useful? Well people often use TODO: tags in comments to identify tasks that need to be completed. The following PyPn script will extract all TODO: EOL comments (on their own line) into a new file.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;###############################################################################
## Extract all ToDo lines into a new file
## By: NickDMax

import pn
import scintilla
from pypn.decorators import script

@script(&#38;quot;Extract Todo&#38;quot;,&#38;quot;CPP Utils&#38;quot;)
def Name():
    &#38;quot;&#38;quot;&#38;quot; Extract TODO: lines into a new file &#38;quot;&#38;quot;&#38;quot;
    #recorded search/replace wrapped in an UndoAction
    doc = pn.CurrentDoc()
    sci = scintilla.Scintilla(doc)
    sci.BeginUndoAction()
    opt = pn.GetUserSearchOptions()
    opt.FindText = u&#38;#039;^(?:(?![ \\t]*//[ \\t]*(?i:TODO:)).*(?:\\r\\n)+&#124;[ \\t]*//[ \\t]*(?i:TODO:)[ \\t]*(.*)(\\r\\n)?(?:\\r\\n)*)&#38;#039;
    opt.MatchWholeWord = False
    opt.MatchCase = False
    opt.UseRegExp = True
    opt.SearchBackwards = False
    opt.LoopOK = True
    opt.UseSlashes = False
    opt.ReplaceText = u&#38;#039;\\1\\2&#38;#039;
    opt.ReplaceInSelection = False
    doc.ReplaceAll(opt)
    sci.EndUndoAction()
    #Now to save the text in a new file
    startPos = 0
    endPos = sci.Length
    text = sci.GetTextRange(startPos, endPos)
    newDoc = pn.NewDocument(&#38;quot;&#38;quot;)
    newsci = scintilla.Scintilla(newDoc)
    newsci.BeginUndoAction()
    newsci.AppendText(len(text), text)
    newsci.EndUndoAction()
    #restore the document
    sci.Undo();&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Of course I have only tested this with one test file:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;#include&#38;lt;iostream&#38;gt;

//TODO: remember to do something here.

int main() {
    //TODO: remember to do something else here
    //  TODO:  oh don&#38;#039;t forget to do this

    return 0;
}

//  ToDo:   and then there is this here too.&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;So a little more testing is probably needed to ensure that it is working as expected.
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>RegEx in PN  - Example (NickDMax)</title>
			<link>http://pnotepad.org/forums/topic/7416#post-10559</link>
			<pubDate>Wed, 11 Jan 2012 02:51:44 +0000</pubDate>
			<dc:creator>NickDMax</dc:creator>
			<guid isPermaLink="false">10559@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;So I was thinking about this &#60;a href=&#34;http://untidy.net/blog/2011/05/18/regular-expressions-and-scripts-worked-example/&#34;&#62;RegEx/Script example from the Untidy blog&#60;/a&#62; and I thought: &#34;Can that be one in 1 RegEx?&#34;&#60;/p&#62;
&#60;p&#62;The answer is of course: Yes - but would you really want to.&#60;/p&#62;
&#60;p&#62;Search: ^(?:(?!LogStep).*(?:\r\n)+)&#124;(?:LogStep\(\s*&#34;([^&#34;]+)&#34;\s*\).*(\r\n)(\r\n)*)&#60;br /&#62;
Replace: \1\2&#60;/p&#62;
&#60;p&#62;hit &#38;lt;Replace All&#38;gt;&#60;/p&#62;
&#60;p&#62;This is a pretty complex RegEx so lets break it up. The overall structure is A&#124;B&#60;/p&#62;
&#60;p&#62;A: RegEx to match the rest of a line NOT BEGINNING with &#34;LogStep&#34;&#60;br /&#62;
B: RegEx to match the rest of a line that DOES begin with &#34;LogStep&#34; - capture the text (and a CRLF new line)&#60;/p&#62;
&#60;p&#62;The whole thing is wrapped in a the expression: ^(?:A&#124;B)&#60;/p&#62;
&#60;p&#62;where ^ asserts the beginning of a line, and (?: ) is a non-capture group - that is it treated as a group but not captured into \1 or \2 etc. - this outer non-capture group creates separation. Without it our expression would need to be: ^A&#124;^B&#60;/p&#62;
&#60;p&#62;Since the expression A contains no capture groups BUT the overall expression DOES contain capture 2 capture groups \1 and \2 will be empty when expression A matches. When B matches \1 is the text inside of the quotation marks, and \2 is a crlf (\r\n) pair.
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>Scintilla document functions/methods not mapped in PyPN (simon)</title>
			<link>http://pnotepad.org/forums/topic/5483#post-10351</link>
			<pubDate>Wed, 28 Dec 2011 21:51:42 +0000</pubDate>
			<dc:creator>simon</dc:creator>
			<guid isPermaLink="false">10351@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;Thanks, I've also fixed up registration - I guess it got broken by a security upgrade at some point.
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>Scintilla document functions/methods not mapped in PyPN (NickDMax)</title>
			<link>http://pnotepad.org/forums/topic/5483#post-10149</link>
			<pubDate>Tue, 20 Dec 2011 18:53:53 +0000</pubDate>
			<dc:creator>NickDMax</dc:creator>
			<guid isPermaLink="false">10149@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;&#60;a href=&#34;http://www.pnotepad.org/docs/pypn_api_pages#the_scintilla_module&#34;&#62;Done&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>Scintilla document functions/methods not mapped in PyPN (NickDMax)</title>
			<link>http://pnotepad.org/forums/topic/5483#post-8433</link>
			<pubDate>Mon, 24 Oct 2011 20:36:05 +0000</pubDate>
			<dc:creator>NickDMax</dc:creator>
			<guid isPermaLink="false">8433@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;I can't get in either I think I have the password saved somewhere on my home computer but I will not be back home for a while so I am unable to update the wiki at this time. I wonder when registration was disabled? Or did we have to ask Simon for access specifically I don't remember.
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>Scintilla document functions/methods not mapped in PyPN (Nux)</title>
			<link>http://pnotepad.org/forums/topic/5483#post-8418</link>
			<pubDate>Fri, 21 Oct 2011 11:25:09 +0000</pubDate>
			<dc:creator>Nux</dc:creator>
			<guid isPermaLink="false">8418@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;&#60;a href=&#34;http://pnotepad.org/docs/pypn_api_pages?do=register&#34; rel=&#34;nofollow&#34;&#62;http://pnotepad.org/docs/pypn_api_pages?do=register&#60;/a&#62;&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;
Command disabled: register
&#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;I think I was registered before, but I don't remeber the password either.
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>Scintilla document functions/methods not mapped in PyPN (NickDMax)</title>
			<link>http://pnotepad.org/forums/topic/5483#post-8401</link>
			<pubDate>Tue, 18 Oct 2011 01:56:33 +0000</pubDate>
			<dc:creator>NickDMax</dc:creator>
			<guid isPermaLink="false">8401@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;I tried to add that but I don't know my password to the Wiki :( and FF can save either the password to the forums or the docs but not both. It would be nice if they were SSO so that there was only one password.&#60;/p&#62;
&#60;p&#62;Point is though -- the API docs are a Wiki and anyone who can register can edit and update the documentation.
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>Scintilla document functions/methods not mapped in PyPN (Nux)</title>
			<link>http://pnotepad.org/forums/topic/5483#post-8400</link>
			<pubDate>Sat, 15 Oct 2011 20:07:59 +0000</pubDate>
			<dc:creator>Nux</dc:creator>
			<guid isPermaLink="false">8400@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;Simon could you add some note on top of &#60;a href=&#34;http://pnotepad.org/docs/pypn_api_pages&#34;&#62;PyPN API Description&#60;/a&#62; that methods of scintilla module not mapped/implemented in PyPN can still be used with SendMessage function like this:&#60;br /&#62;
&#60;code&#62;pn.CurrentDoc().SendMessage(methodCode, firstArgument, secondArgument)&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;And that codes of methods can be found at:&#60;br /&#62;
&#60;a href=&#34;http://scintilla.hg.sourceforge.net/hgweb/scintilla/scintilla/file/tip/include/Scintilla.iface&#34; rel=&#34;nofollow&#34;&#62;http://scintilla.hg.sourceforge.net/hgweb/scintilla/scintilla/file/tip/include/Scintilla.iface&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;I think it might save some time for others.
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>Can&#039;t get PyPN to work with PN 2.3.4 (horus)</title>
			<link>http://pnotepad.org/forums/topic/5475#post-8380</link>
			<pubDate>Wed, 28 Sep 2011 20:32:48 +0000</pubDate>
			<dc:creator>horus</dc:creator>
			<guid isPermaLink="false">8380@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;Oh, I see.&#60;/p&#62;
&#60;p&#62;I actually needed the sort function. So I've also tried TextUtil and it works perfectly. You could take your time to improve &#34;Add-on&#34; web page.&#60;/p&#62;
&#60;p&#62;It would be nice to have it included in the setup package :)
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>Can&#039;t get PyPN to work with PN 2.3.4 (simon)</title>
			<link>http://pnotepad.org/forums/topic/5475#post-8378</link>
			<pubDate>Wed, 28 Sep 2011 14:23:06 +0000</pubDate>
			<dc:creator>simon</dc:creator>
			<guid isPermaLink="false">8378@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;You need to install Python 2.6 to use PyPN, it's currently not bundled with it.&#60;/p&#62;
&#60;p&#62;I'll admit this isn't made clear by the web site currently, so that clearly needs improving.
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>Can&#039;t get PyPN to work with PN 2.3.4 (horus)</title>
			<link>http://pnotepad.org/forums/topic/5475#post-8376</link>
			<pubDate>Wed, 28 Sep 2011 13:43:44 +0000</pubDate>
			<dc:creator>horus</dc:creator>
			<guid isPermaLink="false">8376@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;I have PN 2.3.4 installed.  I went to &#60;a href=&#34;http://www.pnotepad.org/add-ons/&#34; rel=&#34;nofollow&#34;&#62;http://www.pnotepad.org/add-ons/&#60;/a&#62; to try out the PyPN.&#60;/p&#62;
&#60;p&#62;So I downloaded pypn-1.1.2350-py26.zip from that page, unzipped everything to PN2 directory and run “pn --findexts” as stated in that page, but I got an error saying something that:&#60;/p&#62;
&#60;p&#62;.... python26.dll is missing from your computer. ...&#60;/p&#62;
&#60;p&#62;I searched PN2 directory and then my whole computer's hard drive and instead there is no such file.  Missing python26.dll file in the zip file?
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>Using F1 to open a custom .chm help file (HeelX)</title>
			<link>http://pnotepad.org/forums/topic/5448#post-8322</link>
			<pubDate>Tue, 13 Sep 2011 06:32:28 +0000</pubDate>
			<dc:creator>HeelX</dc:creator>
			<guid isPermaLink="false">8322@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;Yeah, it works!! Thank you very much!!
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>Indicator functions not available for PyPN? (CoDEmanX)</title>
			<link>http://pnotepad.org/forums/topic/5447#post-8317</link>
			<pubDate>Mon, 12 Sep 2011 12:45:25 +0000</pubDate>
			<dc:creator>CoDEmanX</dc:creator>
			<guid isPermaLink="false">8317@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;Great, thank you Simon!&#60;/p&#62;
&#60;p&#62;Added request, &#60;a href=&#34;http://code.google.com/p/pnotepad/issues/detail?id=1437&#34;&#62;issue #1437&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;This test script marks all numbers (I use it as PyPN textclip):&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;import string

doc = pn.CurrentDoc()
sci = scintilla.Scintilla(doc)

doc.SendMessage(2500, 8, &#38;#039;&#38;#039;)

doc.SendMessage(2505, 0, sci.Length)

doc.SendMessage(2502, 7, &#38;#039;&#38;#039;)

sci.IndicSetStyle(8, 7)

for i in range(0, sci.Length-1):
	char = sci.GetTextRange(i, i+1)
	if char in string.digits:
		doc.SendMessage(2504, i, 1)&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;I wonder what the long/char* parameter is for (e.g. in SetIndicatorValue)...&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;ArgumentError: Python argument types in IDocument.SendMessage(IDocument, int, int) did not match C++ signature:
    SendMessage(class extensions::IDocument {lvalue}, unsigned int, unsigned int, char const *)
    SendMessage(class extensions::IDocument {lvalue}, unsigned int, unsigned int, long)&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
                        <title>Using F1 to open a custom .chm help file (simon)</title>
			<link>http://pnotepad.org/forums/topic/5448#post-8316</link>
			<pubDate>Mon, 12 Sep 2011 10:08:54 +0000</pubDate>
			<dc:creator>simon</dc:creator>
			<guid isPermaLink="false">8316@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;@HeelX CoDEmanX is most likely right, if you have Capture output checked then hh.exe will be running in the background. Disable that, and it should launch as normal.
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>Indicator functions not available for PyPN? (simon)</title>
			<link>http://pnotepad.org/forums/topic/5447#post-8315</link>
			<pubDate>Mon, 12 Sep 2011 10:06:40 +0000</pubDate>
			<dc:creator>simon</dc:creator>
			<guid isPermaLink="false">8315@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;Ah yes, they haven't been added yet. You should be able to do them manually using:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;doc.SendMessage&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;You'll need the message numbers for each of the APIs, which are:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;# Set the indicator used for IndicatorFillRange and IndicatorClearRange
set void SetIndicatorCurrent=2500(int indicator,)

# Get the current indicator
get int GetIndicatorCurrent=2501(,)

# Set the value used for IndicatorFillRange
set void SetIndicatorValue=2502(int value,)

# Get the current indicator vaue
get int GetIndicatorValue=2503(,)

# Turn a indicator on over a range.
fun void IndicatorFillRange=2504(int position, int fillLength)

# Turn a indicator off over a range.
fun void IndicatorClearRange=2505(int position, int clearLength)

# Are any indicators present at position?
fun int IndicatorAllOnFor=2506(int position,)

# What value does a particular indicator have at at a position?
fun int IndicatorValueAt=2507(int indicator, int position)

# Where does a particular indicator start?
fun int IndicatorStart=2508(int indicator, int position)

# Where does a particular indicator end?
fun int IndicatorEnd=2509(int indicator, int position)&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;so for example to clear a range you want something like:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;editor = scintilla.Scintilla(doc)
doc.SendMessage(2505, editor.SelectionStart, editor.SelectionEnd)&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Also, if you wouldn't mind filing a request I'll add the missing commands to the next PyPN :)
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>Using F1 to open a custom .chm help file (CoDEmanX)</title>
			<link>http://pnotepad.org/forums/topic/5448#post-8314</link>
			<pubDate>Mon, 12 Sep 2011 07:36:07 +0000</pubDate>
			<dc:creator>CoDEmanX</dc:creator>
			<guid isPermaLink="false">8314@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;@HeelX: Make sure you uncheck &#34;Capture output?&#34; in the Console I/O tab!&#60;/p&#62;
&#60;p&#62;The following settings are working for me:&#60;br /&#62;
&#60;a href=&#34;http://img6.imagebanana.com/img/2er3hhsc/PNotepad_Capture_Output.png&#34;&#62;PNotepad_Capture_Output.png&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>Using F1 to open a custom .chm help file (Nux)</title>
			<link>http://pnotepad.org/forums/topic/5448#post-8313</link>
			<pubDate>Sun, 11 Sep 2011 18:15:50 +0000</pubDate>
			<dc:creator>Nux</dc:creator>
			<guid isPermaLink="false">8313@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;Yes, you can assign shorcuts to scripts (I have F1 for that).&#60;/p&#62;
&#60;p&#62;You do need Python, but installing it is very easy (just be sure to get Python 2.6). You can install with default options and so you just click Next, Next, Next and Finish :-). You still have to enable Python in PN which is a bit more effort but this is really a bit and opens new world for you :-). To be more exact you need to download PyPN zip and extract it to th PN folder. Then you just run &#60;code&#62;pn --findexts&#60;/code&#62;.&#60;/p&#62;
&#60;p&#62;This is all described here:&#60;br /&#62;
&#60;a href=&#34;http://www.pnotepad.org/add-ons/&#34; rel=&#34;nofollow&#34;&#62;http://www.pnotepad.org/add-ons/&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>Using F1 to open a custom .chm help file (HeelX)</title>
			<link>http://pnotepad.org/forums/topic/5448#post-8312</link>
			<pubDate>Sun, 11 Sep 2011 16:34:09 +0000</pubDate>
			<dc:creator>HeelX</dc:creator>
			<guid isPermaLink="false">8312@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;@simon: Thanks for your reply. I changed it to:&#60;/p&#62;
&#60;p&#62;Command: C:\Windows\hh.exe&#60;br /&#62;
Parameters: D:\Dev\Engines\A8.30.1\3dgs_manual.chm&#60;/p&#62;
&#60;p&#62;The output says: &#34;&#38;gt; &#34;C:\Windows\hh.exe&#34; D:\Dev\Engines\A8.30.1\3dgs_manual.chm&#34;&#60;/p&#62;
&#60;p&#62;but it still doesn't open. I also tried to use both C:\Windows and D:\Dev\Engines\A8.30.1 as Folder, but it doesn't matter. I tried it in the cmd commandline with the following line:&#60;/p&#62;
&#60;p&#62;C:\Windows\hh.exe D:\Dev\Engines\A8.30.1\3dgs_manual.chm&#60;/p&#62;
&#60;p&#62;and the .chm gets correctly opened.&#60;/p&#62;
&#60;p&#62;@Nux: Thank you very much, this looks interesting. But before I use this, it would be quiet helpful if I can open the CHM just on pressing F1. If this works, I will turn to this for sure :-) Am I right that this is a Python script and I have to install Python for it? And how am I supposed to add this correctly to PN?
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>Using F1 to open a custom .chm help file (Nux)</title>
			<link>http://pnotepad.org/forums/topic/5448#post-8311</link>
			<pubDate>Sat, 10 Sep 2011 16:14:12 +0000</pubDate>
			<dc:creator>Nux</dc:creator>
			<guid isPermaLink="false">8311@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;@HeelX: You can use &#60;a href=&#34;http://scriptshare.rocketmonkeys.com/script/35&#34;&#62;this script&#60;/a&#62; to open help AND go to a certain help page. So if your cursor is over some function name you can just press F1 and open help page for it.&#60;/p&#62;
&#60;p&#62;@simon: Could you change the limit in ScriptShare to over 5000 characters? I hit this quit often and just over few hundred, so 8000 would be quite fine (for me at least).
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>Using F1 to open a custom .chm help file (simon)</title>
			<link>http://pnotepad.org/forums/topic/5448#post-8310</link>
			<pubDate>Fri, 09 Sep 2011 16:33:12 +0000</pubDate>
			<dc:creator>simon</dc:creator>
			<guid isPermaLink="false">8310@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;Did you put the CHM name in the parameters line? The command line should contain only the exe path.
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>Using F1 to open a custom .chm help file (HeelX)</title>
			<link>http://pnotepad.org/forums/topic/5448#post-8309</link>
			<pubDate>Fri, 09 Sep 2011 14:55:04 +0000</pubDate>
			<dc:creator>HeelX</dc:creator>
			<guid isPermaLink="false">8309@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;I want to let F1 open a .chm file, that is associated with the C/C++ scheme. In the Options\Tools dialog, I created with Add a new entry, assigned F1 as shortcut and entered the following command:&#60;/p&#62;
&#60;p&#62;C:\Windows\hh.exe D:\Dev\Engines\A8.30.1\3dgs_manual.chm&#60;/p&#62;
&#60;p&#62;I just want to let the Windows CHM viewer show the above listed .chm file. In the Windws command line, I successfully can open it either with just entering the path to the .chm as well as using explicitely the hh.exe. PN always says&#60;/p&#62;
&#60;p&#62;&#38;gt; &#34;C:\Windows\hh.exe D:\Dev\Engines\A8.30.1\3dgs_manual.chm&#34;&#60;br /&#62;
&#38;gt; Failed to create process: Das System kann die angegebene Datei nicht finden.&#60;br /&#62;
&#38;gt; Process Exit Code: 0&#60;br /&#62;
&#38;gt; Time Taken: 00:00&#60;/p&#62;
&#60;p&#62;What am I doing wrong?&#60;/p&#62;
&#60;p&#62;Thanks in advance,&#60;br /&#62;
-Christian
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>Indicator functions not available for PyPN? (CoDEmanX)</title>
			<link>http://pnotepad.org/forums/topic/5447#post-8308</link>
			<pubDate>Fri, 09 Sep 2011 14:34:59 +0000</pubDate>
			<dc:creator>CoDEmanX</dc:creator>
			<guid isPermaLink="false">8308@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;Hey Simon,&#60;/p&#62;
&#60;p&#62;you suggested to have a look at the TextUtil code to get an idea, how Scintilla indicator styles work and that one could use it with PyPN ( &#60;a href=&#34;http://code.google.com/p/pnotepad/issues/detail?id=1374#c2&#34; rel=&#34;nofollow&#34;&#62;http://code.google.com/p/pnotepad/issues/detail?id=1374#c2&#60;/a&#62; )&#60;/p&#62;
&#60;p&#62;But the needed Indicator functions aren't available: &#60;a href=&#34;http://www.pnotepad.org/docs/pypn_api_pages&#34; rel=&#34;nofollow&#34;&#62;http://www.pnotepad.org/docs/pypn_api_pages&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;- Python error: &#38;lt;type 'exceptions.AttributeError'&#38;gt;: 'Scintilla' object has no attribute '&#60;strong&#62;SetIndicatorCurrent&#60;/strong&#62;' / '&#60;strong&#62;IndicatorClearRange&#60;/strong&#62;' / '&#60;strong&#62;IndicatorFillRange&#60;/strong&#62;'&#60;/p&#62;
&#60;p&#62;Am I overlooking something (imports?) or aren't they supported yet?
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>Trouble Installing PyPN (CoDEmanX)</title>
			<link>http://pnotepad.org/forums/topic/5138#post-8307</link>
			<pubDate>Fri, 09 Sep 2011 08:44:35 +0000</pubDate>
			<dc:creator>CoDEmanX</dc:creator>
			<guid isPermaLink="false">8307@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;PyPN works fine for me (v2.3.4.2350-charles), but TextUtil did not load - I used the link found on &#60;a href=&#34;http://www.pnotepad.org/add-ons/&#34; rel=&#34;nofollow&#34;&#62;http://www.pnotepad.org/add-ons/&#60;/a&#62; (it's for v2.2!)&#60;/p&#62;
&#60;p&#62;The proper Textutil download is here: &#60;a href=&#34;http://code.google.com/p/pnotepad/downloads/detail?name=textutil-0.2.zip&#38;#038;can=2&#38;#038;q=&#34; rel=&#34;nofollow&#34;&#62;http://code.google.com/p/pnotepad/downloads/detail?name=textutil-0.2.zip&#38;#038;can=2&#38;#038;q=&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;It loads and works, but appears to be buggy:&#60;br /&#62;
&#60;a href=&#34;http://code.google.com/p/pnotepad/issues/detail?id=1432&#34; rel=&#34;nofollow&#34;&#62;http://code.google.com/p/pnotepad/issues/detail?id=1432&#60;/a&#62;
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>

