Is there a script that will generate Index Markers based on Notes?

I need a way to generate index markers/entries within InDesign based on content that has been added in InCopy. I need this becasue InCopy users can't add Index Markers. One type of content they can add is Notes. Can I use these to generate index markers?
N.b. I have figured a way for InCopy users to add character styles to words I can then generate a simple keyword index based on these. However I now need to be able to cater for sub level topics, cross references to other topics in the index and equivalent terms, and the character style method won't suffice.
Any advice/tips on other methods to create indexes based on IC content would be useful.
Thanks
I'm using InCopy CS6 and InDesign CS6.

Me again ;-)
couldn't test with InCopy but I hope those lines will create a note if some text is selected. contents of the note = the selected text. create a shortcut to the script.
#target InCopy
try{
currSel = app.selection[0];
currContent = currSel.texts[0].contents;
newNote = currSel.parentStory.notes.add(LocationOptions.BEFORE, currSel.insertionPoints[0]);
newNote.texts[0].contents = currContent;
}catch (e){
alert(e)   
changed the first script slightly. Note it's still just a example of how it could work:
var currDoc = app.activeDocument,
allStories = currDoc.stories,
l = allStories.length;
//checking for at least one existing index ...
if(!currDoc.indexes[0].isValid){
        currDoc.indexes.add();
while(l--){
currStory = allStories[l];
allNotes = currStory.notes;
n = allNotes.length;
while(n--){
currNote = allNotes[n];
noteContents = currNote.texts[0].contents
//create the source
currSource = currStory.characters.itemByRange(currNote.insertionPoints[0].index, currNote.insertionPoints[0].index + noteContents.length);
currTopic = currDoc.indexes[0].topics.add(noteContents);
//this is by default PageReferenceType.CURRENT_PAGE ... changes optionally
currTopic.pageReferences.add(currSource)
currDoc.indexes[0].update();
currNote.remove();
Hope it'll be of some help
Hans-Gerd Claßen

Similar Messages

  • Can Firefox be a global object or is there a script that will enable reuse of a Firefox browser window? We are doing it with IE (Global ie as object) but I and others prefer Firefox.

    A macro script, that is used very often by many workers, opens a new Firefox browser every time it is used. We want to reuse the Firefox browser window if it is already open. We have a script that does this with IE, but... well, it's IE.
    == This happened ==
    Every time Firefox opened
    == We tried to make our macro work with Firefox

    Kevin, there are a few questions I can answer, but if you have irc you can also reach out to the #addons channel. I will also try to get in touch.
    As far as I know:
    * Starting point: [https://developer.mozilla.org/en-US/docs/Developing_add-ons Developing Add Ons: MDN]
    * [https://developer.mozilla.org/en-US/docs/addons.mozilla.org_%28AMO%29_API_Developers%27_Guide/The_generic_AMO_API AMO API ]
    * [https://developer.mozilla.org/en-US/Add-ons/Plugins/Gecko_Plugin_API_Reference/Plug-in_Development_Overview Registering Plugins and Developement Overview]
    *[https://developer.mozilla.org/en-US/Add-ons/Overlay_Extensions/XUL_School/The_Essentials_of_an_Extension Install.rdf file info for extensions]
    ''Is there a way to find the GUIDs for these other browsers: K-Meleon, Waterfox, Firefox Nightly (we are guessing the Nightly builds use the same GUID as Firefox) so that we can add the appropriate information to our install.rdf and update.rdf files or does one need to get in contact with the respective projects to determine these?''
    I do not know. There are generating GUIDS [https://developer.mozilla.org/en-US/docs/Generating_GUIDs]
    Be right back. I will try asking for backup.

  • Is there a script that will reset preferences in Illustrator?

    I'm using Illustrator CS6 and Illustrator CC on both Mac and PC. Holding down Ctrl-Alt-Shift or Command-Option-Shift while launching Illustrator does not work to reset the preferences.
    Does anyone know an easy way to reset preferences?

    Move the complete folder out of there:
    http://helpx.adobe.com/illustrator/kb/preference-file-location-illustrator.html
    You can trash it immediately, but you can also wait if this move solves your proble and then maybe delete it afterwards.

  • Script that will help validate if there is any data loss after a DB restore

    Hi,
    I need to write a single script that will perform the following
    operations:
    1)return me the highy accessed tables across all databases.
    2)List the count, Min and Max system date of the highy accessed tables returned from step 1.
    The idea is to validate if there is any data loss to the highly transactional tables after a database restore operation has been performed.
    Thanks.

    Hello,
    I would also like you to see nice blog by Aron,you can modify the script a bit to change according to your need
    http://sqlblog.com/blogs/aaron_bertrand/archive/2008/05/06/when-was-my-database-table-last-accessed.aspx
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers
    Hello Shanky,
    The post would not be helpful too much for OP's requirement. The post was talking about when was the database last accessed. DMLs are not capturing in the script and also there will be many variant forms that can be applied for DML. Hence, I do not think,
    the script would help too much. 
    Or Am I missing something? 
    Latheesh as i mentioed OP has to modify the script little bit may be add User_seek,user_update,user_scans.Still IMO there is no *perfect* way to actually analyze this.So I pointed out point in my original post.Also unless he has some timestamp he cannot
    see min time when it was accessed ,max time can be taken from last user seek,scan,lookup time. Motive was to lethim know what he was trying to achieve cannot be axactly obtained by using sys.dm_index_usage_stats.Below query will give most accessed table
    : Source (Query)
    SELECT
    t.name AS 'Table',
    SUM(i.user_seeks + i.user_scans + i.user_lookups)
    AS 'Total accesses',
    SUM(i.user_seeks) AS 'Seeks',
    SUM(i.user_scans) AS 'Scans',
    SUM(i.user_lookups) AS 'Lookups'
    FROM
    sys.dm_db_index_usage_stats i RIGHT OUTER JOIN
    sys.tables t ON (t.object_id = i.object_id)
    GROUP BY
    i.object_id,
    t.name
    ORDER BY [Total accesses] DESC
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • Is there an AppleScript or Automator Script that will wake a Mac from Sleep?

    Is there an AppleScript or Automator Script that will wake a Mac from Sleep?

    Frank and All,
    The following answer to your question above is complicated, but I hope it explains why my question was formed with so much frustration in it.
    I have an OpenOffice(OO) Macro that was launched with Calendar at 6pm each business night. It ran properly in all Apples operating systems until I Hit Maverick(OSX10.9). From then on, the AppleScript would run from one to 3 days, then would disappear from the Calendar entry. The Calendar alert would still run, but the "OpenFile" section of the alert would disappear. I also was running elgato EyeTV HD during the day, so I would use energy saver to put my MacBook Pro to sleep at 12 Midnight and wake it again at 9am. I picked up a used Mac Mini to do the EyeTV stuff, provide AppleTV the files in H264 format through iTunes' media share, and found it had plenty of power to do the 6pm automated stuff simultaneously as well. Because I still wanted to run the OpenOffice Macro on my MacBook Pro at 6pm, and wanted to use it for a host of other things when I was on the road, I wanted it to sleep most of the time and only wake up automatically to run the 6pm OO Macro. When I called Apple about the issue I was having with Maverick and Calendar loosing the OpenFile command as part of the Alert Message, they told me the no longer supported answering AppleScript Questions but they now would support Automator questions. I pointed out that the OpenFile would also fail after one to three days if I used a Calendar Alert to launch an Automator App. At first, I did not like Automator, but now I see why Apple is pushing us to use it. Automator adds a TIME STAMP ID to the Apps developed in Automator so the first time you launch the App after a change to it, you must reply to a dialog message saying that this is the first time you are running this version of the App. If a Scammer has replaced your app with one that can reek havoc on your computer, the replacement app will not run unless you are there to agree that you know where the modified app came from and click the OK button to continue (BRILLIANT, Enhanced Security idea on Apples part). I also noticed that after Mountain Lion, the Applescript delay timing was all screwed up as well. Well I tried to use LaunchD Task Scheduler to circumvent the Calendar Problem and that worked until I upgraded to Yosemite Last week. Then LaunchD no longer worked and I am only into a few days of using The Calendar Launched Automator App to see if it will continue to run.
    But I think I solved the dilemma I was having with opening an Automator App in a Sleeping Mac. I Googled up the following question, "AppleScript to wake up computer".  I went thru several complex responses until I found this on that is INCREDIBLE EASEY! What came back was a brettterpstra.com  response from Feb 20th,2014. What it said, in a Quick Tip: caffeinated your Terminal Article,  if you wanted to wake a Mac from sleep, use the Terminal command named "Caffeine -u -t 1". I placed it in an Automator Most Used Action called "Run Shell Script -- Caffeine -u -t 1" and it worked!  Now, I can put my Mac to Sleep but at 6pm, the Automator App will launch, run the "Caffeine -u- -t 1" command and proceed to work as if I had awakened the Mac From Sleep mode by pressing a keyboard key and had run the Automator Script with a double click.
    Sorry for the long, drawn-out reply, but maybe this will help others.

  • Is there a script that Quickly get the Equidistant and The same size images.

    Is there a script that Quickly get the Equidistant and The same size images.
    General,I used the paste into the interior one by one, when it is a lot ,will waste a lot of time

    Is there a script that Quickly get the Equidistant and The same size images.
    General,I used the paste into the interior one by one, when it is a lot ,will waste a lot of time

  • IDCS6(MAC) 10.9.4 - a script that will make an anchored object and paste in clipboard contents

    I'm trying to create a script that will create an anchored object that will paste in clipboard contents.
    So far I have:
    var frameRef = app.selection[0];
        var parentObj = frameRef.insertionPoints.item(0);
        var anchorFrame = parentObj.rectangles.add();
    And this works fine, creating an inline object, that can further be defined (with anchor point settings etc).
    However, it is when I go to use app.paste() or app.pasteInto() that all hell breaks loose.
    The line of code I added was:
    anchorFrame.content = app.pasteInto();
    and the error I get is:
    What am I doing incorrectly?
    Colin

    @Colin – For the paste command you like to use, you have to:
    1. First select an object, in your case the added rectangle object
    2. Then use the pasteInto() method from the app object
    3. There is no content property for a rectangle object
    Watch out what is selected after you added the rectangle.
    What you have is a selection of the text frame when you start your code in line one.
    Adding a rectangle will not change that selection.
    The following code will do the job.
    However, if you use pasteInto() the pasted objects could be only partly visible inside the frame.
    Depends on the size and position of the added rectangle relative to the original copied page items.
    Make sure that you give the rectangle a proper size after or while you are adding it:
    var frameRef = app.selection[0];
    var parentObj = frameRef.insertionPoints.item(0);
    //Will add a rectangle sized 40 x 40 mm
    var anchorFrame = parentObj.rectangles.add({geometricBounds:[0,0,"40mm","40mm"]});
    app.select(null); //Optional
    app.select(anchorFrame);
    app.pasteInto();
    Uwe

  • Simple script that will export the coordinates (layer bounds - top left x,y)

    Hi,
    I'm looking for a simple script that will export the coordinates (layer bounds - top left x,y) of the layers to an seperate xml/txt file.

    Your screen capture looks like it's from Photoshop.
    In InDesign sub layers are page items, the containing layer has no dimension. So you could get all the page item's x, y, width, height. But you might have to consider groups and then the layering could be very complex. The stacking order could also get complex. Page items have an index, but it's relative to its parent container.

  • "A script that will delete perfstat snapshots older than 90 days with SPPURGE..."

    Hello to all my fine Oracle related friends...We are all one large extended Family...
    I want to create a script that will execute SPPURGE on Perfstat for snapshots that are older than 90 days.
    Now, I have Grid 12c Cloud Control up and running for all the Databases that we have...
    Should I use Grid 12c to execute the SPPURGE and just pass the parameters in like that?
    Or should I go "Old School" and make a Shell Script and schedule it in the crontab?
    What would you guys do?
    I want implement this for 41 "Standard Edition" Databases....some are "Data Guard".....
    Thanks,
    Xevv.

    Xevv Bellringer wrote:
    Hi Ed,
    I tried executing this manually and it's not deleting the snapshots at all.
    begin
    statspack.purge(trunc(sysdate-90),true);
    end;
    I even let it for an entire day and then altered the code like this...But when I execute it, it doesn't deleted the data..
    begin
    statspack.purge(trunc(sysdate-1),true);
    end;
    When I do a select sysdate -1 from dual; it gives the correct date?
    Could there be a "NLS Setting" some where causing this?
    How do you determine that it is not deleteding data?  (please show evidence)
    How, and how often, are you collecting a statspack snapshot?  (please show evidence)

  • I have an iphone 4s, I installed Vtok but the video chatting part of the app is not working when I try to chat with my husband through gmail on his PC. Can I fix this or is there another app that will let me chat with my gmail chat contacts?

    Vtok video chatting is not working on my iphone 4s. When I try to do a video chat with my gmail chat contacts who are using a PC we each only get the voice part of the chat and no video. Is there some way to fix this or is there another program that will let me video chat with my gmail chat contacts? Thank you.

    You can not merge accounts.
    Apps are tied to the Apple ID used to download them, you can not transfer them.

  • CS4 will not open Nikon D7000 NEF files; Is there a DNC that will open them?

    I have CS4 and Light Room 2
    Apparently there is no Camera Raw update for the new Nikon D7000 NEF files for CS4.
    I therefore down loaded the Adobe Digital Negative Converter Verson 6.3.0.79 which is compatible with Camera Raw 5.4 or later. 
    Using that DNC, when I do step 1, "Select the images to convert" I get the message "No items match your search".  It apparently is not recongnizing the D7000 NEF files.
    Is there another DNC that will open and convert the D7000 NEF files?

    I just bought the d7000 yesterday and was experiencing the same issue with cs4. I downloaded the DNG converter from adobe and selected the whole folder where the raw files were located (I was unable to select individual images) and it worked fine. It processed the files one by one with new name (without the $500 CS5 pricetag for now). The DNG files open in bridge and psd. Perhaps try selecting the folder?  Good luck.

  • I need a script that will find the computer a user last logged into.

    I am still learning scripting, I need a script that will allow me to pull in usernames from a csv file. Find what computer they last logged into and output that to an csv file.
    I have looked all over and can't find exactly what I need.
     I found the following script but I need  to add the resuitsize unlimited but can not figure out where to put it we have a large environment. Also I need to be able to grab username from a csv file. Any assistance you can provide is appreciated.
    ##  Find out what computers a user is logged into on your domain by running the script
    ##  and entering in the requested logon id for the user.
    ##  This script requires the free Quest ActiveRoles Management Shell for Active Directory
    ##  snapin  http://www.quest.com/powershell/activeroles-server.aspx
    Add-PSSnapin Quest.ActiveRoles.ADManagement -ErrorAction SilentlyContinue
    $ErrorActionPreference = "SilentlyContinue"
    # Retrieve Username to search for, error checks to make sure the username
    # is not blank and that it exists in Active Directory
    Function Get-Username {
    $Global:Username = Read-Host "Enter username you want to search for"
    if ($Username -eq $null){
    Write-Host "Username cannot be blank, please re-enter username!!!!!"
    Get-Username}
    $UserCheck = Get-QADUser -SamAccountName $Username
    if ($UserCheck -eq $null){
    Write-Host "Invalid username, please verify this is the logon id for the account"
    Get-Username}
    get-username resultsize unlimited
    $computers = Get-QADComputer | where {$_.accountisdisabled -eq $false}
    foreach ($comp in $computers)
    $Computer = $comp.Name
    $ping = new-object System.Net.NetworkInformation.Ping
      $Reply = $null
      $Reply = $ping.send($Computer)
      if($Reply.status -like 'Success'){
    #Get explorer.exe processes
    $proc = gwmi win32_process -computer $Computer -Filter "Name = 'explorer.exe'"
    #Search collection of processes for username
    ForEach ($p in $proc) {
    $temp = ($p.GetOwner()).User
    if ($temp -eq $Username){
    write-host "$Username is logged on $Computer"

    If you are querying by user "resultset size" will be of no use.
    You also have functions that are never used and the body code doe snot look for users.
    Here is what you scrip looks like if printed well.  It is just a jumble of pasted together and unrelated items.
    ## Find out what computers a user is logged into on your domain by running the script
    ## and entering in the requested logon id for the user.
    ## This script requires the free Quest ActiveRoles Management Shell for Active Directory
    ## snapin http://www.quest.com/powershell/activeroles-server.aspx
    Add-PSSnapin Quest.ActiveRoles.ADManagement -ErrorAction SilentlyContinue
    $ErrorActionPreference = "SilentlyContinue"
    # Retrieve Username to search for, error checks to make sure the username
    # is not blank and that it exists in Active Directory
    Function Get-Username {
    $Global:Username = Read-Host "Enter username you want to search for"
    if ($Username -eq $null) {
    Write-Host "Username cannot be blank, please re-enter username!!!!!"
    Get-Username
    $UserCheck = Get-QADUser -SamAccountName $Username
    if ($UserCheck -eq $null) {
    Write-Host "Invalid username, please verify this is the logon id for the account"
    Get-Username
    get-username resultsize unlimited
    $computers = Get-QADComputer | where { $_.accountisdisabled -eq $false }
    foreach ($comp in $computers) {
    $Computer = $comp.Name
    $ping = new-object System.Net.NetworkInformation.Ping
    $Reply = $null
    $Reply = $ping.send($Computer)
    if ($Reply.status -like 'Success') {
    #Get explorer.exe processes
    $proc = gwmi win32_process -computer $Computer -Filter "Name = 'explorer.exe'"
    #Search collection of processes for username
    ForEach ($p in $proc) {
    $temp = ($p.GetOwner()).User
    if ($temp -eq $Username) {
    write-host "$Username is logged on $Computer"
    I suggest finding the original code then use the learning link at the top of this page to help you understand how it works in Powershell.
    ¯\_(ツ)_/¯

  • Is there an App that will sync with microsoft outlook calender?

    Is there an App that will sync with microsoft outlook calender?

    OK here is a problem I have with my calender- all the events are added mutible times for each event- at least 4 of each. So how do I get all of these mutiable events down to just one event. Now this also includes hollidays and personel events  on the calender from outlook. All this I think happened after sync to Cloud- not sure, could have happened after OS 5 update!!! Now this is on my iPhone 4. Now going to my calender on my home computer in outlook no events or holidays are showing in the outlook my calender. If I go to the icloud calender it has mutiable events and holidays like on my iPhone. Now how do I fix this without causing a problem with my other programs?

  • Is there a cable that will go from my hp psc 500 printer to a usb port on my computer.

    Is there a cable that will go from my hp psc 500 printer to a usb port on my computer.
    This question was solved.
    View Solution.

    Hi there dcjoe,
    A lot of places carry the cables you are looking for. Though your area may vary I have found them in places like radioshack and wal-mart. Here is a google shopping link to get you started. Let us know if this helps.
    Best of Luck!
    You can say thanks by clicking the Kudos Star in my post. If my post resolves your problem, please mark it as Accepted Solution so others can benefit too.

  • Is there a download that will allow me to play videos requiring Adobe Flash?

    Is there a download that will allow me to play videos on my iPad2 that require adobe flash?

    None of them get sterling reviews, go to http://www.appshopper.com, set it to iPad and search for Flash.

Maybe you are looking for

  • Scandisk in Solaris 10

    Hi all. I'm a new solaris 10 user I look like have a problem with my solaris partition. My question : 1. how can i use windows's scandisk or other program in windows to scan solaris partition ? 2. What program in solaris to use like scandisk ? thanks

  • Photoshop cs5 liquify filter shows no effect until after clicking OK

    I"m using photoshop cs5 and the liquify filter dosen't show any effect until after I've clicked ok. I've checked, and unchecked "show backdrop" and the opacity is set to 100%. I'm stumped.

  • Will my albums disappear?

    Two questions: (1) If I transfer my iPhoto files to an external drive, will the albums involving those pix also disappear? and (2) When I view the pix from my external drive, using iPhoto, will the albums I created also be there? Thanks so much for y

  • What exactly sap xi support work..?

    Hello Folks,   Can anyone tell me the what will be the exact job of an a xi consultant in support period of a project.? I mean what will be his roles n responsibilities in the support work of a project. Kindly give me the information. Thanks in advan

  • Enterprise Manager Login fails!

    We just installed Oracle 8i under NT 4.0 (sp 6) and the Enterprise Manager Client on a different NT Workstation. Enterprise Manager will not let us log in. We use the default sysmgr/oem_temp and we get invalid userid/password message. We also install