hotkey for text margins etc -- a "writer's script"

English main discussion
  • Author
  • Message
Offline
Posts: 19
Joined: Tue Apr 19, 2011 12:50 pm

hotkey for text margins etc -- a "writer's script"

Post by martz »

Howdy,
I love using AkelPad for "regular writing". Recently it popped into my mind that in full-screen mode it could easily be turned into an exellent "distraction-free" writing environment. (in the spirit of Writemonkey, Darkroom, Q10 etc).

For implementing this more comfortably, all I need is:

1. First and foremost, a hotkey for setting both left and right text margins to a certain level (that would give me a text pane nicely centered on the screen). Can this somehow be done?

2. A hotkey for changing color schemes (switching between a "lighter" and "darker" full-screen theme).

3. Possibly a script+hotkey for a *random* color scheme. (This is not as important, though.)

4. A script+hotkey for hiding the right scroll-bar (again, this is more a "secondary" need).

Knowing very well that a "essay/article/prose/etc writing environment" is not what AP developers are aiming at, I'd really appreciate any help. Plus -- thinking a bit further for the sake of us non-coders -- maybe all these four tricks could be bound into one "Writer's script"?

Thanks,
plus, many more thanks for such an excellent editor!

Offline
Posts: 19
Joined: Tue Apr 19, 2011 12:50 pm

Post by martz »

Okay,

As a workaround, I created a new AkelPad folder with a separate .ini file. Not as elegant -- but allows to have a separate AP instance with very wide margins.

Now, some questions:

* Is it possible to open AP in full-screen mode? Closing the application in full-screen (using Esc) doesn't seem to save the screen settings.
* And is it yet somehow possible to remove the right scrollbar?

Thanks for any comments,
M.

Offline
Posts: 2247
Joined: Tue Aug 07, 2007 2:03 pm
Location: Vinnitsa, Ukraine

Post by FeyFre »

1. First and foremost, a hotkey for setting both left and right text margins to a
HotKey Plugin+Scripts plugin + SetMargins.js
Is it possible to open AP in full-screen mode? Closing the application in full-screen (using Esc) doesn't seem to save the screen settings.
FullScreen plugin setup up to autoload(set check in Plugin dialog).
* And is it yet somehow possible to remove the right scrollbar?
It is possible with Scripts plugin, but it more difficult than other requests, so you should wait until someone will have time to help you.

KDJ
Offline
Posts: 1949
Joined: Sat Mar 06, 2010 7:40 pm
Location: Poland

Post by KDJ »

martz wrote:Is it possible to open AP in full-screen mode?
Yes, you can do this by manually changing one parameter in AkelPad.ini file.
You assign to the parameter CmdLineBegin value /Call("FullScreen::Main"), i.e.:
CmdLineBegin=/Call("FullScreen::Main")
After this AkelPad always runs in fullscreen mode.

Offline
Posts: 2247
Joined: Tue Aug 07, 2007 2:03 pm
Location: Vinnitsa, Ukraine

Post by FeyFre »

KDJ
It is too complex(but was my first ideat too), plugin can be autostarted from plugins dialog - a lot easier.

KDJ
Offline
Posts: 1949
Joined: Sat Mar 06, 2010 7:40 pm
Location: Poland

Post by KDJ »

FeyFre wrote:FullScreen plugin setup up to autoload(set check in Plugin dialog).
Autoload does not work for FullScreen plugin.

Offline
Posts: 19
Joined: Tue Apr 19, 2011 12:50 pm

Post by martz »

KDJ wrote:
martz wrote:Is it possible to open AP in full-screen mode?
Yes, you can do this by manually changing one parameter in AkelPad.ini file.
You assign to the parameter CmdLineBegin value /Call("FullScreen::Main"), i.e.:
CmdLineBegin=/Call("FullScreen::Main")
After this AkelPad always runs in fullscreen mode.
Awesome, works nicely (and so does the margins-script). Thanks!

I really don't want to bother you guys too much but only theoretically -- would it also be possible to add a top/bottom margin in full screen mode?

Plus, what about the random color scheme generator/switcher?

However, as already said, these plus the scrollbar thing are secondary needs; though maybe useful/interesting for somebody else too. But I'm already really pleased with the current "writing setup".

Thanks a bunch for giving me a hand so quickly,
Cheers,
M.

Offline
Posts: 767
Joined: Mon Sep 28, 2009 10:03 am
Location: Minsk, Belarus

Post by se7h »

Plus, what about the random color scheme generator/switcher?
This can be done with a script, assign it to a hotkey and enjoy!

KDJ
Offline
Posts: 1949
Joined: Sat Mar 06, 2010 7:40 pm
Location: Poland

Post by KDJ »

martz wrote:* And is it yet somehow possible to remove the right scrollbar?
Try this script: ShowScrollBar.js

Offline
Posts: 19
Joined: Tue Apr 19, 2011 12:50 pm

Post by martz »

KDJ
Brilliant. Thank you!

However, one more tweak that popped into my mind: when using a dark background color in full screen mode, I can see a very thin white/gray border around the screen. Can this be removed too? Or is it a Windows native thing?

It's not much of a "problem" though; just a slight inconvenience for the eyes. Maybe this'd be a useful tweak for everybody here that love using full screen mode.

and se7h
Hmm. Somehow I can't get it working. I changed the color schemes to the ones I'm using but it didn't help. Anyway, thank you!

BTW, instead of choosing between previously saved *schemes*, couldn't there be a script that generates *random colors*? In other words, something that gives me a bunch of new colors simply "out of the blue"?

(Okay, I guess I really should learn some scripting myself.)

Offline
Posts: 19
Joined: Tue Apr 19, 2011 12:50 pm

Post by martz »

One more thing which I'm not sure about: how could I launch multiple scripts with a single hotkey? (That way I could assign the full screen + scrollbar off + wide margins + maybe even a certain color scheme all to one "writing" keystroke :))

Or -- is it possible to launch AkelPad with a custom .ini file? (Ie a command line swich would show that I'm currently not using the default settings.)

I couldn't find these answers from the (absolutely amazing!) help files.

Thanks again,
M.

KDJ
Offline
Posts: 1949
Joined: Sat Mar 06, 2010 7:40 pm
Location: Poland

Post by KDJ »

martz wrote:However, one more tweak that popped into my mind: when using a dark background color in full screen mode, I can see a very thin white/gray border around the screen. Can this be removed too? Or is it a Windows native thing?

It's not much of a "problem" though; just a slight inconvenience for the eyes. Maybe this'd be a useful tweak for everybody here that love using full screen mode.
In AkelPad.ini You can assign to the parameter PaintOptions value 1024:
PaintOptions=1024
About this read in AkelHelp-Eng.htm.

Offline
Posts: 19
Joined: Tue Apr 19, 2011 12:50 pm

Post by martz »

KDJ wrote: In AkelPad.ini You can assign to the parameter PaintOptions value 1024:
PaintOptions=1024
About this read in AkelHelp-Eng.htm.
Ask, and it's given. :)
Together with the scrollbars turned off at startup, this is perfect. Thanks again!

I already asked this, but would it be possible to also add a top and bottom margin in full screen mode? (If it's too annoying, never mind, you guys have helped me a lot already.)

Offline
Posts: 767
Joined: Mon Sep 28, 2009 10:03 am
Location: Minsk, Belarus

Post by se7h »

martz

This script only toggles the existing schemes in random order

Usage: script is assigned to a hotkey for that then call when you want or you can make a menu/toolbar item and click it

It's not generator of new color schemes

Offline
Posts: 19
Joined: Tue Apr 19, 2011 12:50 pm

Post by martz »

se7h wrote:martz

This script only toggles the existing schemes in random order

Usage: script is assigned to a hotkey for that then call when you want or you can make a menu/toolbar item and click it
That's odd, but it doesn't work for me. I changed the theme names to the ones I'm using, assigned it to a hotkey [ Call("Scripts::Main", 1, "RandomCTheme.js") ]. But nothing.
Post Reply