Possible to use "Write To File" to save a Keep note on Window 10?

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
totallyLost
Posts: 3
Joined: Mon Feb 12, 2024 11:13 am

Possible to use "Write To File" to save a Keep note on Window 10?

Post by totallyLost » Mon Feb 12, 2024 11:24 am

Hello all,

I'm not newbie enough to not know I can use "Write to File" to make a text file but newbie enough to not know if it's possible to use "Write To File" to "write" to a Keep note on Window 10? Please enlighten me :?

Klaus
Posts: 13977
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Possible to use "Write To File" to save a Keep note on Window 10?

Post by Klaus » Mon Feb 12, 2024 11:37 am

Hi totallylost,

as a Mac user I don't have the slightest idea what you are talking abount, resp. I am totally lost here. :-)

Best

Klaus

Klaus
Posts: 13977
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Possible to use "Write To File" to save a Keep note on Window 10?

Post by Klaus » Mon Feb 12, 2024 11:45 am

Oh, sorry, and welcome to the forum! :-)

totallyLost
Posts: 3
Joined: Mon Feb 12, 2024 11:13 am

Re: Possible to use "Write To File" to save a Keep note on Window 10?

Post by totallyLost » Mon Feb 12, 2024 11:59 am

Thanks for posting, Klaus (I used to be a Mac user, too)!

I should've made myself clearer, sorry. I'm using Google Keep to organize my notes. I sudden thought it would be really useful if Livecode apps could communicate with Google Keep (that is, the texts in the field on a card can be written to a Google Keep note). I know I can use the script "open file tFile for text write" to write to a text file onto the harddisk. Not knowing coding enough, I absolutely have no idea if this is even a stupid question :P

Klaus
Posts: 13977
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Possible to use "Write To File" to save a Keep note on Window 10?

Post by Klaus » Mon Feb 12, 2024 12:08 pm

Never heard of Google Keep, but
1. if this app (it is an application, right?) stores its files separately for each note in simple text format
2. and you know how these text files are structured internally and
3. you know where these files are stored
then this is surely doable. 8)

stam
Posts: 2990
Joined: Sun Jun 04, 2006 9:39 pm

Re: Possible to use "Write To File" to save a Keep note on Window 10?

Post by stam » Mon Feb 12, 2024 12:13 pm

Hi @totallyLost
So really nothing to do with Windows 10 or any other OS.
It's to do with Google Keep. That probably doable but has nothing to do with 'write to file' which writes a text to a file that has been opened with 'open file for write'.

As google is an online service you need to leverage it's REST API: https://developers.google.com/keep/api/reference/rest
The commands you'll need are likely 'set the htmlHeaders' and put/get/post to URL

Klaus
Posts: 13977
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Possible to use "Write To File" to save a Keep note on Window 10?

Post by Klaus » Mon Feb 12, 2024 12:31 pm

AHA! :-)
Thanks for the clarification, stam!

stam
Posts: 2990
Joined: Sun Jun 04, 2006 9:39 pm

Re: Possible to use "Write To File" to save a Keep note on Window 10?

Post by stam » Mon Feb 12, 2024 12:41 pm

Note that it's not that straightforward... I'm no expert but think you need to create a google cloud developer account (from console.cloud.google.com, start a free trial - I think you'll never need to pay for single user access, but can't confirm), and create a private key for your openID (I think...)
You will probably have to log in with Oauth prior to using the Keep API, or google won't know who the data belongs to...

totallyLost
Posts: 3
Joined: Mon Feb 12, 2024 11:13 am

Re: Possible to use "Write To File" to save a Keep note on Window 10?

Post by totallyLost » Mon Feb 12, 2024 1:06 pm

Thank you so much for your input, stam!! What you described certainly goes past my basic hypercard-level understanding. But I'll leave that project on my bucket list and I'd share if I were able to inch forward; thanks again, Klaus and stam!

stam
Posts: 2990
Joined: Sun Jun 04, 2006 9:39 pm

Re: Possible to use "Write To File" to save a Keep note on Window 10?

Post by stam » Mon Feb 12, 2024 1:30 pm

Let us know how you get on!

Logging into google cloud services with oauth2 and manipulating their cloud apps is certainly one of the things I've been meaning to learn, but it's much lower priority so haven't got round to it (yet)...

I know people have had varying degrees of success with it but suspect older examples are no longer valid because Google has a habit of forgetting the past, changing things as it sees fit and even dropping services with little/no warning. But it should be doable!

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”