Cursor offset

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
tvoth
Posts: 1
Joined: Thu Feb 03, 2005 3:42 am

Cursor offset

Post by tvoth »

Is there a way to identify the offset (Byte in the Go To dialog) of the current cursor position?

TIA,

Terry.
User avatar
MudGuard
Posts: 1295
Joined: Sun Mar 02, 2003 10:15 pm
Location: Munich, Germany
Contact:

Post by MudGuard »

The only idea I have is to press Ctrl-Shift-Home to select everything from cursor position to document start and then have a look at View - Document Properties, on the Document tab under Selected characters.
ben_josephs
Posts: 2461
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

Doesn't count the newlines, for some reason. And each of those might be either one or two characters.
Lostgallifreyan
Posts: 25
Joined: Mon Feb 14, 2005 10:51 am

Post by Lostgallifreyan »

Tedious workround:
Select string starting at byte of interest, make string big enough to avoid likely dupes in file. Copy to clipboard. Avoid newlines if possible.

Close app, rename file with binary filetype extension, rightclick to open in TextPad, then use Find on clipboard contents. The first byte highlighted will be the one you need, and the offset can be read from the table. If you had to copy a newline to get enough string, it won't find it unless you click the hex display mode in the find dialog, and change the \n (5C6E) to 0D0A or whatever is in your file as standard.

Not fun, but at least it means you don't need another app to do it.
Post Reply