5

So in my standalone Google Script, I have to take in a user input that will ultimately allow me to get information about a user's Google Calendar.

The CalendarApp object does not have a getUI() method nor a "Tools > Script editor" menu command.

So I've been told that "The script can prompt the user for input and then call on the Calendar API to do something like add a Calendar event."

I just have no idea how to prompt the user from a standalone script without the getUI() method. Thanks!

Anthony
  • 311
  • 1
  • 3
  • 13
  • You will have to build a webapp. Doc here https://developers.google.com/apps-script/guides/web – Serge insas Apr 25 '15 at 16:25
  • @Sergeinsas ok makes sense, but in the link you provided, it says "f you build a user interface for a script", and I just want to know how do you even build a user interface for the script before deploying it. All I need is to just take in a string from the user and that's it – Anthony Apr 25 '15 at 16:34
  • You have to build a small user interface using HTMLService, there are examples in the documentation here : https://developers.google.com/apps-script/reference/html/ and here : https://developers.google.com/apps-script/guides/html/ – Serge insas Apr 25 '15 at 16:54
  • why not trying the JQUERY UI to get your date value ? see example (among [many others](http://stackoverflow.com/search?q=%5Bgoogle-apps-script%5Djquery+date) on this forum) :http://stackoverflow.com/questions/21489253/using-html-service-get-date-input-calendar-pop-up/21491856#21491856 – Serge insas Apr 25 '15 at 21:05
  • @Sergeinsas does jquery differ greatly from javascript, becuase my project has to be coded in Google Scripts. I'll look into the link – Anthony Apr 25 '15 at 21:38
  • JQUERY is a JavaScript library that can be used in Google Apps script, there is a demo webapp in the answer I referred to. – Serge insas Apr 25 '15 at 21:44
  • 1
    by the way - if you create a new apps script file in google drive and then choose "Web App", you will also get a good example of how to use jquery in a web app. – Tesseract Apr 26 '15 at 06:33
  • Hi there @Anthony! Follow the examples shared above to build and interface, and check out the [web apps structure guide](https://developers.google.com/apps-script/guides/web?hl=en) and [HTML service best practices](https://developers.google.com/apps-script/guides/html/best-practices?hl=en). Feel free to drop a comment if you need further help. – Jacques-Guzel Heron May 02 '22 at 07:24

0 Answers0