Notified when the active page changes

Hello,
We have a panel that displays the content of script lables. A script label can be added to a page.
How do we determine the current page? The page might be selected from the from the pages panel and might not have any items on the page. Our ActiveSelectionObserver is not being called when the visible page is being changed.
Thanks.
P.

Well, I'll answer it...
There is no way to do it with ExtendScript and InDesign alone.
You can do it (and I do in one app I've written) with APID from Rorohiko. In fact, I use APID as my primary event engine.
Events I routinely use from APID:
subjectCreated - when a frame or something has been created.
subjectDelete - same, but
subjectModifed - when an object has been modified
subjectModifed-text - when a text object is reflown
docSelected
docDeselected
selected - a page item is selected
deselected - a page item is deselected
Regards
Bob

Similar Messages

  • Event trapping when the active document changes

    Hi all,
    Apologies if this question has been asked / answered before. I don't get out much.
    Is there any way, in ExtendScript, to get an event when the user brings a different document to the front? Something similar to the "beforeOpen" event, but which fires when the activeDocument changes?
    Seems to me that something like that would be quite handy. But then, maybe I'm just odd.
    Thanks,
    Chuck

    Well, I'll answer it...
    There is no way to do it with ExtendScript and InDesign alone.
    You can do it (and I do in one app I've written) with APID from Rorohiko. In fact, I use APID as my primary event engine.
    Events I routinely use from APID:
    subjectCreated - when a frame or something has been created.
    subjectDelete - same, but
    subjectModifed - when an object has been modified
    subjectModifed-text - when a text object is reflown
    docSelected
    docDeselected
    selected - a page item is selected
    deselected - a page item is deselected
    Regards
    Bob

  • The countdown timers at File Storage Locker sites (fileserve, bitshare, freakshare, etc) will no longer countdown if not the active page (Since upgrading to firefox 5.0). How do make it countdown when not the active page?

    Since upgrading to firefox 5.0, countdown timers at the various file locker sites will no longer countdown when the page is not the active page. I am sure it is not a site-side change as ALL the sites countdown timers freeze when not the active page. This has only happened since the upgrade.

    For reading only as Bugzilla is Not a forum.
    [https://bugzilla.mozilla.org/show_bug.cgi?id=652472 Bug#652472] - Higher setTimeout/setInterval clamping in inactive tabs breaks countdown scripts
    In mean time you can try opening those links in a new window instead of a new tab.
    Not all sites are affected as sites like Megaupload, Filesonic, depositfiles, Rapidshare work fine.

  • How do I post to a new page when the 1st page is full?

    How do you create a bul. board where the posts go on a 2nd
    page when the first page is filled ...and 3rd page when 2nd is
    full, etc ... Maybe I can stick a wordcount in a while loop before
    the CFOutPUT Tag? Is there such a variable that holds a word count
    or better still, a line count?
    thnx a billion, please, please help!

    Check out this code-Use a cfc which will be the same for you
    and then change my query for yours in the .cfm HTHs:
    functions.cfc:
    <cfcomponent output="yes">
    <!--- Next x record function --->
    <cffunction name="nextXpage" access="public"
    returntype="struct" hint="Next x page function" output="No">
    <cfargument name="recordcount" required="Yes" default="0"
    type="numeric" hint="The total numbers of records / values">
    <cfargument name="page" required="Yes" type="numeric"
    default="0" hint="The page number that you are currently on. (for
    example URL.page)">
    <cfargument name="maxrows" required="No" type="numeric"
    default="10" hint="The maximum records / values to be displayed per
    page">
    <!--- Define the return structure --->
    <cfset var nextXpage = structNew()>
    <!--- Calculate how much page are available according to
    the maxrows displayed --->
    <cfset nextXpage.pagecount =
    CEILING(arguments.recordcount / arguments.maxrows)>
    <!--- Set the maximum rows to be displayed --->
    <cfset nextXpage.maxrows = arguments.maxrows>
    <!--- Set the currentpage --->
    <cfset nextXpage.currentpage = arguments.page>
    <!--- Set the currentpage --->
    <cfset nextXpage.recordcount = arguments.recordcount>
    <!--- Set the startrow value --->
    <cfif arguments.page eq 1>
    <cfset nextXpage.startrow = 1>
    <cfelse>
    <cfset nextXpage.startrow = (arguments.page *
    arguments.maxrows) - (arguments.maxrows -1)>
    </cfif>
    <!--- Define the previous and next values. --->
    <!--- Next values --->
    <cfif arguments.page neq nextXpage.pagecount>
    <cfset nextXpage.next = true>
    <cfset nextXpage.nextpage = arguments.page + 1>
    <cfelse>
    <cfset nextXpage.next = false>
    <cfset nextXpage.nextpage = 1>
    </cfif>
    <!--- Previous values --->
    <cfif arguments.page eq 1>
    <cfset nextXpage.previous = false>
    <cfset nextXpage.previouspage = 1>
    <cfelse>
    <cfset nextXpage.previous = true>
    <cfset nextXpage.previouspage = arguments.page - 1>
    </cfif>
    <!--- Return the structure --->
    <cfreturn nextXpage>
    </cffunction>
    </cfcomponent>
    Then on your output page where you have the info:
    .cfm page:
    <cfquery name="qrysales"
    datasource="davanzo_villa.admindb" >
    SELECT DISTINCT
    clientinfo.Id, clientinfo.RemoteAddress, clientinfo.visit,
    clientinfo.country
    FROM clientinfo
    order by clientinfo.Id
    </cfquery>
    <!--- display hit counter --->
    <cfquery name="GetHits">
    SELECT * FROM hit_counter
    </cfquery>
    <cfparam name="URL.page" default="1">
    <!--- Determine the navigation parameters --->
    <cfset functions =
    createobject("component","functions")>
    <cfset nav =
    functions.nextXpage(qrysales.recordcount,URL.page,15)>
    <table width="792">
    <h4>Total Hits: <CFOUTPUT
    query="GetHits">#hit_count#</cfoutput></h4>
    <h4>Total Unique Visitors:
    <cfoutput>#qrySales.RecordCount#</cfoutput></h4>
    </table>
    <table width="792">
    <tr><td>
    <cfoutput>Unique Visitors: #nav.recordcount# (page
    #nav.currentpage# of #nav.pagecount#)
    <cfif nav.previous>
    <a
    href="hitcount.cfm?page=#nav.previouspage#">Previous</a>
    <cfelse>
    Previous
    </cfif>
    <cfif nav.next>
    <a
    href="hitcount.cfm?page=#nav.nextpage#">Next</a>
    <cfelse>
    Next
    </cfif>
    <ul>
    <cfloop From = "1" To = "#nav.pagecount#" index =
    "pagenumber">
    <cfoutput>
    <a
    href="hitcount.cfm?page=#pagenumber#">#pagenumber#</a></cfoutput>
    </cfloop>
    </ul>
    </cfoutput>
    </td></tr>
    </table>
    <table width="792">
    <tr>
    <td>Date</td>
    <td>Visitor Number</td>
    <td>Visitor`s IP Address</td>
    <td>Visitor`s Country</td>
    <td>Path Taken</td>
    </tr>
    <cfoutput query="qrysales" startrow="#nav.startrow#"
    maxrows="#nav.maxrows#">
    <tr>
    <td>#qrySales.visit#</td>
    <td>#qrySales.id#</td>
    <td>#qrySales.RemoteAddress#</td>
    <td><cfif qrysales.country neq ""><a
    href="country.cfm?Remote_Addr=#qrysales.RemoteAddress#">#qrySales.country#</a><cfelse><a
    href="country.cfm?Remote_Addr=#qrysales.RemoteAddress#">Find
    country</a></cfif></td>
    <td><a href="hitpathdetails.cfm?id=#id#">See path
    taken</a></td>
    </tr>
    </cfoutput>
    </table>

  • Hi ! Please my iphone is on the activation page and i can't do nothing, there is a sim card into but itune don't recognise it, and the phone don't want to activate. I tried everything, and before the reboot the iphone 3 was worked verry well. Please help

    Please my iphone is on the activation page and i can't do nothing, there is a sim card into but itune don't recognise it, and the phone don't want to activate. I tried everything, and before the reboot the iphone 3 was worked verry well. Please help me !

    Hello there, rebeccallouche.
    The following Knowledge Base article offers up some great steps and links to some additional information that is pertinent when having activation issues with your iPhone:
    iPhone: Troubleshooting activation issues
    http://support.apple.com/kb/ts3424
    Additionally, if the iPhone is not being recognized in iTunes this article will be useful as well:
    iOS: Device not recognized in iTunes for Windows
    http://support.apple.com/kb/ts1538
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro.

  • How do I quickly update the ActiveX automation references in my VIs when the ActiveX interface changes?

    Hello all,
    I joined a test automation team in the middle of a large project and
    inherited a huge set of VIs (over 700) and associated architecture for
    this automation (not to mention the several thousand TestStand
    sequences).  Another part of the project is being developed by our
    customer, who is using VB 6.0 to create ActiveX components which we
    need to use in LabView to access their hardware.  They've already
    invested a large amount of time developing these ActiveX components,
    and they are not finished -- meaning the ActiveX interfaces will be
    changing.  Every time they send updated ActiveX components, I have to
    re-write many, many VIs including updating a couple strict typdefs. 
    This process takes way too much time and is mind-numbing and prone to
    error or omission.
    Unfortunately I can't post any of the VIs because of a NDA.  But
    perhaps a bit more detailed explanation would help.  TestStand calls a
    VI to open and get an ActiveX reference for automation (which it stores
    in a variant).  It will pass this reference into any VI it calls to
    perform specific functions through this ActiveX interface.  For
    example, one VI that may be called passes this automation refnum into
    another, which passes it to another, which passes it into another to
    get the actual ActiveX reference stored in that variant (through a
    Variant To Data call with a strict typedef of the ActiveX component
    wired to the type input).  [See the attached image of this sample VI
    hierarchy: the far left icon would represent TestStand, and the far
    right is the strict typedef.]  Any of the VIs in the chain might use
    ActiveX Property or Invoke nodes, and it can break at any one of those
    when the ActiveX component changes.  It's easy to fix each one, but
    since there are so many VIs it takes a very long time.
    Is there any way at all to do a massive search/replace or something to
    make the ActiveX references update?  I realise that even though
    property or method names stay the same from one version to the next,
    they are different references.  Is there a way to update these based on
    name if you give it the base ActiveX reference?
    Thanks in advance for any help!
    Tom Williams
    Attachments:
    hierarchy.GIF ‏6 KB

    Ben,
    Unfortunately I can't post any VIs that would demonstrate the problem
    because the ActiveX components are confidential.  I'll try to develop
    my own ActiveX dll that will demonstrate it, but in the meantime, in
    hopes that another picture will help, I've attached an image of a block
    diagram (with some names changed to protect confidential information)
    of one of the lower level VIs from the hierarchy I posted.  In this
    example, the "Automation Refnum IN" is an input with a type definition
    linked to the strict typedef based on the ActiveX automation dll that
    has changed.  I updated that typedef, but as you can see the output to
    the "Class1" indicator is broken.  If I delete the "Class1" indicator
    and select Create->Indicator from the Class1 property node, and then
    wire the new "Class1" indicator to the connector pane, the VI is fixed
    -- at least at compile time.  In most cases there is also a runtime
    problem where the reference obtained by one of the intermediate
    property nodes is null, so the property or method node that uses it
    fails (e.g. "_VNManager.Networks" property returned is 0, so the
    "_Networks.Network1" property node fails).  To fix this problem, I have
    to delete the wires between the property nodes, and one by one select a
    different property/method, then select the correct property/method and
    re-wire.  There seems to be a bit of "jiggling the handle" to get it to
    work though.
    I don't know if the ActiveX developer changed anything in this class,
    but if he did, he didn't change the name of this class.  I would like
    to have to modify the VI only if a class, property or method has
    changed name or been removed.
    Does that all make sense?  Thanks for any pointers or help!
    Tom
    Attachments:
    Class1_Path.GIF ‏7 KB

  • How to find the when the password is changed for a system User

    Hi to all,
    We have a test database where our application connects to system user. The application runs more than a month without any issues, But suddenly my system and sys password gets changed. I wonder how this would happen. I have checked with DBA_USERS to check whether the account gets locked, But the account is in the Open state.
    I need to find out when the password gets changed for these users and who changed it? Is there any possible to trace it or we need to enable the auditing to find it in future.
    Kindly let me know the possible ways.
    Regards,
    Vijayaraghavan K

    Vijayaraghavan Krishnan wrote:
    Hi to all,
    We have a test database where our application connects to system user. The application runs more than a month without any issues, But suddenly my system and sys password gets changed. I wonder how this would happen. I have checked with DBA_USERS to check whether the account gets locked, But the account is in the Open state.
    I need to find out when the password gets changed for these users and who changed it? Is there any possible to trace it or we need to enable the auditing to find it in future.
    Kindly let me know the possible ways.
    Regards,
    Vijayaraghavan KThe only way to implement an Oracle Audit

  • I want the system automatic update my UDFs when the OnHand was changed.

    I added two UDFs in table OITW to count the warehouse OnHand by CASES and Bottles. I want the system automatic update my UDFs when the OnHand was changed.  Is there any way I can do it in database level instead in the application (too much places involved).

    There is few ways how to do this:
    - triger as David said, but I dont recomend it through SAP policy
    - in stored procedure transaction notification  by adding or updating document update your user field
    - create job in SQL server which in specific interval recalculate the changes of onhand and update your user defined field
    - create addon which will be over functiuonalities which may change the onhand value
    I think that from SAP is possible only Addon, but the easist way is trigger and if you dont need it just in time but for example every 10 seccond, the better is job which cannot fail the standard SBO transaction (triger may and may be unsafe).
    Hope it helps
    Petr

  • Do I need to recreate the View when the underlying field changes?

    Re: Do I need to recreate the View when the underlying field changes?
    I did an ALTER TABLE1 to change FIELD1 from varchar(5) to varchar(7). TABLE1.FIELD1 is in VIEW1. When I do a SELECT * FROM VIEW1 it shows 7 characters. But when I look at VIEW1 in object explorer (after refreshing), FIELD1 is varchar(5). Do I care?
    Should I recreate the VIEW1?

    If you have refreshed using sp_refreshview stored procedure then you are good, if not then here you go...
    The metadata for the view is not automatically updated when the tables are modified.
    The fix is to either drop and re-create or alter the view or to use the sp_refreshview stored procedure.
    Example :
    EXEC sp_RefreshView View_Tablename
    GO
    http://msdn.microsoft.com/en-us/library/ms187821.aspx
    Raju Rasagounder Sr MSSQL DBA

  • I need help to activate my iphone 5s. am stuck on the activation page. can someone help with with the icloud activation bypass? how do i even go about it?

    i need help to activate my iphone 5s. am stuck on the activation page. can someone help with with the icloud activation bypass? how do i even go about it?

    You must put in the required information. If you do not have it, you must get it from the original owner of the phone. If you have forgotten your iCloud password, you can reset it at:
    https://iforgot.apple.com/password/verify/appleid
    There is no such thing as an activation "bypass". Activation Lock is a security feature. It wouldn't be that secure is you could bypass it, wouldn't it?

  • How to change the homepage for a new tab when the home page of the initial tab and subsesequently opened tab are different?

    When iam using firefox i selected google as my home page. But while opening another tab in the same window(ctrl+T), I am getting babylon search as home page for it. How can i get rid of this problem?

    '''''"...while opening another tab in the same window(ctrl+T), I am getting babylon search as home page for it."""
    Any search toolbar and changes to search engines can take place by downloading and installing software; usually "free" software from the internet. Babylon can be downloaded and installed by itself or as a "ride-along" when installing/updating some software from the internet. Always look for an opportunity during the installation to un-check boxes that will install "ride-along" items that you do not want. Firefox installation does not include such "ride-along" items.
    #Remove Babylon Toolbar (if you have it installed). The most complete removal is to remove it from your system using (Windows) Control Panel > Add or Remove Programs): http://kb.mozillazine.org/Uninstalling_toolbars#Uninstalling_via_Windows_Control_Panel<br />
    #*Also see:
    #**http://support.mozilla.com/en-US/kb/Uninstalling+add-ons
    #**http://support.mozilla.com/en-US/kb/Cannot%20uninstall%20an%20add-on
    #**http://kb.mozillazine.org/Uninstalling_toolbars
    #Reset your home page (if the Babylon search page is displayed when starting Firefox): http://support.mozilla.com/en-US/kb/How+to+set+the+home+page
    #*You can reset to the default by clicking "Restore to default" on Options > General > Startup > Home page. Be sure to set "When Firefox starts" to "Show my home page" on that same panel.
    #Reset your Location Bar search engine (if typing a few words in the URL/Location Bar takes you to Babylon search):
    #*type '''''about:config''''' in your Location Bar, like typing a web site address, and press the Enter key
    #*ignore warning and choose to continue
    #*in Filter, type '''''keyword.URL'''''
    #*in lower part of screen, if it is '''bold''' and shows "'''user set'''", right-click keyword.URL and choose "Reset"
    #*in Filter, type '''''babylon'''''
    #*any items in lower part of screen in '''bold''' and showing "'''user set'''", right-click and choose "Reset"
    #*close about:config tab
    #*See:
    #**http://kb.mozillazine.org/About:config
    #**http://kb.mozillazine.org/Location_Bar_search#Location_Bar_search_.28external_-_search_engine.29
    #**http://kb.mozillazine.org/Keyword.url
    #**http://www.techrena.net/computers/address-bar-search-provider-firefox/
    #If Babylon is shown in your Search Bar and you want to remove it:
    #*https://support.mozilla.com/en-US/kb/Search%20bar
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''
    Not related to your question, but...
    You may need to update some plug-ins. Check your plug-ins and update as necessary:
    *Plug-in check --> http://www.mozilla.org/en-US/plugincheck/
    *Adobe Shockwave for Director Netscape plug-in: [https://support.mozilla.com/en-US/kb/Using%20the%20Shockwave%20plugin%20with%20Firefox#w_installing-shockwave Installing ('''''or Updating''''') the Shockwave plugin with Firefox]
    *Adobe PDF Plug-In For Firefox and Netscape: [https://support.mozilla.com/en-US/kb/Using%20the%20Adobe%20Reader%20plugin%20with%20Firefox#w_installing-and-updating-adobe-reader Installing/Updating Adobe Reader in Firefox]
    *'''''Shockwave Flash''''' (Adobe Flash or Flash): [https://support.mozilla.com/en-US/kb/Managing%20the%20Flash%20plugin#w_updating-flash Updating Flash in Firefox]
    *Next Generation Java Plug-in for Mozilla browsers: [https://support.mozilla.com/en-US/kb/Using%20the%20Java%20plugin%20with%20Firefox#w_installing-or-updating-java Installing or Updating Java in Firefox]

  • Call a function when the active document is closed

    Hi friends
    I have a portion of my script (at true a specific function) that I´d need to be executed every time the user close the app.activeDocument in Photoshop.
    I know there´s a Photoshop script called "Script Event Manager" where we can associate actions and scripts with events (like closing the document). I´d not like to use this script because..as I told...it´s not my entire script to be runned when closing a file..but only a function.
    Tried to search in the Script Event Manager for any event called "onClose" () but sure there´s nothing.
    How could I insert an event in the body of my own script that calls a function every time user close the active document?
    Thank you a lot for the help
    Best Regards
    Gustavo.

    As I said before the close event is really not that useful. In addition to the document already being closed the event descriptor will only have the path to the closed file if it was saved as part of the close event.
    But if you want to play around with this to see if it will be helpful to you here is one way. You will need to add the notifer. This only needs to be done once unless it is removed.
    app.notifiersEnabled = true;
    app.notifiers.add( "Cls ",new File('~/desktop/closeEventHandler.jsx') );
    Then for the event handler script, something like this.
    try {
        if (arguments.length >= 2) {
        var filePath;
        var desc = arguments[0];
        if( desc.hasKey( stringIDToTypeID('in') ) ) filePath = desc.getPath(stringIDToTypeID('in'));
        if( filePath != undefined ) alert( decodeURI( filePath ) );
    } catch (e) {}

  • How do you make page 1 the active page?

    I am trying to write a script to perform a data merge, followed by a find/replace, page add, and finally export. I can get it to perform the merge and find/replaces that are needed.
    When I add a new page manually I normally select the first page in the pages window then click add a new page at the bottom. Doing that makes every page after that go to 2 pages(like an open book). I don't know how to do this in the script, what I tried below didn't work. It adds a new page at the end of the document and that page is the active one on screen.
    app.activeDocument.pages.item(0).select();
    app.activeDocument.pages.add();
    After the merge, editing gets really slow, taking 15-20 per letter I add or delete.The only way i've found to have it edit like you'd expect is by exporting it to the IDML format then reopening that file in InDesign. I haven't been able to find much on exporting via a script. I've seen exports similar to:
    app.activeDocument.exportFile(ExportFormat.INDESIGN_MARKUP, newDoc, false);
    But I don't know if that will work or not.
    I'm very new to scripting in InDesign. I'm using InDesign CS5.5.

    Hi again
    This could work for the IDML export
    main();
    exit();
    function main() {
              myDoc = app.activeDocument;
              f = new File("/Users/afile.idml");     // here you have to adapt it for your needs.
              app.activeDocument.exportFile(ExportFormat.INDESIGN_MARKUP,f, false);

  • How to trigger a refresh of a dropdown list when the selection is changed

    Hi,
    This is a general ExtendScript question, but since I'm working with FM, I'll ask here first. I have a bit of a paradox here and I'm not sure of the best way to handle it.
    I have a dialog box with a dropdown list, where I want to refresh certain controls when the user changes the selection in the list (dropdownList.onChange). This includes refreshing the contents of the list itself. However, the problem is, as soon as I try to refresh the list contents, it triggers onChange again. So, if I put the call to refresh the box within the onChange handler, it results in an endless loop, because my refresher function triggers onChange when it refreshes the list.
    Does anyone know a better methodology, where I can safely trigger a refresh of a dropdown list within the list's own onChange event handler? I really wish that onChange was reserved for a user action only, or there was at least some property to that effect.
    Russ

    Hi Russ,
    you can stop that with "stopPropagation()"
    You can find this in "Javascript Tools Guide" on page 150.
    I'm not able at the moment to send you an example 'cause I'm in a hospital for a while.
    Happy New Year!

  • Auto numbering changes when the font size changes

    Help.
    I get files made in InDesign CS4 that have paragraph styles assigned to create numbered lists within the body. They are fine as they are when they are opened.
    When I make changes they often- not always- change to 'continue from previous number' instead of staying 'start at 1'. The changes I have make are to change the document size, the font size and the margins.
    Is there something I am doing that allows them to change, or is there something that I can do to keep them from changing?

    Hi,
    Your doubt is not yet clear.
    I think u have not used smartstyles just changed the Font.
    To Test it if data is not coming from driver program,then just excute the smartform-(Press F8) .
    The Print Page will be seen to you.
    Accordingly you can undrstand whether it is decreased or not.
    Affable,
    Arbind

Maybe you are looking for

  • Problem with R/3 Data Source based on Function module in SAP BI

    Hi, We have a data source based on functional module. When we load data from R/3 to BI we face the following error. " No end-confirmation arrived in the Warehouse from the source system." We are getting data but due to no end confirmation from the so

  • BT Home Hub resync rate?

    Hi I'm having a serious problem with what I think is to do with my Hub's resync rate. I have a BT Home Hub 1.0 I use it for a home computer, a laptop and Xbox Live. On Xbox Live, every ten minutes it disconnects and connects again. This doesn't affec

  • Aggregate function and join

    I have three Tables(Emptimesheet,comexpensetable,perexpensestable).I want to show otput something like below, EmpID,EmpName,StartDate,EndDate,Total,Chotel,CAirfare,Cfuel,WeeklCompanyExpenses,Percompanyexpenses rightnow in the below query I don't have

  • Purpose of the following tables?

    Hi All, Does anyone knows the exact purpose of the following tables; 1. BSIK 2. BSAK 3. BSAS 4. BSIS I need a clear description. Thanks, Kishan

  • Air 3 for Linux

    i m trying to get my hand on Air3 runtime for Linux, as it fixes a lot of graphic refresh issues, i know Adobe do not support it but i thought third parties did. This link says it does but it's actually 2.6 http://fileforum.betanews.com/detail/Adobe-