Sign in to follow this  
Followers 0
newbiescripter

Is it possible to remove empty lines automaticly?

9 posts in this topic

Hello my question is simple :D

Can you remove the blank lines in a script automaticly by using an option in AutoIt - Scite?

Run("Calc")

Sleep(3000)
                                                     ; <--- This is the blank line i mean :D
WinActivate("Calculator")

sleep(3000)

Send("5") 

Send("{+}")

Send("8")

Send("{=}")

When I make my script I usually makes these anoying blank lines but is it possible to remove them by automatic with Scite?

Regards

Share this post


Link to post
Share on other sites



I'm pretty sure Tidy will remove them.

SciTE > Tools > Tidy

Share this post


Link to post
Share on other sites

Unfortunaly it doesn't :/ It does only remove spaces..

Share this post


Link to post
Share on other sites

Hi.

Hello my question is simple :D

Can you remove the blank lines in a script automaticly by using an option in AutoIt - Scite?

Open SciTE.EXE, "?", SciTE Help.

Search the help file for "tidy"

You will find a section covering the settings that can be made in TIDY.INI.

It depends on the settings there how tidy.exe will handle empty lines:

<snip>
Remove_Empty_Lines=0
*** 1=Show Tidy Errors in Console 9=Debug Output
<snap>

Regards, Rudi.


Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Share this post


Link to post
Share on other sites

I can't find the Tidy.ini in the AutoIt v3 directory :/

And should i set it to 9

Remove_Empty_Lines=9?

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Create the file if it is not there: C:\Program Files\AutoIt3\SciTE\Tidy\Tidy.ini

Contents of the ini file should be updated this way:

[ProgramSettings]

Remove_Empty_Lines=1

The following is all I have in my current Tidy.ini file. It belongs in [installation Dir]\SciTE\Tidy\Tidy.ini -

[ProgramSettings]
tabchar=0
proper=1
endfunc_comment=1
Gen_Doc=0
Gen_Doc_Show=0
KeepNVersions=1
Remove_Empty_Lines=1
ShowConsoleInfo=1
Edited by Squirrely1

Das Häschen benutzt Radar

Share this post


Link to post
Share on other sites

Create the file if it is not there: C:\Program Files\AutoIt3\SciTE\Tidy\Tidy.ini

Contents of the ini file should be updated this way:

[ProgramSettings]

Remove_Empty_Lines=1

I have this .ini file:

TidyV2_Example.ini

in the folder

C:\Programmer\AutoIt3\SciTE\Tidy

I there I've tryid to change the

Remove_Empty_Lines=0 to Remove_Empty_Lines=1, but it won't work should i create my own tidy.ini and then only whrite in Remove_Empty_Lines=1 in there?

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Create the the file "Tidy.ini" and save it to the folder "C:\Program Files\AutoIt3\SciTE\Tidy\"

Edited by Squirrely1

Das Häschen benutzt Radar

Share this post


Link to post
Share on other sites

Thanks now it works :D

I thought i did try that before, but i didn't.. lol

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0