Automator

GPap

macrumors regular
Original poster
May 5, 2014
151
1
Hello,
does anyone uses the Automator application ? I want to make an event to open a site at specific time with Calendar but I can't. (For example when I'm trying to open Calendar with Automator returns me an error)
I have Mavericks (10.9.2)

Thanks
 
Last edited:

GPap

macrumors regular
Original poster
May 5, 2014
151
1
I'm trying to record some actions with Automator recording but returns an error ("check your properties and run the workflow again"). I also check the box which the application can handle my computer in System Preferences. Any idea ?
Thanks
 

BrianBaughn

macrumors 603
Feb 13, 2011
6,349
934
Baltimore, Maryland
You should first write an Applescript to do what you want (open the browser, go to the url in the browser) to make sure it does what you want it to. Then use automator to make a new Calendar Alarm item to run that script. Save it and a new "Automator" calendar will be created in Calendar and the event will be in that calendar at the present time...at which point you can copy or move it where you want to.
 

GPap

macrumors regular
Original poster
May 5, 2014
151
1
You should first write an Applescript to do what you want (open the browser, go to the url in the browser) to make sure it does what you want it to. Then use automator to make a new Calendar Alarm item to run that script. Save it and a new "Automator" calendar will be created in Calendar and the event will be in that calendar at the present time...at which point you can copy or move it where you want to.
Hi, thanks for your answer to my first post (at this thread), I have this odd problem with all the above :

When I lunch the app manually first and then lunch the same app from Calendar everything works perfect.
But if I lunch the app from Calendar without lunch it first manually gives me "a problem with one notification".

*I also have a problem with recording with Automator as I said in my second post in this thread.
 

BrianBaughn

macrumors 603
Feb 13, 2011
6,349
934
Baltimore, Maryland
I think you need to verify that the script by itself will do the action that you're trying to trigger. Shut down all apps before running the script for your test.
 

GPap

macrumors regular
Original poster
May 5, 2014
151
1
I think you need to verify that the script by itself will do the action that you're trying to trigger. Shut down all apps before running the script for your test.
Are you talking about Recording procedure or for launching the app from Calendar ?
In the first case returns the same error (I shutten down all my apps).
In the second case I verify my script, but doesn't work from Calendar if I don't running the app first manually.
 

BrianBaughn

macrumors 603
Feb 13, 2011
6,349
934
Baltimore, Maryland
Start from scratch.

Open Automator. In Automator, Choose "Calendar Alarm". Type "applescript" in the automator search box. Drag "Run Applescript" into the workflow area.

Replace

Code:
(* Your script goes here *)
with

Code:
do shell script "open http://macrumors.com"
replacing the URL with the one you want. Click File>Save and the calendar item should appear with the time set to the instant you hit save...also the URL should open. Now move, copy, rename etc the event to where you want. I think you have to leave it in the Automator calendar...not sure.
 

GPap

macrumors regular
Original poster
May 5, 2014
151
1
Start from scratch.

Open Automator. In Automator, Choose "Calendar Alarm". Type "applescript" in the automator search box. Drag "Run Applescript" into the workflow area.

Replace

Code:
(* Your script goes here *)
with

Code:
do shell script "open http://macrumors.com"
replacing the URL with the one you want. Click File>Save and the calendar item should appear with the time set to the instant you hit save...also the URL should open. Now move, copy, rename etc the event to where you want. I think you have to leave it in the Automator calendar...not sure.
It works only if I run my app first manually (not from the Calendar) and then from the Calendar.
 
Last edited:

GPap

macrumors regular
Original poster
May 5, 2014
151
1
Maybe someone else here can test it...works on my system.

What happens if you run the script in Applescript Editor?
If I run it as AppleScript I have the same issue :
It works but I have to run it first manually else not work.
This force with all applications (Automator apps, Core apps, Third-party apps).

I spoke with Technical Support of Apple in USA and we can't solve it !!
 
Last edited:

GPap

macrumors regular
Original poster
May 5, 2014
151
1
That's odd. You probably know a system reinstall may be in order.

Have you tried opening an app via Terminal?
I reinstalled my OS (Mavericks) before 2 days but nothing change.
Could you tell me how can I open apps from Terminal ?
 

GPap

macrumors regular
Original poster
May 5, 2014
151
1
If Safari is open, shut it down (Quit).

Now open Terminal and at the prompt type:

Code:
open -a Safari
It works but this is not my problem, how to open apps.
The problem is to open apps at schedule time with Calendar.
 

Bruno09

macrumors 68020
Aug 24, 2013
2,202
146
Far from here
Hi,

don't understand what your problem is.

Just tested and it works fine.

In Automator you need to create a new "Calendar Alarm".

Use the sole item "run a shell script".

Copy paste into it :

Code:
open http://macrumors.com
Save the file (Cmd + s) under the name "Macrumors".

It will automatically be saved in : ~/Library/Workflows/Applications/Calendar
(as an application).


Now in Calendar create a new event, alert : "open the file", Other, browse to "macrumors".

This will work even if your web browser is not already launched by the time of the alert.

Done.
 
Last edited:

BrianBaughn

macrumors 603
Feb 13, 2011
6,349
934
Baltimore, Maryland
It works but this is not my problem, how to open apps.
The problem is to open apps at schedule time with Calendar.
Sorry. Just trying to get to the root of the problem. The Automator action previously mentioned works fine for me and probably the vast majority or Mac users. If you think I'm wasting your time you should probably try another forum.
 

GPap

macrumors regular
Original poster
May 5, 2014
151
1
Hi,

don't understand what your problem is.

Just tested and it works fine.

In Automator you need to create a new "Calendar Alarm".

Use the sole item "run a shell script".

Copy paste into it :

Code:
open http://macrumors.com
Save the file (Cmd + s) under the name "Macrumors".

It will automatically be saved in : ~/Library/Workflows/Applications/Calendar
(as an application).


Now in Calendar create a new event, alert : "open the file", Other, browse to "macrumors".

This will work even if your web browser is not already launched by the time of the alert.

Done.
Thank you but it gives me an error ("error with one notification, cannot open the app"). If you read the conversation from start I think you will understand.

----------

Sorry. Just trying to get to the root of the problem. The Automator action previously mentioned works fine for me and probably the vast majority or Mac users. If you think I'm wasting your time you should probably try another forum.
Thanks for your help, I never think that you waste my time. The Apple technical support said to me "You discovered a bug on Mavericks" so I think the problem is very rare.
 

Bruno09

macrumors 68020
Aug 24, 2013
2,202
146
Far from here
I did read from start, and had the same problem and same warning message as you have when I tried to save the processus as an Application in Automator.

However, after I tried again by creating a new Calendar Alarm in Automator, this does work fine.

Just in case, try mine :
http://demo.ovh.eu/fr/784e719003f39aed9c43d1cfe441ae5b/

You can keep it in the Downloads folder, it will work as well.
EDIT : NOPE, does not work.
EDIT2 : works again, and ONLY if the file is located at : ~/Library/Workflows/Applications/Calendar

See if you still have the same problem.
 
Last edited:

GPap

macrumors regular
Original poster
May 5, 2014
151
1
I did read from start, and had the same problem and same warning message as you have when I tried to save the processus as an Application in Automator.

However, after I tried again by creating a new Calendar Alarm in Automator, this does work fine.

Just in case, try mine :
http://demo.ovh.eu/fr/784e719003f39aed9c43d1cfe441ae5b/

You can keep it in the Downloads folder, it will work as well.
EDIT : NOPE, does not work.

See if you still have the same problem.
It works as app (when I lunch it from Finder) but it not works as a Calendar Event.
 

GPap

macrumors regular
Original poster
May 5, 2014
151
1
I have this problem with all the apps (if I try to open them from Calendar) not only with Automator apps.
 

Bruno09

macrumors 68020
Aug 24, 2013
2,202
146
Far from here
Just did some more tests.

I can confirm that the file (.app) MUST be located at :

Macintosh HD/Users/username/Library/Workflows/Applications/Calendar

Other locations don't work.
 

GPap

macrumors regular
Original poster
May 5, 2014
151
1
Just did some more tests.

I can confirm that the file (.app) MUST be located at :

Macintosh HD/Users/username/Library/Workflows/Applications/Calendar

Other locations don't work.
My library is hidden, how can I show it ? I mean with Finder.