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 

Request: Numbering plugin
Goto page 1, 2  Next
 
Post new topic   Reply to topic    AkelPad Forum Index -> Plugins
View previous topic :: View next topic  
Author Message
Idjo



Joined: 06 May 2007
Posts: 21

PostPosted: Tue Jul 31, 2007 9:44 pm    Post subject: Request: Numbering plugin Reply with quote

Can you please make a numbering plugin, that any time you submit it, it writes the next number?

For example I want to make a macro that works like this:
(Home, #, Call Plugin, Space, Down arrow)

And here's the result:
Code:
Things to buy:
Bread
Milk
Newspaper

||
V
Code:
Things to buy:
#1 Bread
#2 Milk
#3 Newspaper


I suggest parameters like:
current number (changes when using the plugin), maximum and minimum, difference size (can also be negative), number of duplicates.

Examples:
Code:
current=2, maximum=5, minimum=1, difference=1, number of duplicates=1.
2,3,4,5,1,2,3...

current=2, maximum=5, minimum=1, difference=-1, number of duplicates=2.
2,2,1,1,5,5,4,4...

current=3, maximum=5, minimum=1, difference=2, number of duplicates=1.
2,4,1,3,5...


And for display, parameter like:
minimum chars, filling char, right or left filling.

Examples
Code:
minimum=1
1,2,3,4...

minimum=2, char=0, left.
01,02,03...09,10,11...99,100...

minimum=3, char=space, right.
  1,  2,  3...  9, 10... 99,100


Thank you in advance.

P.S you can also add an option to choose the base (Decimal, Octal etc.).
Back to top
View user's profile Send private message
Fr0sT



Joined: 24 Jul 2007
Posts: 876

PostPosted: Wed Aug 01, 2007 6:13 am    Post subject: Reply with quote

Maybe better to add this feature into Lines plugin?
Back to top
View user's profile Send private message
Idjo



Joined: 06 May 2007
Posts: 21

PostPosted: Wed Aug 01, 2007 6:34 am    Post subject: Reply with quote

As a line feature it w'ont be enough dinamic.
What if I don't want it in the begining of a row? Or what if I don't want it in rows at all?
Back to top
View user's profile Send private message
Fr0sT



Joined: 24 Jul 2007
Posts: 876

PostPosted: Thu Aug 02, 2007 6:44 am    Post subject: Reply with quote

Maybe it's easier for you to take a look at the Scripts and implement every necessary functions by yourself. Imho, such feature won't be needed enough to compensate development costs.
Back to top
View user's profile Send private message
Idjo



Joined: 06 May 2007
Posts: 21

PostPosted: Thu Aug 02, 2007 7:24 am    Post subject: Reply with quote

OK. But how do I save the current number untill the next call? The other parameter I can define as constants.
Back to top
View user's profile Send private message
Instructor
Site Admin


Joined: 06 Jul 2006
Posts: 5293

PostPosted: Thu Aug 02, 2007 7:40 am    Post subject: Reply with quote

Idjo
http://akelpad.sourceforge.net/forum/viewtopic.php?p=1530#1530
Back to top
View user's profile Send private message Send e-mail
Idjo



Joined: 06 May 2007
Posts: 21

PostPosted: Thu Aug 02, 2007 8:38 am    Post subject: Reply with quote

Thank you.

Is there a way to deal with files? I'm not familier with the object in JS.
Back to top
View user's profile Send private message
Instructor
Site Admin


Joined: 06 Jul 2006
Posts: 5293

PostPosted: Thu Aug 02, 2007 9:29 am    Post subject: Reply with quote

Updated: NumberCount.js

1. Open documents in MDI mode in which you want to insert numbers.
2. Change "nLastNumber=0x7FFFFFFF" and "bAllDocuments=true"
3. Call NumberCount.js via AkelPad.
Back to top
View user's profile Send private message Send e-mail
VladSh



Joined: 29 Nov 2006
Posts: 2596
Location: Киев, Русь

PostPosted: Thu Aug 02, 2007 12:21 pm    Post subject: Reply with quote

Расскажите пожалуйста что делает этот скрипт? Все что-то радуются, а я завидую белой завистью - что-то хорошее проходит мимо Smile))
Back to top
View user's profile Send private message Visit poster's website
Instructor
Site Admin


Joined: 06 Jul 2006
Posts: 5293

PostPosted: Thu Aug 02, 2007 12:28 pm    Post subject: Reply with quote

VladSh
Idjo wrote:
Code:
Things to buy:
Bread
Milk
Newspaper

||
V
Code:
Things to buy:
#1 Bread
#2 Milk
#3 Newspaper
Back to top
View user's profile Send private message Send e-mail
VladSh



Joined: 29 Nov 2006
Posts: 2596
Location: Киев, Русь

PostPosted: Thu Aug 02, 2007 1:15 pm    Post subject: Reply with quote

Я вижу смысл в нумерации:

Code:
Things to buy:
1. Bread
2. Milk
3. Newspaper

или так:
Code:
Things to buy:
1). Bread
2). Milk
3). Newspaper

А зачем решётка впереди? И зачем ограничение на макс. количество строк? Здесь явно какая-то хитрость задумана против русских людей!.. Very Happy

Немного уважения к создателю топика - пишем на его языке. (Instructor)

Sorry! I speak english very bad... Rolling Eyes (VladSh)


Last edited by VladSh on Thu Aug 02, 2007 1:43 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
Idjo



Joined: 06 May 2007
Posts: 21

PostPosted: Thu Aug 02, 2007 1:29 pm    Post subject: Reply with quote

I don't know what you're saying but it was just an example. I don't need it for shoping lists Smile .

There's a bug. Try assign the script with ctrl+something and it will do ctrl+home instead of home.
Back to top
View user's profile Send private message
Fr0sT



Joined: 24 Jul 2007
Posts: 876

PostPosted: Thu Aug 02, 2007 1:47 pm    Post subject: Reply with quote

Don't know how to save current number between script calls (though it should be simple file I/O), but I suppose it's possible to enter needed value at script's start through Windows InputBox routine. As long as I know, system functions are supported by Scripts plugin?
Back to top
View user's profile Send private message
Instructor
Site Admin


Joined: 06 Jul 2006
Posts: 5293

PostPosted: Thu Aug 02, 2007 1:50 pm    Post subject: Reply with quote

Idjo wrote:
There's a bug. Try assign the script with ctrl+something and it will do ctrl+home instead of home.
This is because script don't check keyboard state. Use F1, F2...
Back to top
View user's profile Send private message Send e-mail
Idjo



Joined: 06 May 2007
Posts: 21

PostPosted: Thu Aug 02, 2007 2:19 pm    Post subject: Reply with quote

OK, thanks.
Anyway I think this problem need to be fixed.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AkelPad Forum Index -> Plugins All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
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