NISUS Archives

October 2012

NISUS@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Nobumi Iyanaga <[log in to unmask]>
Reply To:
Date:
Sat, 13 Oct 2012 20:25:21 +0900
Content-Type:
text/plain
Parts/Attachments:
text/plain (100 lines)
Hello,

I asked Hamid to post my message to the mailing list, because (as Žorvaršur reports), my postings to [log in to unmask] were rejected. Now, thanks to Žorvaršur, I think/hope this message will be accepted by the listserv.

Now, 

On Oct 13, 2012, at 5:35 PM, Žorvaršur Davķšsson <[log in to unmask]> wrote:

> I have a question myself regarding this: Is there any command available that returns the page number? If there is one, then the above mentioned command can be used to jump from page to page.
> 

You see that with the command

$text.pageNumberAtIndex $theindex, 1

you can get the page number of the selected location in the current document...

Now, I don't know if my macro will work when the insertion point is in a table, or in a footnote, etc...

Best regard,

Nobumi Iyanaga
Tokyo,
Japan


On Oct 13, 2012, at 6:42 PM, Hamid Haji <[log in to unmask]> wrote:

> I am posting the following message on behalf of Nobumi:
> 
> Hello jem,
> 
> I am not sure at all if it will work in every case, but I tried to write a macro for your purpose.
> 
> On Oct 13, 2012, at 6:06 AM, jem cabanes <[log in to unmask]> wrote:
> 
> I miss a a way to directly jump from one page to next, or to previous –not by scrolling. I haven't been able to find anything suitable in NWP. Is there a way to achieve this somehow?
> 
> Here it is:
> 
> #### macro Jump to the next page:
> 
> Require Pro Version 1.3
> $doc = Document.active
> if $doc == undefined
> 	exit
> end
> 
> $text = $doc.text
> $therange = TextSelection.activeRange
> $theindex = $therange.location
> 
> if $theindex == $text.length
> 	$theindex = $theindex - 1
> end
> 
> $pagenum = $text.pageNumberAtIndex $theindex, 1
> 
> $nextpage = $pagenum + 1
> Select Page $nextpage
> Select Start
> 
> ### end of macro
> 
> --------
> 
> Now, if you want to jump to the previous page, you would do:
> 
> #### macro Jump to the previous page:
> 
> Require Pro Version 1.3
> $doc = Document.active
> if $doc == undefined
> 	exit
> end
> 
> $text = $doc.text
> $therange = TextSelection.activeRange
> $theindex = $therange.location
> 
> if $theindex == $text.length
> 	$theindex = $theindex - 1
> end
> 
> $pagenum = $text.pageNumberAtIndex $theindex, 1
> 
> $previouspage = $pagenum - 1
> Select Page $previouspage
> Select Start
> 
> ### end of macro
> 
> You can assign some shortcuts to these macros, and try if they work.
> 
> Best regard,
> 
> Nobumi Iyanaga
> Tokyo,
> Japan

ATOM RSS1 RSS2