Assigning Hotkeys to Macros

English main discussion
Post Reply
  • Author
  • Message
Offline
Posts: 23
Joined: Sun Nov 13, 2011 5:40 pm

Assigning Hotkeys to Macros

Post by foliator »

I'm not sure whether the following is a fault of the hotkeys plugin or the macro plugin:

I can create and run my macros successfully, but quite often the hotkey I've assigned to a macro will stop working. The macro itself, however, can still be run through the macro menu. If I restart AkelPad, the assigned macro hotkeys are back in action, but only for a little while.

For example, I've recorded a macro that will save the current document and close it. This I've assigned to Alt+0. When I start AkelPad, the first file I open and modify can be saved and closed with Alt+0, but if I modify another document during the same session, Alt+0 no longer invokes the macro, and I have to use the macro menu to run it. The same behavior affects my other macros, too.

Does anyone else have this problem?

Offline
Site Admin
Posts: 6311
Joined: Thu Jul 06, 2006 7:20 am

Post by Instructor »

foliator
Is not reproduced. Can you upload or send to email your AkelPad folder?

Offline
Posts: 23
Joined: Sun Nov 13, 2011 5:40 pm

Post by foliator »

Instructor wrote:foliator
Is not reproduced. Can you upload or send to email your AkelPad folder?
OK, I've now e-mailed you the relevant files for my hotkeys and macros, but not the whole AkelPad folder.

(In my original post I should have mentioned that I'm using AkelPad v. 4.71 x86 with updated plugins on Windows 7.)

Offline
Posts: 147
Joined: Fri Feb 08, 2008 6:41 pm
Location: British Columbia, Canada

Post by Surveyor »

I think that the Macros plugin must be running in order to recognize the hotkeys assigned to various macros. Make sure that the autoload checkbox for "Macros::Main" is checked. That way, every time you start AkelPad, the Macros plugins is loaded and running - hotkeys should be recognized unless they are over-written by another plugin or Windows function.

Offline
Posts: 23
Joined: Sun Nov 13, 2011 5:40 pm

Post by foliator »

Surveyor wrote:I think that the Macros plugin must be running in order to recognize the hotkeys assigned to various macros. Make sure that the autoload checkbox for "Macros::Main" is checked. That way, every time you start AkelPad, the Macros plugins is loaded and running - hotkeys should be recognized unless they are over-written by another plugin or Windows function.
Yes, that certainly makes sense, but I've had the macros plugin set to autoload ever since I started using AkelPad. Also, as I reported earlier, the macro & hotkey combinations work fine the first time I use them in each session, which makes it all the more mysterious. As for the hotkey plugin, that, of course, is autoloaded as well, or it wouldn't work at all.

Offline
Site Admin
Posts: 6311
Joined: Thu Jul 06, 2006 7:20 am

Post by Instructor »

foliator
I tryed "Save and Close.macro" with your Hotkeys.ini, Macros.ini and all worked fine.

I saw also second email, but It was deleted, suddenly :)

Offline
Posts: 23
Joined: Sun Nov 13, 2011 5:40 pm

Post by foliator »

Instructor wrote:foliator
I tryed "Save and Close.macro" with your Hotkeys.ini, Macros.ini and all worked fine.

I saw also second email, but It was deleted, suddenly :)
No problem. That was just one of the .macro files I forgot to attach to my first e-mail.

I'm beginning to think that something on my system (perhaps memory-related) is somehow disabling those macro hotkeys a little while after AkelPad has been launched. My other hotkeys (for internal commands, plugins, etc.) work perfectly 100% of the time, and the macros themselves always work if I run them from the macro dialogue.

For now I'll just live with it until I discover the cause -- probably by accident, as I'm not much of a hacker! ;)

Offline
Site Admin
Posts: 6311
Joined: Thu Jul 06, 2006 7:20 am

Post by Instructor »

foliator
Did you try to assign "Save and Close.macro" to other (without Alt) hotkey?

Offline
Posts: 23
Joined: Sun Nov 13, 2011 5:40 pm

Post by foliator »

Instructor wrote:foliator
Did you try to assign "Save and Close.macro" to other (without Alt) hotkey?
Yes, but with no change. Same with the other macros. Anyway, since it can't be reproduced on another computer, I wouldn't worry about it too much.

Actually, most of the time I only record macros because I'm too bloody lazy to repeat the keystrokes manually. :lol:

Offline
Posts: 147
Joined: Fri Feb 08, 2008 6:41 pm
Location: British Columbia, Canada

Post by Surveyor »

foliator,

Sorry to continue this thread here - it probably should be in the Macros Plugin area, but just a couple of (actually, three!) thoughts...

1) Have you downloaded the AkelUpdater tool? It greatly simplifies the process of updating AkelPad and Plugins - I have had some trouble in the past with mismatched plugin versions, although the versioning mechanism now should prevent that. I should also say that I once had a weird issue which was finally solved by nuking all of AkelPad's registry settings (providing you're not using portable mode) then letting AkelPad reconstruct them. I know it seems obvious, but if you haven't already tried it, try "turning off" all other plugins EXCEPT Macros - there could be an undiscovered interaction. I run Windows XP SP3, and (I'm afraid) a less-than-current version of AkelPad (4.6.5, Macros plugin = 4.3.0); I have never had the problem you describe.

2)
foliator wrote:I'm too bloody lazy to repeat the keystrokes manually
You might be in luck! I thought the Macros plugin was greatly under-rated, right from the start. There has been discussion on another thread, re: modifying, etc. macros once they are made. I am currently in the process of writing such a program (command-line exe) - as of today, it does a decompile to keystrokes and a debug listing generation, but the full decompile and compile (from a decompiled macro, or "source code") is in the future (month or two?). I will post it in the Macros forum when it does more. My plan is to have an enhanced "source language" which should make it a LOT easier to write macros. Alas, life (and Christmas) gets in the way of programming.

3) I see from your posts that you are in B.C.! I live on Vancouver Island (north Island) - where are you? We "British Columbians" (Columbites?) need to stick together to combat the Russian influence...

Offline
Posts: 23
Joined: Sun Nov 13, 2011 5:40 pm

Post by foliator »

Yes, I use the AkelUpdater, and it has been working very well here. All my plugins have been updated for my current version, 4.71, although I noticed the problem I described a couple of versions back.

I am using portable mode, so the only way I could simulate what you've done is to back up my AkelPad.ini, delete it temporarily, and let it be rebuilt from scratch. I haven't tried disabling the other plugins, but I suppose I'd have to leave the hotkeys one enabled, since this concerns hotkeys as well as macros.

As for a macro language, that would be a welcome addition, as I cut my teeth on macros when using PFE32 (Programmer's File Editor) under earlier versions of Windows, and the macro language there used commands that were nearly plain English.

I'm in BC's South Okanagan region. I don't think of myself as a BCer or British Columbian, actually. First and foremost I'm a Canadian, and since the last few elections I've tried to distance myself from politics altogether, just to keep a smile on my face, which is difficult enough these days for seniors like myself. :roll:

Offline
Posts: 147
Joined: Fri Feb 08, 2008 6:41 pm
Location: British Columbia, Canada

Post by Surveyor »

I may have found the problem (or at least another problem!). See my latest bug report here. (Oops, I see Instructor responded already - my plugin is out of date)

I like the Okanogan - I have a friend in Penticton and have fond memories from my youth (nearly 50 years ago!) of holidays there.
Post Reply