Hello,
Is there a plugin or script or whatewer which adds ability to use keyboard shortcuts to define start and end of the selection?
To describe it in simple words I am looking for something like this:
1) use arrow keys to navigate where I'd like to start selecting the text.
2) press a hotkey which will store the caret position.
3) navigate to the position where I'd like to stop selecting the text.
4) press another hotkey which will store the caret position and examine whether start position is already stored If yes then it will select all the text between these 2 caret positions.
I am unable to find such functionality my-self so I have started doing a plugin but I am doing it the wrong way. I have exported 2 functions which store SelStart and SelEnd in a global variable. The problem is when akelpad calls function from a plugin and the function returs it unloads the dll and if the function is executed one more time or if another function is executed looking for something what the first function has stored inside a global variable it simply can't find it because dll has been reloaded and it's back to initial state. I am not very experienced programmer so perhaps this is completelly wrong way of doing this. Anyway I'd just like to show I am happy try doing things when I miss something. So even I might be able to learn something from you. Here is a skeleton of very simple plugin I am tallking about
Alternative method of selecting the text
- Author
- Message
-
Offline
- Posts: 57
- Joined: Sun Jul 27, 2008 6:47 am
- Location: slovakia
-
Offline
- Site Admin
- Posts: 6311
- Joined: Thu Jul 06, 2006 7:20 am
If you don't want to unload plugin:
Code: Select all
...
SelStart =-1;
SelEnd =-1;
}
pd->nUnload=UD_NONUNLOAD;
}
...
-
Offline
- Posts: 57
- Joined: Sun Jul 27, 2008 6:47 am
- Location: slovakia
-
Offline
- Site Admin
- Posts: 6311
- Joined: Thu Jul 06, 2006 7:20 am
-
Offline
- Posts: 57
- Joined: Sun Jul 27, 2008 6:47 am
- Location: slovakia
Sorry for another question related to coding plugins...
How can one get notified when text in a document changes and when caret position changes? I think I can just hook AEN_SELCHANGED and AEN_TEXTCHANGED messages. Anyway I am confused which window to subclass because these are AkelEdit control specific messages and at the other hand there is "Sends to the parent window procedure..." written in the description for each such notification. So which window are these messages sent to? is that or ?
Or is there a more universal way of getting such a notifications so I can make the plugin working even with AkelPad 3.6?
Edit: Ok perhaps I have figured something out my-self. Edit parent window is either main window or if MDI is active then it's the frame.
How can one get notified when text in a document changes and when caret position changes? I think I can just hook AEN_SELCHANGED and AEN_TEXTCHANGED messages. Anyway I am confused which window to subclass because these are AkelEdit control specific messages and at the other hand there is "Sends to the parent window procedure..." written in the description for each such notification. So which window are these messages sent to? is that
Code: Select all
pd->hMainWnd
Code: Select all
pd->hWndEdit
Or is there a more universal way of getting such a notifications so I can make the plugin working even with AkelPad 3.6?
Edit: Ok perhaps I have figured something out my-self. Edit parent window is either main window or if MDI is active then it's the frame.