How to make use of protected ranges in Google App Script? - range

As of 8th august it is possible to have protected ranges in spreadsheets. How can I access this functionality in my scripts? Thanks

I would say you might simply need to wait for GAS to "catch up" with new features in Google Spreadsheets, or perhaps raise this as a feature request in the issue tracker.
If it were to be implemented, I presume it would as a setProtection() method on a range object, as it can be done now on a sheet object.

Related

Office-Js Word Add In: Detect user change in document/ how to use bindingdatachanged functionality

New Office-js user, I'm working on an advanced find and replaced plug in for efficiency purposes, has anyone had any luck detecting a change to a word document? What I'd ideally love is that whenever text is changed/edited, I could trigger my function. I've been looking into addHandlerAsync(Office.EventType.BindingDataChanged, onBindingDataChanged);, but can't seem to figure out the proper use case for this code to attach it to the word document. I also would need a way of caching the before and after state, which I've seen people mention but again haven't seen any code examples for it.
I'm very aware that this will probably cause issues with that frequent running, so equally if anyone had any experience debouncing/throttling events in office js, or delaying them to set intervals that would equally be awesome.
Many thanks in advance!
Office JavaScript API (OfficeJS) doesn't provide any event for handling document changes. You may vote for the existing request file few days ago, see Office.js Word Document content changes for more information.
You can post or vote for an existing feature request on Tech Community where they are considered when the Office dev team goes through the planning process.

Is there a way to obtain details on triggers in Google Scripts?

Basically I am aiming to make an easier interface for managing time based triggers that control Google Scripts So far I have not found anything that would allow me to get details on the current triggers, specifically trigger times. There seem to only be a handful of methods supporting trigger management currently.
Documentation:
Class Trigger
Thanks for any suggestions or pointers!
The Apps Script documentation also contains Managing Triggers Programmatically, which is a very promising title.
However, this sums it up:
The only way to programmatically modify an existing trigger is to delete it and then create a new one.
Sometimes we find undocumented APIs by playing with auto-completion, but there don't seem to be any for Triggers at this time.
I tried this little gem, hoping to get logs full of trigger information:
var triggers = ScriptApp.getProjectTriggers();
for (var i in triggers) {
Logger.log(Utilities.jsonStringify(triggers[i]));
}
All I got was "Trigger" repeated ad nauseum. So no help there, the Trigger object is locked down.
I'm surprised that there's no request in the Issue Tracker against the Triggers Component to add APIs to get this additional information, or to support more programmability. You should add one, and report it here so others can star it (cast their vote).
Per #Mogsdad 's suggestion I have submitted a feature request via the Issue Tracker
. Please go and cast your vote for this issue and add any other suggestions for the request. The issue is fairly broad and there may be a lot of detailed information that could be useful if the right API is created. So please add comments in the issue tracker if there are parts you feel need to be addressed in an expansion of the current Trigger API.

How to save Lync conversation history when Corp has blocked this feature?

I am using Lync 2010 (4.0.7577.4356), which we use on my small development team for IM'ing. Lots of technical Q&A are handled through this program and lots of other items that need to be documented. Unfortunately, our parent company has a policy that turns off "Converation History", so once the window is closed, it's gone.
I've done a fair bit of research and I haven't found a way to save this data since the settings have been made at our parent Corporation's level (through Active Directory, or whatever). This is information that we need and even my boss has tried finding a way to save this information (everything short of copy-pasting everything before closing the window or computer).
How can I accomplish this task? Are there any programs out there (freeware or otherwise) that can save these conversations? Does anyone know of a way that I can hook up Lync (the instant messaging module) to another instant messenger (GTalk, Jabber, ICQ, Yahoo, or whatever) -- then record each message from there? I'm a software developer, so if anyone knows of a means of communicating with Lync, and is able to access the messages, that would help too!
Anything at this point would help... thanks in advance!!!
-Panuvin
Try this https://github.com/bujocek/LyncIMLocalHistory. I've used the Tom Morgans answer and created own local lync (Skype for Business) conversation history tracker.
You can build it from source or just unpack and run latest release here: https://github.com/bujocek/LyncIMLocalHistory/releases
There's a client-side Lync SDK, which is pretty easy to use if you're already a .NET developer.
It's easier to do something like this and have it running on every member of your small dev team's machine alongside Lync - easier than trying to re-invent a central conversation store.
I recently blogged about recording the length and status of Conversations, and also about identifying different sorts of Call within the Conversation (you'd be looking for Instant Message Call type).
After that, you'd need to subscribe to the Flow and catch every message to and fro, and log them to a database or whatever. There's a really good book which could help you with this: Unified Communications with Microsoft Lync. If you're serious about doing Lync development, this is definitely the book for you!
With Lync 2013, CTRL+S will save the current tab to your Outlook/Exchange Conversation History folder. I'm not certain if this works with 2010.
You may try this: https://github.com/PhilippeRaemy/LyncLog.
This tool saves the conversations in text files, using a file naming convention that makes it easy to identify the time and participants.

ClearCase: Email Notification on Deliver

At my new company, the CMS is ClearCase. I've worked with Perforce before and it had a nice built-in notification mechanism for the team to keep up-to-date with files that changed in the project. I'm trying to have something equivalent in ClearCase. I would like to know if someone have achieved this before.
Basically, there is three requirements :
Have a way to subscribe to a project. One receives only notification on projects it has subscribed to.
When someone deliver an activity, all the subscribers of the impacted project
receive an email notification about that activity.
The email contain the list of the files affected by this activity. Each modified file has a link that perform a diff that shows what this activity change in this file.
So is someone is aware of a module/extension or any other existing way to put that in place or do I have to do all this manually with trigger and perl scripts ?
Thanks,
Martin
we wanted the same here, so we are using a trigger called ucm_complete_delivery.pl that can be found on CM Crossroads.
You need to apply this trigger to your PVOB (as it's a UCM trigger).
Once you have applied it, you need to define the following Custom Attributes on your UCM component(s):
auto_baseline_email user_1#mydomain.com,user_2#mydomain.com,etc...
It's a bit painful as the mailing list as to be maintained by hand (or you need to use group mail address), but it's better than nothing. :)
Cheers,
Thomas
I am not sure if that already exist, I am sure it is not provided natively with the UCM product.
May be a more specialized forum like CMCrossroad have more informations, but you already put a question there ;)
Anyhow, the simplest way to implement such a notification would be to have a process following new baselines made on a stream.
Each baseline being composed of activities, it would be simple to list those.
Each baseline being easily compared with its previous baseline, it would be simple to list the file versions, and build the appropriate diff.
As for the users following a project, I would suggest as a "subscription mechanism" the list of views of one of the streams of a project: any user having a view on (one of the streams of) that project is potentially interested.
The general implementation principle would be through post-operation triggers, as described in the "Ten best triggers" article
AFAIK, almost all CC operations can have triggers (in Perl, IIRC)
You need to add an email trigger to the deliver operation. Long, long time ago I saw a simple example. But you have to take care of keeping the subscription list and email the appropriate persons.

How to modify a recurrent PayPal payment

I’m trying to implement the following scenario:
User approves a recurrent weekly payment (subscription) for a selected package size
Every week the user can:
a. Cancel a specific week delivery and avoid paying for this week
b. Modify the package size and pay less/more for this time only
c. Add additional items and get charged for them in addition to theweekly package
Looking at the documentation I did not find the APIs that allowing me to modify the subscription according to my needs.
Can someone please direct me to the right documentation or provide a code snippet?
Thanks,
Yossi
I think this is unsupported. You may wish to look into subscription management services like Spreedly and Zuora.com for these use cases.
I don't believe this is possible. I'm trying to implement a similar thing. What I've tried is to issue a subscription modification with a free trial period. But it seems that the trial period parameters (a1,t1,p1) are ignored on a subscription modification. I've found some (unofficial) references that free periods cannot be inserted into an existing subscription, which is exactly what we need.
I'm pretty bummed this isn't supported. I cannot think of a clean way around it.