| View previous topic :: View next topic |
| Author |
Message |
Idjo
Joined: 06 May 2007 Posts: 21
|
Posted: Tue Jul 31, 2007 9:44 pm Post subject: Request: Numbering plugin |
|
|
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 |
|
 |
Fr0sT
Joined: 24 Jul 2007 Posts: 850
|
Posted: Wed Aug 01, 2007 6:13 am Post subject: |
|
|
| Maybe better to add this feature into Lines plugin? |
|
| Back to top |
|
 |
Idjo
Joined: 06 May 2007 Posts: 21
|
Posted: Wed Aug 01, 2007 6:34 am Post subject: |
|
|
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 |
|
 |
Fr0sT
Joined: 24 Jul 2007 Posts: 850
|
Posted: Thu Aug 02, 2007 6:44 am Post subject: |
|
|
| 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 |
|
 |
Idjo
Joined: 06 May 2007 Posts: 21
|
Posted: Thu Aug 02, 2007 7:24 am Post subject: |
|
|
| OK. But how do I save the current number untill the next call? The other parameter I can define as constants. |
|
| Back to top |
|
 |
Instructor Site Admin
Joined: 06 Jul 2006 Posts: 4650
|
|
| Back to top |
|
 |
Idjo
Joined: 06 May 2007 Posts: 21
|
Posted: Thu Aug 02, 2007 8:38 am Post subject: |
|
|
Thank you.
Is there a way to deal with files? I'm not familier with the object in JS. |
|
| Back to top |
|
 |
Instructor Site Admin
Joined: 06 Jul 2006 Posts: 4650
|
Posted: Thu Aug 02, 2007 9:29 am Post subject: |
|
|
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 |
|
 |
VladSh
Joined: 29 Nov 2006 Posts: 2510 Location: Киев, Русь
|
Posted: Thu Aug 02, 2007 12:21 pm Post subject: |
|
|
Расскажите пожалуйста что делает этот скрипт? Все что-то радуются, а я завидую белой завистью - что-то хорошее проходит мимо )) |
|
| Back to top |
|
 |
Instructor Site Admin
Joined: 06 Jul 2006 Posts: 4650
|
Posted: Thu Aug 02, 2007 12:28 pm Post subject: |
|
|
VladSh
| Idjo wrote: | | Code: | Things to buy:
Bread
Milk
Newspaper |
||
V
| Code: | Things to buy:
#1 Bread
#2 Milk
#3 Newspaper |
|
|
|
| Back to top |
|
 |
VladSh
Joined: 29 Nov 2006 Posts: 2510 Location: Киев, Русь
|
Posted: Thu Aug 02, 2007 1:15 pm Post subject: |
|
|
Я вижу смысл в нумерации:
| Code: | Things to buy:
1. Bread
2. Milk
3. Newspaper |
или так:
| Code: | Things to buy:
1). Bread
2). Milk
3). Newspaper |
А зачем решётка впереди? И зачем ограничение на макс. количество строк? Здесь явно какая-то хитрость задумана против русских людей!..
Немного уважения к создателю топика - пишем на его языке. (Instructor)
Sorry! I speak english very bad... (VladSh)
Last edited by VladSh on Thu Aug 02, 2007 1:43 pm; edited 1 time in total |
|
| Back to top |
|
 |
Idjo
Joined: 06 May 2007 Posts: 21
|
Posted: Thu Aug 02, 2007 1:29 pm Post subject: |
|
|
I don't know what you're saying but it was just an example. I don't need it for shoping lists .
There's a bug. Try assign the script with ctrl+something and it will do ctrl+home instead of home. |
|
| Back to top |
|
 |
Fr0sT
Joined: 24 Jul 2007 Posts: 850
|
Posted: Thu Aug 02, 2007 1:47 pm Post subject: |
|
|
| 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 |
|
 |
Instructor Site Admin
Joined: 06 Jul 2006 Posts: 4650
|
Posted: Thu Aug 02, 2007 1:50 pm Post subject: |
|
|
| 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 |
|
 |
Idjo
Joined: 06 May 2007 Posts: 21
|
Posted: Thu Aug 02, 2007 2:19 pm Post subject: |
|
|
OK, thanks.
Anyway I think this problem need to be fixed. |
|
| Back to top |
|
 |
|