Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

[Wrapper] Scintilla Wrapper v1.4.2.4


  • Please log in to reply
122 replies to this topic
RaptorX
  • Members
  • 751 posts
  • Last active: Feb 19 2015 02:47 AM
  • Joined: 19 Feb 2010

As far as I can judge yet, they seem to work fine ...

Ok I will look on to it. can you go to irc? it will make the debugging a little bit easier for me, because there are a few things i would ask you to do.

If not then it's ok, i will be on a x64 machine later on.
AutoHotkey Toolkit [Main Project]
Scintilla Wrapper
LexAHKL

RaptorX
  • Members
  • 751 posts
  • Last active: Feb 19 2015 02:47 AM
  • Joined: 19 Feb 2010
Well, after a bit of testing I can conclude that Autohotkey x64 is not loading the dll.
I tried other dlls with same results so I will have to say will be only for x32 version of Autohotkey (OS can be x64) for now.

Scintilla Wrapper v1.4.2.3
Date: Tue Oct 23 01:35:23 2012 +0200


Changes:

! Fix temporal object in __sciNotify() function to avoid conflict

Todo:

+ Add support for messages that use structures
+ Add Documentation


AutoHotkey Toolkit [Main Project]
Scintilla Wrapper
LexAHKL

hoppfrosch
  • Members
  • 399 posts
  • Last active: Feb 26 2016 05:31 AM
  • Joined: 25 Jan 2006

Well, after a bit of testing I can conclude that Autohotkey x64 is not loading the dll.
I tried other dlls with same results so I will have to say will be only for x32 version of Autohotkey (OS can be x64) for now.


Sorry for the late answer: I was offline (and I don't have IRC)

As I said - examples 3 and 9 are not working at all, all others do (AHK X64). This might be caused by running Scite4Autohotkey simultaneously/previously which might have loaded scintilla.dll already ... I can confirm working examples with AHK x32.

Coco
  • Members
  • 697 posts
  • Last active: Oct 31 2015 07:26 PM
  • Joined: 27 Jul 2012

This might be caused by running Scite4Autohotkey simultaneously/previously which might have loaded scintilla.dll


I don't think that SciTe4AutoHotkey is causing the problem, I tested the the samples by running them using SciTe4AutoHotkey. No problem so far..

hoppfrosch
  • Members
  • 399 posts
  • Last active: Feb 26 2016 05:31 AM
  • Joined: 25 Jan 2006

I don't think that SciTe4AutoHotkey is causing the problem, I tested the the samples by running them using SciTe4AutoHotkey. No problem so far..


I don't mean Scite4AutoHotkey causes the problem. I meant, the Scintilla Wrapper-examples DO work under AHK x64 BECAUSE Scite4AutoHotkey already has loaded scintilla.dll in memory (except example 3 & 9)

RaptorX
  • Members
  • 751 posts
  • Last active: Feb 19 2015 02:47 AM
  • Joined: 19 Feb 2010
no, because my examples try to load the dll regardless of wether another program has already loaded a copy of the dll or not.

i would like if in example 3 you change the tabhwnd to winexist().
if example 1 and 2 are working for you then the problem is theparent hwnd used.

for #9 i would like you to put msgbox % sci.hwnd right after the line which adds the scintilla control. if the msgbox returns 1 the component was not loaded, in any other case the problem would be somewhere else.

you can try that for example #3 as well. just check if sci.hwnd has a component handle after you add the scintilla component.


Edit

added new instruction


AutoHotkey Toolkit [Main Project]
Scintilla Wrapper
LexAHKL

hoppfrosch
  • Members
  • 399 posts
  • Last active: Feb 26 2016 05:31 AM
  • Joined: 25 Jan 2006
ad Example9: I did as you recommended - the msgbox shows a correct handle (not equal 1). During further investigations I put some Debug output within Notify() function. The function is called correctly, but it seems that the if (obj.scnCode = SCN_CHARADDED) statement is NEVER true ...

ad Example3: I also did as you recommended: adding msgbox % sci.hwnd " - " hwndtab after sci.Add(...) results in 1 - (any valid handle). Also sci.Add(WinExist(), ...) does not work ...

RaptorX
  • Members
  • 751 posts
  • Last active: Feb 19 2015 02:47 AM
  • Joined: 19 Feb 2010
you sir have a very strange issue on that computer lol.... so let's continue:

no. 3: check that the sci lexer is in the correct location. you can also specify the full path to it when adding the component, read on the first post of this thread the parameter options and put the path to the library there. then msgbox % sci.hwnd and let's hope you get a handle lol.

no. 9: put inside the notify function msgbox % obj.scnCode " " SCN_CHARADDED
AutoHotkey Toolkit [Main Project]
Scintilla Wrapper
LexAHKL

hoppfrosch
  • Members
  • 399 posts
  • Last active: Feb 26 2016 05:31 AM
  • Joined: 25 Jan 2006

you sir have a very strange issue on that computer lol.... so let's continue:

Looks like a very strange problem (or user ;-))

no. 3: check that the sci lexer is in the correct location. you can also specify the full path to it when adding the component, read on the first post of this thread the parameter options and put the path to the library there. then msgbox % sci.hwnd and let's hope you get a handle lol.

Putting the fully qualified scintilla.dll path into sci.Add(...) shows the same result: it does not work ...

no. 9: put inside the notify function msgbox % obj.scnCode " " SCN_CHARADDED

It's not so easy ;-) - the MsgBox permanently (even if I'm not typing) pops up showing "311210 2001", therefore I cannot type anything into scintilla component ... so I replaced with OutputDebug. The result is: I ALWAYS get "311210 2001" - no matter what I'm typing in SCINTILLA-Control ....

BTW: Using AHK x32 on my machine everything works as expected ....

RaptorX
  • Members
  • 751 posts
  • Last active: Feb 19 2015 02:47 AM
  • Joined: 19 Feb 2010
well it seems like #9 is solvable, i now know where to look for that pesky bug.
#3 on the other hand is one of those that i don't get at all... before i continue checking on that one please update to latest wrapper code v1.4.2.3, i did some changes yesterday that might be of help catching #3
AutoHotkey Toolkit [Main Project]
Scintilla Wrapper
LexAHKL

hoppfrosch
  • Members
  • 399 posts
  • Last active: Feb 26 2016 05:31 AM
  • Joined: 25 Jan 2006
I already made my tests with latest version from GITHUB (pulled latest changes before started testing) ....

Sounds good - at least for #9 ...

RaptorX
  • Members
  • 751 posts
  • Last active: Feb 19 2015 02:47 AM
  • Joined: 19 Feb 2010

I already made my tests with latest version from GITHUB (pulled latest changes before started testing) ....

Sounds good - at least for #9 ...


quick question, are you double clicking on the example files or are you using SciTe for running them?
I would like you to try double clicking them if you aren't (running scripts from SciTe might change their working dir)

for #3 can you try this? sci.Add(hwndtab, x, 25, w, h) ; no path to dll... this is how the others examples are set
AutoHotkey Toolkit [Main Project]
Scintilla Wrapper
LexAHKL

hoppfrosch
  • Members
  • 399 posts
  • Last active: Feb 26 2016 05:31 AM
  • Joined: 25 Jan 2006

quick question, are you double clicking on the example files or are you using SciTe for running them?

Yes - I started by double-clicking ...

for #3 can you try this? sci.Add(hwndtab, x, 25, w, h) ; no path to dll... this is how the others examples are set

Yeah - you hit it! Removing the path to scilexer completely makes the example run.

Therefore I did some further investigations on scilexer.dll:

[*:2kyr6nsg] Scilexer.dll 3.2.2 (filesize: 373248Byte - Delivered with your Scintilla Wrapper package) - Example 3 not working
[*:2kyr6nsg] Scilexer.dll 3.2.3 (filesize: 656896Byte - taken von <!-- m -->http://www.scintilla...TEDownload.html<!-- m --> - just downloaded) - Example 3 not working
[*:2kyr6nsg] Scilexer.dll 3.2.1 (filesize: 1474272Byte - was already on my disk) - Example 3 working
[*:2kyr6nsg] Scilexer.dll 3.1.0 (filesize: 648704Byte - was already on my disk) - Example 3 working
Example 9 does not run with any of the dlls

I wonder why the sizes of the dll's are so different?

RaptorX
  • Members
  • 751 posts
  • Last active: Feb 19 2015 02:47 AM
  • Joined: 19 Feb 2010
My sciLexer is way smaller because I stripped all the other Lexers that are not needed. It only has the Autohotkey lexer plus the C++ and HTML lexers (i left those for testing other things).

Now the question is, why if you assign the path the script cant load the dll anymore on x64... weird.

#9 Wont run until i push the new changes which hopefully will fix that... hopefully...

I want you to do one last thing with #3 please...

; put this on the top of the script:

msgbox % a_scriptdir "\SciLexer.dll" ; verify that this is where the dll is located... if it gives you a different path then thats why it was not working.

AutoHotkey Toolkit [Main Project]
Scintilla Wrapper
LexAHKL

RaptorX
  • Members
  • 751 posts
  • Last active: Feb 19 2015 02:47 AM
  • Joined: 19 Feb 2010
Try example #9 with this new version of the wrapper please.

Scintilla Wrapper v1.4.2.4
Date: Tue Oct 23 18:10:38 2012 +0200


Changes:

! Fix Ptr in x64 bit systems

Todo:

+ Add support for messages that use structures
+ Add Documentation


AutoHotkey Toolkit [Main Project]
Scintilla Wrapper
LexAHKL