Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$SEL & $CLIP macroses do not work #52

Closed
Lichtenshtein opened this issue Aug 31, 2023 · 8 comments
Closed

$SEL & $CLIP macroses do not work #52

Lichtenshtein opened this issue Aug 31, 2023 · 8 comments
Assignees

Comments

@Lichtenshtein
Copy link

It is impossible to perform operations with the selected text and the text from the clipboard. Most likely, as a result of this, plugins like addQuotation.dll also do not work.

Charu 3.8.3

@itagagaki
Copy link
Owner

itagagaki commented Aug 31, 2023

For the point where $SEL is always empty, it would be a duplicate of #47.

@Lichtenshtein
Copy link
Author

Most of my macroses broke because of this change and don't work (BB-Code, HTML, Markdown, youtube-dl, advanced text operations). The remaining ones are tied to AHK and still work. I hope the problem is fixable, as for me Charu means more to me than just a clipboard extender.

@itagagaki
Copy link
Owner

I have re-enabled the function to get selected text.
Could you please test today's build attached?

Charu3_20230908.zip

@itagagaki itagagaki self-assigned this Sep 8, 2023
@Lichtenshtein
Copy link
Author

I have re-enabled the function to get selected text. Could you please test today's build attached?

Charu3_20230908.zip

I'm very sorry for very late answer. I will test it right now.

@Lichtenshtein
Copy link
Author

Lichtenshtein commented Sep 18, 2023

First of all, as far as i remember, the original Charu package included a data tree example file with a mini tutorial and some examples of using macros and plugins. Do you have it? I think it would be good to add it to your fork, it would be convenient for new users who are not familiar with Charu.


The macro for operations with the selected text $SEL sometimes does not work. It works in 90% of cases. Perhaps it was the same in the original Charu, I just rarely paid attention to it. For example, in operations similar to framing the selected text (in this case BB-Code):

<charuMACRO>[code]$SEL[/code]</charuMACRO>

In case of failure, Charu simply cuts and pastes the selected word again.

If i highlight a word, call the Charu popup window, and double-click on any old fragment from the History Folder, in some cases Charu cuts and pastes the highlighted word again, instead of pasting selected fragment from the history.

It seems to me that after you turn on $SEL again, Charu started working a little slower (like the original Charu)?


The plugins.

  • Plugin HostGet.dll, macro <charuMACRO>$SEL,$PLUG-IN<plugin\HostGet.dll,$SEL>$PLUG-IN</charuMACRO> - returns "not found!". Perhaps it is outdated.

  • Plugin addBR.dll, macro <charuMACRO>$PLUG-IN<plugin\addBR.dll,$SEL>$PLUG-IN</charuMACRO> - it doesn't seem to me like it's doing anything. Maybe it's not working.

  • Plugin input.dll - seems to be working fine.

  • Plugin seline.dll - seems to be working fine.

  • Plugin addQuotation.dll - seems to be working fine.

  • Plugin convText.dll. Almost all macros from the examples folder cause Charu to crash. For example:

    • Small letter->Capital letter -
      <charuMACRO>$PLUG-IN<.\plugin\convText.dll,141,$SEL>$PLUG-IN</charuMACRO> - Charu immediately crashes.
    • Decode Base64 - <charuMACRO>$PLUG-IN<.\plugin\convText.dll,414,$SEL>$PLUG-IN</charuMACRO> - Charu crashes.
    • space4→tab - <charuMACRO>$PLUG-IN<.\plugin\convText.dll,172,$SEL>$PLUG-IN</charuMACRO> - Charu crashes.
  • Plugin countText.dll (character counter) - <charuMACRO>$SEL</charuMACRO><charuMACRO>$PLUG-IN<.\plugin\countText.dll,$SEL>$PLUG-IN</charuMACRO> - it seems to work. Since it depends on the $SEL macro, it doesn't always trigger.

  • Plugin LineNumberInsert.dll (line numbering) - seems to work fine. Depends on the $SEL macro, doesn't always trigger.

  • Plugin LineMod.dll. Unfortunately, only in Japanese, I'm not sure what it does. Example: <charuMACRO>$PLUG-IN<.\plugin\LineMod.dll,0,,,,,,\,,1,1,2,0,0,1,$SEL>$PLUG-IN</charuMACRO> - periodically does not work because it depends on the $SEL macro.


I have also noticed strange behavior in Charu for quite some time. I will try to describe it.

The pop-up window with data tree is assigned to the Alt+c keys. Inside the data tree, i created a folder called "Samples". I press Edit -> Optional Properties -> Hotkey to Popup. I set HotKey=Alt+q for quick opening of the folder using these key combinations.

In my system, there are 2 main languages that I switch between: English (ENG) and Russian (RUS).

If i launch Charu.exe when the input language in the system is currently set to Russian (RUS), the Alt+q combination does not work in Charu. Nothing is happening when i press it.

If i launch Charu.exe when the input language is set to English (ENG), the Alt+q combination works in Charu and the Samples folder in the data tree opens. This behavior is present in the original Charu as well.

@itagagaki
Copy link
Owner

Let's resolve each one in turn.

Charu package included a data tree example file with a mini tutorial and some examples of using macros and plugins

I will think about examples and tutorials, but I welcome your contributions. Right now I'm doing my best to improve the Wiki .

In case of failure, Charu simply cuts and pastes the selected word again.

Try to increse "Copy Delay" value in Key Event tab of Settings.
Then it will be slower but more reliable.

It seems to me that after you turn on $SEL again, Charu started working a little slower (like the original Charu)?

Probably yes. There are two reasons for the slowdown: the first is the delay mentioned above. The second is that the original always slows down because it works by copying the selection from the target window, regardless of whether the text to be pasted contains $SEL or not. The delay is necessary, but I have made an improvement to omit this process if there is no need to get $SEL. Please try the attached binary.

Charu3_20230914.zip

set to Russian (RUS), the Alt+q combination does not work

I have a feeling that the hotkeys are eaten by some other preferred process. Could you please use the following tool to check which application is registering Alt + Q?

Hotkey Screener - Free Tool to Enumerate Hotkeys and Detect Apps which Use Them - NTWind Software

@Lichtenshtein
Copy link
Author

I will think about examples and tutorials, but I welcome your contributions. Right now I'm doing my best to improve the Wiki

Very nice.

Here is a compressed folder with a portable version of Charu. In the Docs folder, there are some chapters from the old documentation and FAQ that i had (in Japanese and English) from http://keiziweb.age.jp/ (not opening anymore). Also, there is Charu3.c3d - a data tree file that i compiled with a brief original practical manual and examples of using macros and plugins. I added a few templates for Markdown, BB-Code, HTML, Youtube-dl, and text processing using Charu's capabilities.

Try to increse "Copy Delay" value in Key Event tab of Settings.
Then it will be slower but more reliable.

I think you're right, that helped. By default, the value was set extremely low, only 10. Usually, i set the delay to 100 or higher.

Please try the attached binary.

Feels better. (͡ ° ͜ʖ ͡ °)

Could you please use the following tool to check which application is registering Alt + Q?

Thank you. If i switch to (RUS) and launch Charu.exe i see no Alt + Q in the list at all.

Alt + Unknown (0xFF) Charu3.exe (PID: 9264)
Alt + C Charu3.exe (PID: 9264)

If i switch to (ENG) and launch Charu.exe i see Alt + Q in the list.

Alt + Q Charu3.exe (PID: 11576)

@itagagaki
Copy link
Owner

I was able to reproduce the problem in Russian. This topic is branched into a new issue #56 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants