[CS2][JS]Page Numbering but not Page Number

Please help javascript heroes.
I am working on this doument that has a pagination but it requires an id line where i have to put the number of page but not the actual pagination. I know it sounds weird but to make the picture clearer:
the header of the page is 469 to 524
but on the footer it should be 1 to 56.
is there anyway i can do this on the master page so i won't have to do this manually on the footer of each individual page?

Here is a non finished version:
if(app.documents.length!=0)
var doc = app.activeDocument;
var pg = doc.pages;
mydlg();
else
alert("No documents open !");
function mydlg()
var start = pg[0].name;
var end = pg[-1].name;
var mydlg = app.dialogs.add({name:"False folio 1.0"});
with(mydlg)
with(dialogColumns.add())
with(dialogRows.add())
staticTexts.add({staticLabel:"From page"});
var startField = realEditboxes.add({editValue:Number(start), minWidth:30});
staticTexts.add({staticLabel:"to page"});
var endField = realEditboxes.add({editValue:Number(end), minWidth:30});
if(mydlg.show()==true)
falseFolioLayer();
var l = doc.layers.item("falseFolio");
var start = startField.editValue;
var end = endField.editValue
var lg =Number(end) - Number(start);
$.writeln(lg);
for(i=1; i<=end; i++)
var index = Number(start)-2+i;
if(String(i/2).indexOf(".")==-1)
x1 = 2*pageAttr(doc)[0]-pageAttr(doc)[4]-25;
x2 = 2*pageAttr(doc)[0]-pageAttr(doc)[4];
else
x1 = 0+pageAttr(doc)[2];
x2 = x1+25;
var y1 = pageAttr(doc)[1]-pageAttr(doc)[3]-10;
var y2 = y1+10;
var folio = pg[index].textFrames.add(l,{geometricBounds:[y1,x1,y2,x2]});
with(folio)
contents = String(i)+"/"+lg;
textFramePreferences.verticalJustification = VerticalJustification.BOTTOM_ALIGN;
texts[0].justification = Justification.AWAY_FROM_BINDING_SIDE;
function falseFolioLayer()
var l = doc.layers;
for(i=l.length-1; i>=0; i--)
if(l[i].name=="falseFolio")
l[i].remove();
l.add({name:"falseFolio"});
function pageAttr(doc)
h = doc.documentPreferences.pageHeight;
w = doc.documentPreferences.pageWidth;
mb = doc.marginPreferences.bottom;
ml = doc.marginPreferences.left;
mr = doc.marginPreferences.right;
return [w,h,ml,mb,mr];

Similar Messages

  • Regex to match numbers but not characters

    Hey all,
    I brain must not be working right or something but I cannot for the life of me figure out how to get a regex to match numbers, but not characters.
    e.g.
    123456
    would match, but
    123abc
    would not. Essentially what I want to do is take a string and only return a match when the string has numbers but no characters.

    No, it doesn'tYes it does.
    "123abc".matches("\\d+");
    "abc123".matches("\\d+");
    "123".matches("\\d+");
    false,false,trueExcellent example demonstrating the output of a method.
    However the suggestion above was referring to a regular expression, not a method.
    And the above regular expression does match with the following methods
    "123abc".replaceAll("\\d+", "xxx");
    "abc123".replaceAll("\\d+", "xxx");
    "123".replaceAll("\\d+", "xxx");
    The correct regular expression to match only digits is....
    ^\d+$

  • Edit GAL to show phone numbers but not email addresses

    We would like to edit our company's GAL to show only the phone numbers for some staff and not their exchange email accounts.  Is there a way to do this through Active Directory?
    AD Environment: Server 2008 R2 Standard
    Exchange Environment: Server 2008 Standard, Exchange server 2007.

    Link to the new thread: https://social.technet.microsoft.com/Forums/exchange/en-US/6c4158a6-107d-4da6-abad-c05106c20fde/edit-gal-to-show-phone-numbers-but-not-email-addresses?forum=exchange2010#371c659c-c002-4fb6-b5a1-ae776bf6534c
    This posting is provided AS IS with no warranties or guarantees , and confers no rights.
    Ahmed MALEK
    My Website Link
    My Linkedin Profile
    My MVP Profile

  • IMessage only recognize Apple ID / Email but not phone number. Why?

    I have a small problem with the iMessage. My phone only recognize and auto detect the apple ID but not the phone number who are available for iMessage. Does anyone experienced the same problem?
    These print screen below is 2 examples from my contact who actually available for the iMessage with their phone number.

    i think i have found a fix for this its worked for me so its worth a try. You will need the other persons phone to do this.
    1) Delete the contact from your phone.
    2) On your phone go to Settings > Messages then tap receive at, it it has your Apple ID e-mail address at the top tap that and sign out this will remove your e-mail address from iMessage leaving just your phone number.
    3) Go back to Message settings turn off iMessage.
    4) Turn off your phone and back on.
    5) Go back to Settings > Messages and turn back on iMessage it will then reactivate iMessage
    Now for your friends phone
    1) Go to yourself on your friends contact list and remove your e-mail address if they have it saved.
    2) Go to Settings > Messages then tap receive at, if it has their Apple ID e-mail address at the top tap that and sign out removing their e-mail address.
    3) Go back to Message settings turn off iMessage.
    4) Turn off their phone and turn it back on
    5) Go back to Settings > Messages and turn back on iMessage
    once reactivated on both phones follow these steps.
    1) Send a message from your friends phone to yours
    2) On your phone the message should come through and will have your friends mobile number at the top
    3) Reply to your friends message.
    4) Save your friends phone number as a contact again leaving the the country code (i.e UK country code +44)
    5) Delete the message between you and your friend on your phone then compose a new message and and select your friends number and it should automatically send as a iMessage send the message then go back to your contacts remove the Country code from the number and from there on then the iMessage will detect that persons phone number as a iMessage compatible device.
    This has worked for me and 3 other of my friends who where having the same problem with a number of their contacts, it seems the error is more to do with your friends phone, when activating iMessage for the first time it automatically defaults to the Apple ID and in some cases causing the phone number not to register correctly with the Apple servers this step by step removes the e-mail and reactivates nothing but the phone number with the iMessage servers.
    Hope This Helps.

  • Color sample chart shows names and numbers but not the color sample

    on our website we display multiple pages with a color sample chart.
    The descriptions of this chart still displays but the color samples are not shown.

    You can also check for errors in the "Web Developer > Web Console" (Ctrl+Shift+K)
    *https://developer.mozilla.org/en/Tools/Web_Console
    Current Firefox versions have a lot of built-in web developer tools including an Inspector and Style editor.
    *https://developer.mozilla.org/en/Tools
    *https://developer.mozilla.org/en/Tools/Page_Inspector
    *https://developer.mozilla.org/en/Tools/Page_Inspector/HTML_panel
    *https://developer.mozilla.org/en/Tools/Page_Inspector/Style_panel

  • HT204150 I have started randomly losing contact numbers, but not email addys for same contact

    I have started losing contact ph nbrs, not the email address if there is one. But random numbers just disappear.  Any advice?

    Hello hwestphal, 
    Thanks for contributing to the Apple Support Communities. 
    It looks like you were not able to send iMessages to your contacts, and you've solved it by turning iMessage and FaceTime off and on again. It sounds like after this, your friend is not receiving iMessages because they are sending from your phone number. 
    Next, I'd suggest the steps in this article to make sure that your phone number is linked to your Apple ID (email address):
    iOS and OS X: Link your phone number and Apple ID for use with FaceTime and iMessage - Apple Support
    Your friend may also want to try these steps on their iPhone when they are in range of cellular service. 
    Best Regards,
    Jeremy 

  • CS6 andLightroom were installed. PC crashed. Have product number but not serial number, how do I re-install them?

    Please help. I have lost/didn't take note of my serial numbers when I installed CS6 and Lightroom the first time. I have to re-install them now but only have disc and product number. Thank you.

    The best for this would be Contact Customer Care  Chat or phone.
    While we as volunteers handle technical questions, we can't make a serial number work.
    I hope you have registered your software with Adobe, it should make this easier.
    Gene

  • IMessage works for some numbers but not all

    Hello all!
    So I've run into a bit of a problem with my iMessage recently.
    Currently I've been able to fix it for some of my iphone friends but there's one that I just can't seem to get to work.
    So basically the rundown I did to fix it for the majority of my friends #'s was I
    Turned off Imessage and Facetime
    Restarted my phone
    Turned on imessage and facetime
    And that seemed to fix whatever was wrong with the majority of my friends.
    However, there's one that just won't work..I know that he doesn't have texting on his iphone because where he lives he doesn't get service so he relies on wifi to use imessage..It was working fine until a couple weeks ago when I couldn't send anyone an imessage..and then randomly it started sending from my email. So upon searching the internet I got it to go back to my number but now  I'm unable to text him anymore... It worked while on my email but once I got back on my number it didn't.!
    I'm not quite sure if it's on my end or his..but I hope I can get some answers here!
    Thanks!

    Hello hwestphal, 
    Thanks for contributing to the Apple Support Communities. 
    It looks like you were not able to send iMessages to your contacts, and you've solved it by turning iMessage and FaceTime off and on again. It sounds like after this, your friend is not receiving iMessages because they are sending from your phone number. 
    Next, I'd suggest the steps in this article to make sure that your phone number is linked to your Apple ID (email address):
    iOS and OS X: Link your phone number and Apple ID for use with FaceTime and iMessage - Apple Support
    Your friend may also want to try these steps on their iPhone when they are in range of cellular service. 
    Best Regards,
    Jeremy 

  • Imported phots sequential numbered but not in time order?

    I import my photos and I will name them say ball, and I have Elements set to number them starting with 1, so I get ball1, ball2 etc, but problem is that these files are imported but are not in order of time I would like the first photo taken to be ball1 and the last ball99. But when I go into Windows Explorer and I see that the photos are not in order say that ball5 might be first then ball9 next etc. How can I have Elements import photos and keep them in order of time taken.

    It's not possible to change the sort order.

  • .How do I find out what Version (generation) of Ipod touch I have, as I want to know if I can download IOS 5 onto it? It was a gift so I only know the model and serial numbers but not the type

    Hi, can anyone help me out with this question?
    How can I find out which version of Ipod touch I have. I only have the model and serial numbers as it was a gift, but I would like to download IOS 5 if it is compatible?
    Very frustrated Ipod user, any advice would be much appreciated.
    Lynda.

    I had the same problem because there are so many iPod models.  There is a great article in Wikileaks that explains it all and also has pictures.  I'm confident this answer your question.

  • Cannot install - have various codes, but not serial number????

    I purchased my software through University of Wisconsin System deal . . . and I have my Order #, my product code, and my redemption code from when I went through verification process. . . I downloaded the installer package to my computer, but I need the serial number to install it and register it and I can't find it.  All I get when I try to contact Adobe support is to contact the community. . . HELP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    cori

    Redemption Code Help
    Mylenium

  • WILL NOT TAKE REDEMPTION CODE  IT WILL TAKE THE NUMBERS BUT NOT LETTERS  WHEN I TYPE IT IN

    IWhen i type in  my redemption code it will not type the letters only the numbers

    Most likely you are trying to enter a redemption code into a serial number entry.  Redemption codes are normally used for acquiring the serial number that you would enter. 
    Redemption Code Help
    http://helpx.adobe.com/x-productkb/global/redemption-code-help.html

  • Excel attachment displays numbers but not letters

    I have and excel attachment exported from access 2007.  When I open it on an IOS device, I can only see the contents of cells with numbers.  The cells that contain letters are blank.

    Most likely you are trying to enter a redemption code into a serial number entry.  Redemption codes are normally used for acquiring the serial number that you would enter. 
    Redemption Code Help
    http://helpx.adobe.com/x-productkb/global/redemption-code-help.html

  • I am having a problem entering redemption code.  I can enter numbers but when I try to enter any letters it's like the computer is locked up, but it's not on any other application

    I am having a problem entering my redemption code.  I can enter numbers but not any letters.  It's like the computer is locked up when I try.  My letters work on any other application

    It sounds like you are trying to use a redemption code (alpha-numeric) where you are supposed to be using a serial number (strictly numeric).  A redemption is normally used to acquire a serial number... the serial number is what you enter to activate the software.
    Redemption Code Help
    http://helpx.adobe.com/x-productkb/global/redemption-code-help.html

  • Re-Install CS2 on Win VISTA but setup.exe now does not respond

    I successfully installed and ran my legal, registered CS2 Production Premium on two different Win VISTA 64 machines, first on my  original desktop, then my current laptop, which is what I now use.
    Each time,  CS2 installed OK. I had learned the "trick" was to stop the installation  after the last program, before the suite proceeded to do the final  steps. If I failed to stop prior to those final steps, the error message  about registration occurred. If I stopped prior to the conclusion of  the installation, then each program worked fine.
    HOWEVER...  I recently downloaded and installed CS5 demo, then removed CS5. I had uninstalled CS2 in preparation (because of disk space and potential conflicts). I cleaned the registry, as I also did after uninstalling CS5.
    When  I went to re-install CS2 (using the original legal disks), now the setup.exe program DOES NOTHING. It  whirs when clicked, as if it's launching, then sits idle, not performing any tasks.  I've let it "try" for hours, but no results.
    I have: clicked on the file from Windows Explorer, I have opened a command line window and run e:\>Setup.exe, I have even copied the disk to the desktop and tried to run Setup.exe from there. There is never an error message. There is only no activity whatsoever from setup.exe.
    During the  time of the last successful CS2 installation and the current attempt to  install, there have been several Vista updates installed on the  machine.
    So, I have successfully run CS2 on Vista 64,  but not since removing the CS5 demo. My system is a multi-core AMD 64-bit processor running Windows Vista Home Premium Build 6002 with all Microsoft updates applied. (And yes, having not had any paying  job in almost three years, I cannot figure out a way to fund the  upgrade...and, of course, Adobe has cut off support of any kind for  CS2.)
    Does anyone have experience and a solution?

    CS2 is completely unsupported under Vista and Win 7. 64 bit makes it even more difficult.
    Unfortunately, you're on your own here. Best bet would be to upgrade to CS5 and you should take note of the fact that if you don't and you wait til CS6 ships you will be out of the upgrade loop altogether and will have to pay full price.
    Bob

Maybe you are looking for

  • M58p 7479-RS2 Small Form Factor PC - Recommendations For Operating System

    Hi I am having trouble working out which Operating System to get for this older computer (produced in 2008 I think). The closest model to it I can find, on Lenovo's web site is the M58p 7479-RS1. This shows several firmware updates and a BIOS update

  • Clarification for the parser to be used in wls6.1

    Hi, Let me confirm whether my underdstanding is correct becuase it was misleading on reading the FAQ of xml.Weblogic6.1 has two parsers xerces1.3.1 and weblogic fast parser and one cannot use any other version of xerces and xalan and can use any othe

  • FGA, module name and SET_MODULE

    RDBMS: Release 10.1.0.5.0 I would like to audit a table column using an audit condition on the module name. The code to do that is: begin    DBMS_FGA.DROP_POLICY(object_schema=>'XXXX', object_name=>'TAB', policy_name=>'FGA_SELECT_TAB' );    dbms_fga.

  • Facing problem in using webutil functions

    hi, i have developer suite 10g(9.0.4), i download web util 1.0.6, update all the required changes, i also download the template, which shows the but still i am facing problem in using any function, when i am using get_system_property method then it r

  • Bluetooth newbie question

    hi all i have just started learning about bluetooth i have several questions: 1) can a mobile connect to more than one mobile at the same time (more than one active L2CAPConnection)? 2) is setting up a connection between 2 devices causes a great over