Cannot paste code into Google script - google-apps-script

I am trying to paste the sample code from the Google script tutorial into the script editor as instructed - but the code does not get transferred. I highlight the sample code, right click & select copy, position on the Google script editor, remove the existing code as instructed, right click and paste and nothing gets transferred.
To prove that the copy worked I pasted successfully into Notepad. Any ideas? I have windows 7 & IE11.
Help!

Some fields are designed to not accept paste data, you see that allot on register forms where you are forced to type in your email and password manually, maybe something like this is happening there.

Related

When a SINGLE user opens their shared Doc, Prompt for authorisation?

I have no idea how to attempt this, nor do I know if it's possible and I have no code to show. However, I shall be sending a doc created from a template to whoever filled a form in.
The script I want to run is to create a custom menu so they can click a button and send the doc to another person. This works. perfectly. The script even gets copied when the Doc is made from the template.
But the script that is copied won't run or even prompt me without manually going in the script editor and clicking run. the script will fail because it's supposed to run on open, but it gets auth.
I know you can't run shared scripts without user auth, unless it's published, That's not a route I'm taking. I just want the good old white google authorisation box to pop up as soon as they open the google doc they receive.
Any suggestions/ideas/code?
Cheers
Please refer to the documentation at https://developers.google.com/gsuite/add-ons/concepts/addon-authorization. Add-on authorization is what you may need to implement.

How can I remove a bound script from a Google Sheets Spreadsheet?

I have a spreadsheet where I first created a bound script file (via Tools->Script Editor). I then (at a later time) was exploring the File menu and hit Make A Copy. I now get a "Select a project to open" with the original "myAddOns" and "Copy of myAddOns" as the choices. I would like to remove the copy. I found it in the scripts My Projects page, but when I try to remove it the original spreadsheet also gets removed. (Pulled it back out of Google Drive Trash folder)
Am I stuck with this?
Thanks!
It turns out that (as the project owner) using the File->Delete Project once I open the Script Editor works. Not sure how I got messed up before.
Turns out that all of us can forget how to do this. Thanks for asking the question. In the new editor, this feature is found in Project Details, then to the far right. Click the Trash Can that warns "Delete Project Forever". Yes, please. Hope this helps someone in the future.

Do Google Apps Scripts have a Copy URL?

I'm wondering if there is a way to share a link to a Google Apps Script file that forces users to make a copy of it? Using Google Docs, you can append /copy to the url. For example:
https://docs.google.com/document/d/19yoQ71RcqNsYgPmZHzw96G_QH05hC20sWxk_ktahpXY/copy
This will force users to make a copy of the original document. I've been trying to do something similiar with a Google Apps Script file.
I've tried appending copy to the URL like this but it doesn't seem to work. As a potential work around, I could just use embedded scripts and share the Sheet/Doc/Form.
Anyone know of a URL parameter to force copying of a Google Apps Script file?
You can use this format to quickly make a copy of any public Google Script.
https://script.google.com/d/SCRIPT_ID/edit?newcopy=true
See example.
There is no way to do this since the new editor has been rolled, have reported it on this issue:
https://issuetracker.google.com/issues/198266388
You can manually make a copy on the new editor by going to the "Overview" tab, and on the top-right is the button to make a copy.

How can I remove a project from a Google Spreadsheet?

I made a copy of a Google Apps Script project by mistake by choosing File > Make a copy... on Script Editor and since then every time I click Tools > Script Editor... on the Spreadsheet screen the project belongs to, I see a screen showing the two projects (original one and copied one) and I need to choose one to open the script editor. To be worse, the original script became unexecutable since I made the copy, I don't know if this is the cause of that though.
So, I'd like to remove the copy project from the Spreadsheet. How can I do that? I can't find any menu to remove project.
Thanks,
Open the "copy of" version of the script, click File -> Delete Project... This will generate a confirmation box. Click the Delete button to confirm that you would like to delete the project. This should leave your original as the only associated script.

Cannot copy script to Google Script Project

I am trying to copy this source http://pastebin.com/s7v5x4jk to a file a in a Google Script project for a spreadsheet. The problem is that not all the text gets copied when I do a copy and paste. Is there a way to upload files to Script Projects or to get around this?
How to replicate:
Open a Google Spreadsheet, go to Tools->Script Editor and create a new project, try to copy all the text to the file.
You've got one very long line, perhaps that's overwhelming the editor. (There are 132000+ characters in line 10.)
You will able to paste the code into an Apps Script file by putting it through a prettifier first. A better alternative would be to use the development version, which isn't minified.