Applescript help please?

Joined
Aug 22, 2010
Messages
11
Reaction score
0
Points
1
Your Mac's Specs
iMac 2.93 GHz Intel Core 2 Duo
Hi, i am an applescript noob and am interested to know if it's possible to have a short video play automatically fullscreen when i log on. I tried just adding the video to the Login items but all that does is open the video player when i log on.

is there a way to do this with applescript? can you help me figure out how?

orrrr if you are feeling really awesome today can you make an applescript for me?
 
Joined
May 19, 2009
Messages
8,428
Reaction score
295
Points
83
Location
Waiting for a mate . . .
Your Mac's Specs
21" iMac 2.9Ghz 16GB RAM - 10.11.3, iPhone6s & iPad Air 2 - iOS 9.2.1, ATV 4Th Gen tvOS, ATV3
Welcome to the forum josh ....

Havnt played with it myself but you might be able to do it with Automator ..... We have a Automator guru in here that goes by the name of McYukon and if he pops in he might have a idea, or find him and send a PM ...

cheers
 

Slydude

Well-known member
Staff member
Moderator
Joined
Nov 15, 2009
Messages
17,595
Reaction score
1,071
Points
113
Location
North Louisiana, USA
Your Mac's Specs
M1 MacMini 16 GB - Ventura, iPhone 14 Pro Max, 2015 iMac 16 GB Monterey
Try the following with Automator and see if it meets your needs. These directions assume that you are running the version of Automator that shipped with Snow Leopard. If not it should still work but you will see a slightly different screen to start when you launch Automator.

1. Launch Automator and when asked what you want to create choose "Application" You will now be at the main Automator window.
2. The window has several panes including one with a search box similar to Spotlight. In the search box type "Get Specified Movies". Drag the action that it finds into the area on the right.
If that action does not open to show an area for entering the name of your movie, double click the title bar for that action to expand the box. Use the Add button at the bottom to select the movie you want to play or drag the movie into this box.

3. Now enter "Play Movies" in the search box and put that action in the pane on the right. Expand the box if necessary to choose the playback size, display, and number of times the video will loop
4. Go to the search box, type "Quit Application", and drag that action below the others. In the drop down menu select Quicktime Player".
5. Click the run button at the top of the Automator window to test your work. Ignore the warning that appears. If all behaves as expected choose Save As in Automator to save your work.

I recommend saving it twice once as a workflow and once as an application. If you want to use a different video simply open the workflow version, choose a new video and save the results as an application. Add the Application version to your login items and it should play the next time you log in.

Notes: I used QuickTime Player but it could be modified to work with other players. I also did not make any volume adjustments to the movie though that should be possible if needed. If you get stuck let us know and I will see if I can send you the workflow
 
OP
T
Joined
Aug 22, 2010
Messages
11
Reaction score
0
Points
1
Your Mac's Specs
iMac 2.93 GHz Intel Core 2 Duo
thankss

@ tattooedmac thanks for welcoming me man

i tried what slydude said and i really think that will work however i ran into a problem,

"5. Click the run button at the top of the Automator window to test your work. Ignore the warning that appears. If all behaves as expected choose Save As in Automator to save your work."

when i got to the step above and tried to run an alert did come up saying i need to add "get specified finder item" to run in automator but i ignored it since he said to ignore the warning. I saved it as an application and put it into the login items but when i startup theres no video and an automator icon appears in the dock for a moment and disappears

any ideas what i did wrong?
 
Joined
May 14, 2009
Messages
2,052
Reaction score
136
Points
63
Location
Near Whitehorse, Yukon
Your Mac's Specs
2012 MBP i7 2.7 GHz 15" Matte - 16 GB RAM - 120 GB Intel SSD - 500 GB DataDoubler Mac OS 10.9
What kind of movie file are you trying to use? Also what OS.
The instructions that Slydude work in on my machine (OS 10.6.4).

I attached the script, you'll have to change the Movie file and save it as an application.

View attachment PlayMovie.zip
 
OP
T
Joined
Aug 22, 2010
Messages
11
Reaction score
0
Points
1
Your Mac's Specs
iMac 2.93 GHz Intel Core 2 Duo
the movie file is .mp4

I'm running version 10.6.4

i also downloaded the script you gave me but the same still happens when i log on, i see an automator icon in the dock for a few moments and then it disappears.

could it be the movie file type?
 
Joined
May 14, 2009
Messages
2,052
Reaction score
136
Points
63
Location
Near Whitehorse, Yukon
Your Mac's Specs
2012 MBP i7 2.7 GHz 15" Matte - 16 GB RAM - 120 GB Intel SSD - 500 GB DataDoubler Mac OS 10.9
Yeh, it has something to do with the .mp4
Let me try to find out what it is.
 
Joined
May 14, 2009
Messages
2,052
Reaction score
136
Points
63
Location
Near Whitehorse, Yukon
Your Mac's Specs
2012 MBP i7 2.7 GHz 15" Matte - 16 GB RAM - 120 GB Intel SSD - 500 GB DataDoubler Mac OS 10.9
Ok, for some strange reason the Automator actions don't like .mp4 even through QuickTime can open them.
I would suggest opening the movie in QuickTime and then saving it as a Movie file .mov
Change the Automator script to the new file and it should work.
 
OP
T
Joined
Aug 22, 2010
Messages
11
Reaction score
0
Points
1
Your Mac's Specs
iMac 2.93 GHz Intel Core 2 Duo
fantastic!

it works!! =)
thank you very much for all the help everyone.

yea it was the .mp4 for some reason. once i changed it to .mov it worked perfectly
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top