Forked from oliveratgithub/LNGoogleCalSync-Launcher.applescript
Created
August 11, 2019 18:23
-
-
Save abdmun8/86444c54c196fcf914d1a4381f1c5f8c to your computer and use it in GitHub Desktop.
AppleScript to launch the "Lotus Notes to Google Calendar Synchronizer"-GUI (LNGoogleCalSync) in the background on macOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
---- This AppleScript is written to work with the Lotus Notes to Google Calendar Synchronizer on macOS | |
---- http://lngooglecalsync.sourceforge.net | |
---- AppleScript by oliveratgithub | |
-- Change below path to match the location of the "lngsync.sh" file! | |
property lngsyncPath : "/Applications/LNGoogleCalSync/" | |
---- You don't need to care about the code below this line ;-) | |
property lngsyncFilePath : lngsyncPath & "lngsync.sh" | |
on run | |
try | |
set shellOutput to do shell script lngsyncFilePath | |
if shellOutput does not contain "Running Lotus Notes Google Calendar Sync in GUI mode..." then | |
scriptError(shellOutput) | |
else | |
return | |
end if | |
on error errStr number errorNumber | |
scriptError(errStr) | |
end try | |
end run | |
on scriptError(errorMessage) | |
set myPath to (path to me as text) | |
display alert "Application not found" message "Application could not be started from | |
" & lngsyncFilePath & " | |
because of error | |
" & errorMessage & " | |
--> Or check the AppleScript to set the correct 'appPath'" as critical buttons {"Exit", "Edit Script"} default button "Edit Script" | |
set response to button returned of the result | |
if response is "Edit Script" then try | |
tell application "Script Editor" to open myPath | |
end try | |
return | |
end scriptError |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment