View previous topic :: View next topic |
Author |
Message |
HonestQiao
Joined: 01 Dec 2011 Posts: 3
|
Posted: Thu Dec 01, 2011 2:34 pm Post subject: How to start AkelPAD always single open file mode from cmd |
|
|
If we open akelpad from command line ,we can use param "/Command(4255)" to set single open file mode.
But it's toggle for single open file.
How to set single open file on always? |
|
Back to top |
|
 |
KDJ
Joined: 06 Mar 2010 Posts: 1929 Location: Poland
|
Posted: Thu Dec 01, 2011 5:37 pm Post subject: |
|
|
HonestQiao
Main menu -> Options -> Don't open a file twice. |
|
Back to top |
|
 |
HonestQiao
Joined: 01 Dec 2011 Posts: 3
|
Posted: Fri Dec 02, 2011 3:26 am Post subject: |
|
|
But I want open akelpad from command line ,and set single open file on. |
|
Back to top |
|
 |
KDJ
Joined: 06 Mar 2010 Posts: 1929 Location: Poland
|
Posted: Fri Dec 02, 2011 7:32 pm Post subject: |
|
|
HonestQiao
You can use the script SingleOpenFileSetOn.js:
Code: | var hMenuMain = AkelPad.SendMessage(AkelPad.GetMainWnd(), 1222 /*AKD_GETMAININFO*/, 21 /*MI_MENUMAIN*/, 0);
var nOptionState = AkelPad.SystemFunction().Call("user32::GetMenuState", hMenuMain, 4255 /*IDM_OPTIONS_SINGLEOPEN_FILE*/, 0 /*MF_BYCOMMAND*/);
if (! (nOptionState & 0x8 /*MF_CHECKED*/))
AkelPad.Command(4255 /*IDM_OPTIONS_SINGLEOPEN_FILE*/); |
in command line:
Code: | AkelPad.exe /Call("Scripts::Main", 2, "SingleOpenFileSetOn.js") |
|
|
Back to top |
|
 |
|