jEdit Community - Resources for users of the jEdit Text Editor
Need Help for my first Macro!
Submitted by alcymart on Thursday, 23 May, 2013 - 02:35
Hello Everyone, I need a very basic macro to get me going in the correct direction. Doing this manually would take me years. I presently know nothing at all about coding with Beanshell except for a few basics. Not enough to write even 1 line of code. Would someone Can someone kind enough write me this small macro. I learn better from example than reading a bunch of tuts. Honestly, I don't even know what to write as the first line of code even if I read all the tutorials as I didn't finish high school.

I kindly ask if anyone here can write the following script which I will explain now:

Lets say I inputed that the highnumber=49 for the sequence of numbers below:

03,15,24,36,38,41

The script must look at the numbers above and translate the line to the
format below with high number being 49 and replace it into this format below
which are all the numbers that aren't in the sequence from 1 to 49 all on 1
line in jedit:

01 02 04 05 06 07 08 09 10 11 12 13 14 16 17 18 19 20 21 22 23 25
26 27 28 29 30 31 32 33 34 35 37 39 40 42 43 44 45 46 47 48 49

If I input the high number of 10 for an easier combo below:

03,05,07

It would return 7 nunbers below which are not in the sequence:

01,02,04,06,08,09,10

the script must thereafter do the next sequence of combinations etc, as there are thousands of lottery draws. Yes its to edit Lotto numbers. It must basically loop until it reaches the last sequence of numbers.

With this sample script I could learn from example and use this script as a foundation for other scripts as the
scripts I need all have to do with editing numbers as above.

Thank you in advance to the kind person who will do this for me...you shall be rewarded accordingly...
User login
Browse archives
« January 2018  
MoTuWeThFrSaSu
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
 
Poll
Are you interested in language packs for jEdit?
Yes, and I could help maintain translations
26%
Yes, I'd like to have translations
33%
Indifferent
35%
No, that'd be bad (please comment)
7%
Total votes: 1092
Syndication
file   ver   dls
German Localization light   4.4.2.1   50949
Context Free Art (*.cfdg)   0.31   41172
JBuilder scheme   .001   17000
BBEdit scheme   1.0   16600
ColdFusion scheme   1.0   16584
R Edit Mode - extensive version   0.1   14867
Advanced HTML edit mode   1.0   14045
Matlab Edit Mode   1.0   13983
jEdit XP icons   1.0   13415
XP icons for jEdit   1.1   12438