Get notification about deletion/move/update a group of InDesign document

Hello

I checked the script for InDesign CC 2015 object model and came across the group.addEventListener feature.

I tried to add an event listener for the group, but I get no notification in my role as Manager. Here's the code I used:

myGroup.addEventListener(Event.BEFORE_DELETE,  function() {
    alert("aaa");
    }
);

On the suppression of the group, the handler function is not called. Anyone know how to add the listener of events on the Group?

HM.

Back to your code, trying to listen for the BEFORE_DELETE event.

Basic idea:

You could sneak into a graphic placed in the group you are trying to watch.

Add a group to a document.

Place an image to the group.

Or group with a placed image.

Select the group, run the following code, and try to delete the group.

Unfortunately the listener will react too, if you cut the group as well as its image.

#targetengine shieldMyGroupFromExtinction

// A group is selected, that contains one single image.
// The container of that image is not deeper nested in that group.

if(app.documents.length == 0){exit()};
if(app.selection.length == 0){exit()};
if(app.selection[0].constructor.name !== "Group"){exit()};

// The group, that should be watched indirectly, must be selected before running the script
var myGroup = app.selection[0];
var myLink = myGroup.allGraphics[0].itemLink;

app.documents[0].addEventListener(Event.BEFORE_DELETE, alertThis);

function alertThis(event)
{

    if(event.target.id == myLink.id)
    {
        event.preventDefault();
        alert("You are not allowed to remove that. This will be undone!");
    }

};

Note:

BEFORE_DELETE works exclusively with links.
Maybe you could use that in a different way.

Uwe

Tags: InDesign

Similar Questions

  • Get notifications about Adobe downloads daily

    I get notifications for Adobe downloads every day.  I have only run when I am invited to do tasks I'm doing, as access to financial institutions who say my edition is outdated and I have to upgrade to continue. Whenever I update, it creates all sorts of problems on my laptop which has not been the case and is obviously the result of the download. I need to restore my computer to a date before downloading and things are working normally again.

    I have Adobe, and I obviously want the latest versions. What can I do to make sure that Adobe updates don't disrupt my computer?

    In addition to the answer of John John MVP ...

    Where you see the pop-up windows to update Adobe Flash Player, you may want to take a look at: http://malwaretips.com/blogs/remove-urgentflashupdates-com-virus/

    See you soon,.

    J

  • How to get information about the important updates.

    Original title: How can I find a list of the updates, I really need and I can uninstall and how uninstall you unnecessary updates.

    I use a laptop computer Inspiron 1525 32-bit Home Premium Windows Vista 4 GB. I don't even think that I have enough for all the updates that Microsoft sends. I really need help to find out what I really need and what I don't. I'd give even Windows mail I really don't use it and it does not work with my web mail att.net. I use Gmail as a program of additional e-mail I can send pictures with this program. What is most important here is I don't think I need all of these updates! I use Microsoft Security essentials to my anti-virus program. I'm an average user of PC with average knowledge about running and maintenance of my PC. This issue is beyond my scope. Thanks for all those who might be able to help me.

    Hello Madeline,.

    Welcome to Microsoft Community where you can find all the answers related to Windows.

    According to the description, it looks like you want to learn more about the updates of Windows that are important and not Important.

    I have a few links that should guide you in the right direction.

    Important updates provide significant benefits, such as improved security and reliability. You can also set Windows to automatically install recommended updates, which can address non-critical problems and help enhance your computing experience. Optional updates are not downloaded or installed automatically.

    Method 1:

    Updates are additions to software that can help to prevent or fix problems, enhance the operation of your computer, or improve your computing experience.

    Visit this link and see "can I choose which updates Windows automatically installs?"

    http://Windows.Microsoft.com/en-us/Windows-Vista/Understanding-Windows-automatic-updating

    Method 2:

    Visit this link and indicate "Do I need to download and install updates?"

    http://Windows.Microsoft.com/en-us/Windows-Vista/updates-frequently-asked-questions

    In addition, visit this link and check:

    Install Windows updates

    http://Windows.Microsoft.com/en-in/Windows-Vista/install-Windows-updates

    Hope this information helps. In case you have issues with Windows, post here to Microsoft Community.

  • Get information about deleted virtual machines

    Is is possible to get information on who has erased a VM, or at least when it has been deleted using vCenter Server logs?

    Thank you

    The cmdlet Get-VIEvent, by default, returns only the 100 events.

    Use the - MaxSamples parameter with a very large number to see some results.

    Get-VIEvent - MaxSamples 99999.
    where {$_.gettype ().} Name - eq "VMRemovedEvent"} |
    Select @{N = "VMname"; E={$_. Vm.Name}},

    @{N = "Createduserid"; E={$_. Createduserid}},
    @{N = 'Host'; E={$_. $host.name}},

    @{N = 'User'; E={$_. User name}} |

    Export-Csv "C:\VM-deleted-audit.csv" - NoTypeInformation - UseCulture

  • How to get the items selected from indesign Document?

    Hi all

    I'm trying to get the objects selected by the user in the indesign document, to which the following code, I wrote, but his does not collect do not.

    LayoutTarget InterfacePtr < ILayoutTarget > (myContext, UseDefaultIID());

    if (layoutTarget == nil)

    {

    () CAlert::ErrorAlert

    "layouttarget sucks" );

    breaking ;

    }

    UIDList itemList = layoutTarget-> GetUIDList (kStripStandoffs);

    where mycontext is IActiveContext and after getting the itemlist (all managers of related texts).

    How to perceive the limits of the textframe? (TopLeft, TopRight, BottomLeft, BottomRight).

    Thanks and greetings

    Sanjeev.k

    You must initialize the ILayoutTarget with a CSB. As

    InterfacePtr iLayoutCSB (iSelectionManager-> QueryConcreteSelectionBoss (kNewLayoutSelectionBoss));

    InterfacePtr layoutTarget (iLayoutCSB, UseDefaultIID());

    HTH.

    Jasmine

  • I have updated the references of the bank card and still get notifications of information with countdown, is this normal?

    I have updated the references of the bank card and still get notifications of information with countdown, is this normal?

    FAQ: What should I do if I have a subscription, but my application acts as if I had a trial?

    https://forums.Adobe.com/thread/1962238

    To contact support - for the link below click on the still need help? option in the blue box below and choose the option to chat or by phone...

    Make sure that you are logged on the Adobe site, having cookies enabled, clearing your cookie cache.  If it fails to connect, try to use another browser.

    Creative cloud support (all creative cloud customer service problems)

    http://helpx.Adobe.com/x-productkb/global/service-CCM.html ( http://adobe.ly/19llvMN )

  • Hi all, I have 5 LR I purchased with a serial number and a week ago I got the message about a new update, I want to get LR 6 but not the creative cloud, LR4 LR5 to last time it was just an update without having to buy the creative cloud ,

    Hi all, I have 5 LR I purchased with a serial number and a week ago I got the message about a new update, I want to get LR 6 but not the creative cloud, LR4 LR5 to last time it was just an update without having to buy the creative cloud is it possible to LR5 LR6 to? Thank you very much.

    Jeffrey

    Yes, you can buy Lightroom without subscribing to Adobe Creative Cloud.

    To purchase an upgrade to Lightroom 6 from a previous version, please see this link: products .  Scroll to lightroom and click 'buy '. Then click on the selectable text next to "I want to:" and select "upgrade". In the drop-down list, select the version that you are upgrading.  I hope that help.

    Best regards

    Guinot

  • How can I stop getting notification of update as a beta-test user of Firefox. I won't be on this list.

    I get notifications of a new version of Firefox. I think I've been on the list of users to beta test and I won't be on this list. I'm not active enough to be of any use to you, dear friends. Thanks for a great product.

    You have probably installed which was one of the beta versions of a version in time and then on the beta channel.

    An easy way to return to the output channel is to install Firefox 34 of https://www.mozilla.org/firefox/all/

    35.0 Firefox is on channel beta because there have been six versions so far with nine being the average.

  • How can I get rid of unwanted software update message?

    How can I get rid of unwanted software update message?

    Mac Book Pro, OS X 10.9.5.

    On 3 June 2016, I received a notice to update software for my Brother printer. Driver version 4.0. I don't remember if I downloaded it in fact. Then I went on the site of brother and checked for the last update which proved be driver version 4.5. I have successfully downloaded that. On 10 June, I received a software update for the old driver version 4.0 again. I don't want to install an older driver, but I can't get rid of the nagging update notice. Too late, it got installed when I was composing this message. So, if I reinstall the 4.5 update and I get another message of updated software for the 4.0 update, how do I get rid of him?

    When I select the update of the software community, he rises to the Windows software and I can't change it.

    I used to get update notifications for flash. I uninstalled it and now they don't bother me. And updates to OS normal mac, can be disabled app store mac settings.

    In your case, I can say, try to delete the brother driver and install again, if it you nags once more.

  • Apple Watch doesn't show notifications after 2.2 update

    I update my iPhone of 6 to 9.3.1 and Apple Watch to 2.2 and now I don't get notifications on my Apple Watch. I've already restored IPhone and Apple Watch several times and only works for the first text and message. that nothing comes to the watch. Look at the forums and I tried everything and anything and nothing. NO NOTIFICATIONS COME THRU TO THE APPLE WATCH. WORKING FINE BEFORE THE UPDATE.

    Hello

    Remember that how behave notifications depends on the State of your devices. In order to provide notifications to your attention as soon as possible:

    -If your iPhone is unlocked, you will receive notifications on your iPhone instead of on your watch.

    -If your iPhone is locked or mode and your watch is unlocked (regardless of the question of whether the screen saver is awake or asleep) and on your wrist, you will receive notifications on your watch.

    -If your watch is locked or allowed to do not disturb, notifications will be sent to your iPhone.

    More information:

    About notifications on your Apple Watch - Apple Support

  • Delete the update files?

    I want to delete the update files to make more room in my C drive, but I don't know what is the result if I did. Is there anyone can tell me? Thanks in advance!

    Hello Alonda,

    Thanks for the response on the answers.microsoft.com forum.

    It seems that you are really wanting to get free space on your hard drive.  Certainly understand this importance.  Did you run a disk cleanup?  Do this by => click Start ORB-> computer-> right click on your drive Local (usu. C :) and select properties-> under a general tab, click Disk Cleanup

    Disk Cleanup will usually present your files can be deleted without reprecussions.  Also, most of the files that you can delete Windows putting updates in question the question about WINSXS, get lodged in this folder.  Here is an article of Nice forum describing the WINSXS file a little more away.

    http://social.technet.Microsoft.com/forums/en-us/itprovistaannouncements/thread/9411dbaa-69ac-43a1-8915-749670cec8c3/

    Please let us know if this helps you with this situation or if assistance is needed.

    Thank you, Debbie
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Hoax call on notifications about a virus tries to hijack your computer and ask for help to remove the files?

    OT: security.

    Dear community,

    Did anyone out there contacted by "windows" say you they receive notifications about a virus tries to hijack your computer and ask for help to remove the files? Initially, it was an area code 855, but now the number is unavailable. I get a lot of calls.

    any help would be appreciated

    Thank you

    Hello

    It's a scam.

    Here are the tips that we regularly give the posters who receive these types of calls:

    We have all the errors and warnings in our Event Viewer

    Either these so-called "Microsoft" Tech companies want to sell you a worthless software, or remote access to your computer to try to steal your credit card and bank information and also achieve an identity theft on you.

    You are the only person who knows if you gave them remote access.

    If you gave them remote access and you do Internet banking, contact your bank, to explain, and change passwords.

    If you use your online credit card, cancel and get a new one issued to you.

    And the only way that willl you know that you are free to them is to backup your data and do a clean install of your operating system.

    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

    And Microsoft does not contact you unless YOU have made prior arrangements with them to do.

    There is an article in the link I'm you provide at the end of this one

    Read this Information from Microsoft:

    "Avoid scams to phone for tech support.

    http://www.Microsoft.com/security/online-privacy/avoid-phone-scams.aspx

    Don't be fooled of unsolicited calls. Don't provide personal information.

    Here are some of the organizations that cyber criminals claim to come:

    • Helpdesk Windows

    • Windows repair center

    • Microsoft technical support

    • Microsoft technical support

    • Windows Support Group Technical Department

    • Microsoft Research and Development Team (team of Microsoft R & D)

    See you soon.

  • The download starts and gets to about 50 MB before the zone State says down load failed after refresh

    Hello

    I just had to update my laptop Azus Windows 8.  I reinstall all my programs.  All my financial records are Open Office, so I need to reinstall the program.  The download starts and gets to about 50 MB before the zone State says down load has failed.  This happens no matter if I choose run or save.  I lowered my security settings for IE but still not completely download.  I downloaded Open Office earlier this year with no problems.  It must be something that I am missing.  Please help I need to do my job.  Thank you

    Do you have any error messages at all when you try to download?

    What utility Antivirus you have installed? Have you tried to disable it temporarily and and see if they work?

    Have you tried to save the download to a different location on the hard drive such as the desktop?

    Have you tried using another user account?

    What type of Internet connection you are on, wired or wireless? If you are on a wireless connection, try switching to a wired connection and try the download.

    Press the Windows key + X

    Click prompt (Admin)

    At the command prompt, type the following command, press ENTER.

    ipconfig/release

    then

    ipconfig/renew

    then

    ipconfig/flushdns

    leave the command prompt

    Press the Windows key + R, type: folder

    Press enter

    Delete the contents of the temp folder

    Restart the computer and try to download again.

    If the problem persists, try resetting your router if you are connected to one.

    Turn off the router, unplug it, wait 10 minutes

    Plug it in again, power up once again

    Reconnect the Ethernet cable

    Try to download again

    You can try to download free Office instead which can OO.org Open files.

    http://www.LibreOffice.org/download/

  • Get notifications on my watch for app removed

    For my iPhone 6 s and look, I used an application called team Stream by Bleacher report. I chose the preference "not not mirror iPhone" do not get notifications on my watch, but stay get them on the iPhone. However, notifications continue on my watch. I deleted the app on my watch to try to solve the problem but despite the app isn't only not on the watch more I get always constant notifications. Should I delete the app on my iPhone? Very frustrating.

    Hello

    The following steps may help:

  • AVG says your messed up my Verizon Yahoo's email server. The line that bed, delete, move, not spam, but... does not load. I can see my email, I just can't open

    I spent over 5 hours in computer shares with AVG. They said your server messed up my email account. I can access my email account, but the line that reads "delete, move, not spam, more' loads ever... so I can't delete the email or anything else. My email account is to verizon yahoo. I need access to my email for various reasons, one of them being pay several bills online and my email account is where to get confirmation that the payment has gone through! My email works through IE, however. I don't want to use IE to see my email... I use Firefox for everything and it would be a pain in the end to have to switch to IE to access my mail. Not to mention, I hate IE - it's like using WEBTV! It's so slow... [address removed by email, please do not provide sensitive information in a public forum] is my email...

    So Safe Mode made no difference?

    To test how Firefox works no 'custom' on your system, could you experience in two minutes?

    Create a new Firefox profile

    A new profile will be your plugins installed by system (for example, Flash) and extensions (e.g., security suite toolbars), but no themes, other extensions or other customizations. It should also have databases of completely fresh settings and cool a cache folder.

    Out of Firefox and start in profile to help Manager start > run:

    firefox.exe -P
    

    Do not delete anything here.

    Any time want to switch profiles, exit Firefox and return to this dialog box.

    Click on the button to create a profile, assign a name like TEST and skip the option to choose a different folder location. Then launch Firefox in the new profile that you have created.

    Yahoo does not improve in the new profile?

    When you return to the Profile Manager, you might be tempted to use the button Delete a profile on TEST. It's a little too easy to accidentally delete your 'real' profile, so I recommend you to resist the temptation. If you don't want to clean up later, I suggest to make a backup of all your profiles first in case something go wrong.

Maybe you are looking for

  • iPhoto in Sierra

    Hey,. I am El Capitan running on my iMac end of 2013 and is considering moving to Sierra, but I have a few questions. To point iPhoto has been disabled at the time where the new photo app was introduced (which I think is a stupid idea) but after an u

  • Internet Security recommended the new iMac?

    I just bought a new iMac and does not see the suggested internet security applications. I used Webfoot on my Windows PC, but no one has mentioned get the software for the iMac. Is this necessary? Recommended?

  • USB key will be always analyzed

    English is not my native, so I'm sorry if I make mistakes. My Toshiba laptop (windows 7) open the USB drive too long. Whenever I plug a USB key, he asks me to analyze the stick and check if there are errors, or proceed without analyzing. The problem

  • Security mode of the user to the issue of the domain

    Hi all I want to change the security mode of the user in the field. Real users added manually are not a domain user. And I want to allow access to different users in the field to get in all actions. When I change domain mode: I should create local us

  • YouTube will not full screen size even stay Safari 9.0.2 or 1/4

    I'm on an Imac 27 inch Running Yosamite 10.10.5. Safari is version 9.0.2 I emptied my Cache and my history and cookies disabled. I also rebooted. If I play youtube via safari it won't have a full screen. I have to click pause and press play, then he