Blank line... how to check for?

Ask questions about how to create a script or swap scripts with other users.
Post Reply
raptordog
Posts: 13
Joined: 04 Aug 2018 15:40

Blank line... how to check for?

Post by raptordog »

How to check if the current line the cursor is on is a blank line?

mucho apprecio :-)

User avatar
pjj
Posts: 1784
Joined: 13 Oct 2009 13:48
Location: Kraków, Poland

Re: Blank line... how to check for?

Post by pjj »

Umm, lemme see... maybe read the current line and find if it equals to null? 8)

¡De nada!
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus

raptordog
Posts: 13
Joined: 04 Aug 2018 15:40

Re: Blank line... how to check for?

Post by raptordog »

Ummm.... i dont think so :-)

raptordog
Posts: 13
Joined: 04 Aug 2018 15:40

Re: Blank line... how to check for?

Post by raptordog »

Try this instead........

if ((Length(Trim(document.Lines[document.CursorY]))) == 0)

It will test the current line for a blank as well as only containing only whitespace.

Cheers big ears :-)

User avatar
pjj
Posts: 1784
Joined: 13 Oct 2009 13:48
Location: Kraków, Poland

Re: Blank line... how to check for?

Post by pjj »

Image
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus

raptordog
Posts: 13
Joined: 04 Aug 2018 15:40

Re: Blank line... how to check for?

Post by raptordog »

002.gif
002.gif (12.04 KiB) Viewed 4479 times

Post Reply