Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
Trying to map F12 to add the index marker to text, but do not know enough to see what I am doing wrong.
Here is what I got so far. Can someone shed some light for me.
function table auto_index()
{
$table_rows=tbl_row_count()
$column_to_process=tbl_caret_col()
while(tbl_caret_row() <= $table_rows && tbl_caret_row() > 0) {
oid_select(oid_caret(0))
copy_mark mymark
insert_tag(indexterm)
paste mymark
# insert("-")
if (goto_cell(tbl_caret_row()+1, $column_to_process) != 1)
{
break
}
}
map F12 auto_index();
Thanks
Bryon
Thansk for the help, I noticed after I posted it was all crazy. I have edited the original post to show what I have in my text file. The purpose of this acl is to place your cursor in the top cell of a column,press f12, it will add an indexterm element with the contents of the cell populating it. The original version that I have works, but needs to be local on everyone computer. I have switched to a .zip sma, so I can manage everything off of a network drive instead.
If I have this acl code save locally, it can be invoked by source auto_index.acl. Iooked at other acl scripts that I have had help with and tried to map
$table_rows=tbl_row_count()
$column_to_process=tbl_caret_col()
while(tbl_caret_row() <= $table_rows && tbl_caret_row() > 0) {
oid_select(oid_caret(0))
copy_mark mymark
insert_tag(indexterm)
paste mymark
# insert("-")
if (goto_cell(tbl_caret_row()+1, $column_to_process) != 1)
{
break
}
}
Thanks for the suggestion Clay do I need to add that at the begining or at the end? I am reading the acl reference but... not sure what I am reading.
function table::auto_index() {
$table_rows=tbl_row_count()
$column_to_process=tbl_caret_col()
while(tbl_caret_row() <= $table_rows && tbl_caret_row() > 0) {
copy_mark mymark
paste mymark
")
{
}
}