Page 1 of 1

Livecode and calendar support

Posted: Wed Sep 07, 2016 5:51 am
by Opaquer
Hey all!

I'm working on a project at the moment, and one thing the user would like is to have is calendar support. They'd like to be able to make an event in the app that will link with a few other user's apps and their iCal account, and let them all see the calendar event. They also need to be able to change the details of the event if need be, such as if the job is completed yet. Unfortunately, I have no idea how to make Livecode talk to calendars :P. Also, they're looking to have a desktop version on Mac, and a mobile version on iOS, so ideally I'd be able to get something that would work with both desktop and mobile :)

Does anyone know of a way to make this happen? Or if there's an alternative instead of iCal (maybe if it's all done through the app with the calendar and details displaying there or something?)

Many thanks :)

Re: Livecode and calendar support

Posted: Wed Sep 07, 2016 1:29 pm
by MaxV
You can use applescript in livecode, for example:
########CODE#######
put "tell application "&quote&"Finder"&quote&cr& \
"open application file "&quote&"ical.app"&quote&" of folder "&quote&"Applications"&quote&" of startup disk"&cr& \
"tell application "&quote&"iCal"&quote&cr& \
"set theCalendarNames to title of every calendar"&cr& \
"end tell" &cr& \
"end tell" into tScript
do tScript as applescript
#####END OF CODE#####

Otherwise try to contact the creator of tCal, http://www.tcal.it/ , he knows how to deal with iCal and livecode.

Re: Livecode and calendar support

Posted: Thu Sep 08, 2016 5:21 am
by Opaquer
MaxV wrote:You can use applescript in livecode, for example:
########CODE#######
put "tell application "&quote&"Finder"&quote&cr& \
"open application file "&quote&"ical.app"&quote&" of folder "&quote&"Applications"&quote&" of startup disk"&cr& \
"tell application "&quote&"iCal"&quote&cr& \
"set theCalendarNames to title of every calendar"&cr& \
"end tell" &cr& \
"end tell" into tScript
do tScript as applescript
#####END OF CODE#####

Otherwise try to contact the creator of tCal, http://www.tcal.it/ , he knows how to deal with iCal and livecode.
Woah, that looks complicated! Would that work for iPhones and iPads too? Or just Macs?

I'll have a look into it though! Would Applescript let me also get information from the calendars, like job appointment times and all that?

Re: Livecode and calendar support

Posted: Thu Sep 08, 2016 8:33 am
by MaxV
On iOS applescrit is not supported, but you can use custom URL to send data to iCal.
Here is the guide, but at the present is not avaliable: http://lessons.livecode.com/m/4069/l/58 ... rl-schemes

Re: Livecode and calendar support

Posted: Thu Sep 08, 2016 8:51 am
by bn
Hi Opaquer,

have a look at what Bill Vlahos did:
http://forums.livecode.com/phpBB2/viewt ... 08&t=25046

Search the forum for "iCal"

For AppleScript I recomend

http://macscripter.net/index.php

Kind regards
Bernd

Re: Livecode and calendar support

Posted: Sun Aug 12, 2018 11:07 am
by trevix