AkelPad Forum Index AkelPad
Support forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to start AkelPAD always single open file mode from cmd

 
Post new topic   Reply to topic    AkelPad Forum Index -> Discussion (English)
View previous topic :: View next topic  
Author Message
HonestQiao



Joined: 01 Dec 2011
Posts: 3

PostPosted: Thu Dec 01, 2011 2:34 pm    Post subject: How to start AkelPAD always single open file mode from cmd Reply with quote

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
View user's profile Send private message
KDJ



Joined: 06 Mar 2010
Posts: 1358
Location: Poland

PostPosted: Thu Dec 01, 2011 5:37 pm    Post subject: Reply with quote

HonestQiao
Main menu -> Options -> Don't open a file twice.
Back to top
View user's profile Send private message
HonestQiao



Joined: 01 Dec 2011
Posts: 3

PostPosted: Fri Dec 02, 2011 3:26 am    Post subject: Reply with quote

But I want open akelpad from command line ,and set single open file on.
Back to top
View user's profile Send private message
KDJ



Joined: 06 Mar 2010
Posts: 1358
Location: Poland

PostPosted: Fri Dec 02, 2011 7:32 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AkelPad Forum Index -> Discussion (English) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


SourceForge.net Logo Powered by phpBB © 2001, 2005 phpBB Group