Page 1 of 1
Blank line
Posted: Sun Feb 22, 2004 1:03 pm
by koolkid
hi
i'd like to know if there is any tool or macro that lets me write my java code with one blank line between every code line
f.i.:
class A {
int i = 1;
String st = "";
}
thanks
Posted: Sun Feb 22, 2004 1:28 pm
by s_reynisson
Take a look at TP's help file under "How to Double Space Lines".
If you do decide to record the steps there into a macro you can then assign it a
keyboard shortcut under Configure->Preferences->Keyboard, Categories(Macros).
HTH
Posted: Sun Feb 22, 2004 2:16 pm
by koolkid
thanks for answering; but if i understood you correctly, i've to do it every time i'm writing a file; isnt there a way to have it all the time?
thanks again
EDIT
the ideal would be: when i click enter, then 2 lines are added!
Posted: Sun Feb 22, 2004 4:55 pm
by s_reynisson
Just created a macro with Enter-Enter in it, but TP does not allow me to assign
the keyboard shortcut Enter to it, Ctrl-Enter is ok but I guess you might just
as well press enter-enter manually instead
Perhaps this is an IDE or a word processing feature?
Anyone else care to take a stab a this?
Posted: Mon Feb 23, 2004 4:50 am
by CyberSlug
The scripting language
AutoIt can let you simulate two Enter keypresses.
AutoIt's Support Forum link
Code: Select all
; AutoIt 3.0.100 Script
; When run, the Enter key in TextPad inserts two lines.
; Script automatically terminates when TextPad is closed.
;
Opt("TrayIconHide", 0) ;0=show, 1=hide
HotKeySet("{Enter}", "DoubleSpace")
While WinExists("TextPad")
sleep(100)
WEnd
Exit
Func DoubleSpace()
HotKeySet("{Enter}") ;unregister hotkey to avoid infinite loop!
Send("{Enter}")
If WinActive("TextPad") Then ;then send Enter again
Send("{Enter}")
EndIf
HotKeySet("{Enter}", "DoubleSpace") ;re-register hotkey
EndFunc
Posted: Mon Feb 23, 2004 9:51 am
by MudGuard
Do you really need the blank lines within the file?
Or do you need them "only" when you print the file?
If so, go to Configure - Preferences - Document Classes - <your document class> - Printing.
Check "Double Space".
Posted: Mon Feb 23, 2004 11:19 am
by koolkid
yes: to write i'd like 2 lines
Posted: Mon Feb 23, 2004 11:33 am
by koolkid
CyberSlug:
tx for the code.
i downloaded the autoit, read the help but i'm still stuck with it.
some Qs:
what's the extention of your script?
how do i run it?
how do i add it to textpad?
thanks a lot
Posted: Mon Feb 23, 2004 11:56 am
by koolkid
i guess i got it running, but when autoit sees a "()" gives an error, saying cant parse the file!
can you hlp pls?
Posted: Mon Feb 23, 2004 9:50 pm
by CyberSlug
koolkid wrote:i guess i got it running, but when autoit sees a "()" gives an error, saying cant parse the file!
can you hlp pls?
1) Make sure you have the
lastest AutoIt version
2) Copy the code exactly and save it with the file extension
.au3
3) Make sure TextPad is running
4) Double click the .au3 file, and it should run without errors.
5) To end the script, either close TextPad; or right click the tray icon that looks like the letter A.
Email me if you need more help: philipgump AT yahoo DOT com
Posted: Tue Feb 24, 2004 2:37 pm
by koolkid
hi
just to say congrats to whom made all this possible
Great!
thanks
Posted: Tue Feb 24, 2004 4:05 pm
by Bob Hansen
Okay
CyberSlug....you've finally done it. 8)

After seeing all of your AutoIt solutions, I finally bit the bullet, downloaded latest version, and registered with forum.
Now I only have to force myself to make some time to learn this.
Thanks for the incentive. See you at hiddensoft.
