Announcement

Collapse
No announcement yet.

MemoryEx String

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Imagine Programming
    replied
    Originally posted by Shrek View Post
    I just found one of your old posts here:



    now I know the lexers aren't defined with colors and keywords Ive used Pearl as that deals with the folding how I need it and the comments how I need it, thank for the help :yes
    Glad I could be the second perspective hehe :yes

    Leave a comment:


  • Shrek
    replied
    I just found one of your old posts here:



    now I know the lexers aren't defined with colors and keywords Ive used Pearl as that deals with the folding how I need it and the comments how I need it, thank for the help :yes

    Leave a comment:


  • Imagine Programming
    replied
    Originally posted by Shrek View Post
    Well I was just trying to lex in the container because I know Lua and AMS is already in a Lua state.
    This doesn't matter though right? The Lua state has no business with lexing If you use a scintilla lexer, much faster code will be called. What will you be highlighting? Lua code?

    Leave a comment:


  • Shrek
    replied
    Well I was just trying to lex in the container because I know Lua and AMS is already in a Lua state.

    Just tried the return value from SCI_GETCHARAT and its giving a ASCII character code and thats fine as I can work with that but if you try to lex in the container you'll note it works just fine when typing but whenever text is set programmatically or through cut/copy/paste things stop working.....................

    Leave a comment:


  • Imagine Programming
    replied
    What precisely are you trying to achieve though? Why aren't you using a lexer for styling?

    Leave a comment:


  • Shrek
    replied
    That's what I thought at first but some deep goggling reveled its a pointer to the character in the buffer returned from SCI_GETCHARACTERPOINTER and also SCN_STYLENEEDED reads in the docs like it styles only whole lines but it doesn't it can style all or some of the document so in my SCN_STYLENEEDED I have it set to only style a line at a time.

    Leave a comment:


  • Imagine Programming
    replied
    Doens't SCI_GETCHARAT actually return the character itself, and not a pointer to it? So it wouldn't return a Char_Buffer, but a Char.

    Leave a comment:


  • Shrek
    replied
    Actually Bas I cant get just a single character properly, could you have a look? Its in the style function, just paste everything to a blank project on show event with MemoryEx and the Scintilla.dll in cdroot and it will show you what I mean when you type some stuff in the Scintilla window:



    Excuse the code link but for reasons unknown one cant attach a Lua script.

    Leave a comment:


  • Shrek
    replied
    Cheers Bas :yes

    Leave a comment:


  • Imagine Programming
    replied
    Buffer is a zero based pointer, so the first character is at buffer+0, the second character is at buffer+1 and so forth.

    Code:
    local string = MemoryEx.String(Buffer + 10, 20, MEMEX_ASCII);
    Get's the string starting at the 11th character with a length of 20.

    Leave a comment:


  • Shrek
    started a topic MemoryEx String

    MemoryEx String

    I have a document buffer not created by MemoryEx and I can get a specific character with:

    Code:
    local Char = MemoryEx.String(Buffer,Char_At_Pos,MEMEX_ASCII)
    but how do I get a range of characters from the buffer giving a start and end point so I have a character string to parse?
Working...
X