Ask questions about how to create a script or swap scripts with other users.
-
raptordog
- Posts: 13
- Joined: 04 Aug 2018 15:40
Post
by raptordog »
How to check if the current line the cursor is on is a blank line?
mucho apprecio

-
pjj
- Posts: 2236
- Joined: 13 Oct 2009 13:48
- Location: Kraków, Poland
Post
by pjj »
Umm, lemme see... maybe read the current line and find if it equals to null?
¡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
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

-
pjj
- Posts: 2236
- Joined: 13 Oct 2009 13:48
- Location: Kraków, Poland
Post
by pjj »
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
Post
by raptordog »

- 002.gif (12.04 KiB) Viewed 18394 times