🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: adobe.scripting.indesign
3 messages
3 total messages Started by Keith_Gilbert Mon, 05 Jan 2009 17:08
[JS CS3] Moving the insertion point to the next table cell
#2200
Author: Keith_Gilbert
Date: Mon, 05 Jan 2009 17:08
9 lines
1211 bytes
I can't quite get my head around this one...

Assuming that all the text in a table cell is selected, I want to move the selection to the next cell below the current cell, and select the text in that cell. I need to script this simple maneuver so I can assign a keyboard shortcut to it.

In other words, the script should programmatically do the same thing as [down arrow][esc][esc] does in a table.

I've been trying InsertionPoint.move, but can't quite figure out how to do this within a table framework.

Any ideas/pointers would be appreciated. Thanks.
Re: [JS CS3] Moving the insertion point to the next table cell
#2201
Author: Peter Kahrel
Date: Mon, 05 Jan 2009 17:18
13 lines
933 bytes

if (app.selection[0].parent instanceof Cell) 
   { 
   row = app.selection[0].parent.parentRow.index; 
   app.selection[0].parent.parentColumn.cells[row+1].texts[0].select(); 
   }



The script should really also check whether you're you're in the last row of the table.

Peter
Re: [JS CS3] Moving the insertion point to the next table cell
#2203
Author: Keith_Gilbert
Date: Mon, 05 Jan 2009 18:34
1 lines
852 bytes
Thanks Peter. This is exactly what I needed to get going!
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads