Finding the next table
Finding the next table
How does one find the next table in a long text?
- martin
- Official Nisus Person
- Posts: 5230
- Joined: 2002-07-11 17:14:10
- Location: San Diego, CA
- Contact:
Re: Finding the next table
There's a very short macro that can do this:
If you want to get a little fancier, with an option to wrap the search back to the document start:
Code: Select all
Select Next Table
Code: Select all
$foundTable = Select Next Table
If ! $foundTable
# prompt always includes a button to cancel the macro
Prompt "No more tables found. Would you like to search from the start of the document?", '', 'Search From Start'
Select Document Start
Select Next Table
End
Re: Finding the next table
Thank you.
Your macro lets me turn round. But I found that strangely you can jump only downwards from table to table, but not upwards, which was maybe why you wrote it.
Following your model I wrote this which allows to go upward. Arriving on table one repeating it keeps the selection to let you know.
Your macro lets me turn round. But I found that strangely you can jump only downwards from table to table, but not upwards, which was maybe why you wrote it.
Following your model I wrote this which allows to go upward. Arriving on table one repeating it keeps the selection to let you know.
Code: Select all
$foundTable = Select previous table
If $foundTable
Send Selector 'moveUp:'# to get out of the table in case you are trapped in a selection
End
Select previous table
Scroll to Selection
- martin
- Official Nisus Person
- Posts: 5230
- Joined: 2002-07-11 17:14:10
- Location: San Diego, CA
- Contact:
Re: Finding the next table
I'm glad you found my macro useful. I'm not sure I understand yours. Just the simple:
..works for me. Your macro jumps up by two tables at a time.
Code: Select all
Select Previous Table
Re: Finding the next table
I can't explain it. I tried to copy some of my tables from the document in question into a new document, putting some text between. Now it works as you say (and my macro leaves one out). Mystery.
Same thing with a macro consisting of nothing than the line "select previous table".
Same thing with a macro consisting of nothing than the line "select previous table".