itagagaki/charu3-SE

Plugin support

Opened this issue ยท 11 comments

The plugin support mechanism of Charu3 is inherited and can be used as is.
However, it would be better to provide a more sophisticated interface.
Also, the Charu3 sample plugin has some bugs, so it would be better to provide a fixed version, but there may not be a demand for it.

Related discussion #36

For now, let's see if the following plugins included in the Charu3.7 release package will work.

  • addBr
  • addQuotation --> It is difficult to understand its purpose, but it works.
  • convText --> Doesn't work. Cannot rebuild due to missing source code.
  • countText
  • HostGet
  • input
  • mixialbum --> Usage unknown. No source code or documentation.
  • seline --> Hard to understand how to use it due to dirty source code.

I will write here so that it is not lost. Charu crashes when using any of convText.dll plugin functions.

Charu crashes when using any of convText.dll plugin functions.

Did it work with the original Charu?

The plugin works in the original Charu.

You can check these commands in both versions:

small letter -> capital letter
<charuMACRO>$PLUG-IN<.\plugin\convText.dll,142,$SEL>$PLUG-IN</charuMACRO>

cut empty line
<charuMACRO>$PLUG-IN<.\plugin\convText.dll,211,$SEL>$PLUG-IN</charuMACRO>

The problem occurs in the DLL. It seems to fail to create a temporary file. But looking at the source code of the DLL in the original repository, I'm not sure why it fails, I should need to add a build of the DLL to my Visual Studio solution to debug it. I think it is not impossible that the DLL could work just by building it in the current development environment.

Well, I'll give it a try.

@Lichtenshtein And I am sorry that this is not related to this issue, but I am asking you in the Discussions (#8 ) because some of your suggestions are not clear for me. I would appreciate it if you could read and respond when you have time.

I apologize, i am used to completely ignoring visual notifications. I have responded to you in the discussions.

I found that it is impossible to build convText.dll.
convText,cpp has #include "..\PsTxCvtL115\PsTxCvtL.h" but the file is not found, and a function Pfc_TxCvt is not defined.
I will ask Matsumoto-san.

No response from Matsumoto-san.

It's damn sad. I hope the source code is not lost.

I could share my own Charu build on ahk scripts from Krot66 and mine. They do the same thing as the plugin. But it is, just pampering adding delays. Native features are better.

I tried other Charu3.7 plugin DLLs and most of them worked as they were, except convText.DLL.

When passing data "abcd" to convText.DLL, an access violation occurred while writing to address 0x64636261 in this DLL. It can be concluded that the data "abcd" was mistakenly read as a 32-bit pointer and some data was written using this pointer. This is the fault of the DLL. Why it works on Charu3.7 is a mystery. I could not find anything in the existing source code that would cause this behavior. Maybe convText.DLL was built from a different source than the existing one.

In any case, convText.DLL is broken. As I said, the source code is incomplete and cannot be built, and I found another bug in the existing part. So the existing code is unusable. If the functionality provided by this DLL is desired, it must be recreated from scratch.

Apparently this DLL should provide multiple functions, what is needed?

123

Does this mean that the plugin has 416+ functions? I can't even imagine what else it can do besides small number of commands that I have. Some functions seem quite useful. It is difficult to understand what they are doing according to the description because of the crooked translation into English.

Most of all I used the functions of changing the case of the selected text.

IN UPPERCASE
in lowercase

I don't remember if it was originally, but you can add

First Capital Letters
cASE INVERSION
All letters. As in the sentence.

Encode/Decode Base64 can be useful. I have not used programming-related functions.

Something else that I use, unrelated to the plugin, but related to text processing. Most of them are based on autohotkey.

1234