I am working on a project for my company’s HR dept regarding our sexual harassment video. The requirements are that the first time a new employee uses his new computer, a browser will open automatically and display the video’s web page. Here is what i did for the Windows computers:
created a batch file and it is placed in the startup folder for all users
2)the batch file opens iexplore in kiosk mode so they have to watch the video before they can do anything
3)the batch file then deletes itself so it wont execute on the next boot
I want the same functionality on the mac computers. I messed around with some Applescript and created one that will open Safari in what Apple calls “full screen” (but I call large windowed) and open the video site. So this accomplishes part of the goal but not all of it.
Can someone help out? I would really appreciate it.
That wont work. The video is on a site I created and once the video finishes it forwards them to another page with the agreement they digitally sign acknowledging they have watched the video.
This script activates Safari, make a new document if necessary, opens “macscripter.net” and goes full screen.
The line containing “Enter Full Screen” assumes (US) english language settings
tell application "Safari"
activate
if not (exists document 1) then make new document
set URL of document 1 to "http://macscripter.net"
end tell
tell application "System Events"
tell process "Safari"
pick menu item "Enter Full Screen" of menu 1 of menu bar item "View" of menu bar 1
end tell
end tell
Save the script as application named “SafariAutoStart” somewhere and add it to the login items
The additional lines delete the login item and delete the application itself
set pathToMe to (path to me)
tell application "Safari"
activate
if not (exists document 1) then make new document
set URL of document 1 to "http://macscripter.net"
end tell
tell application "System Events"
tell process "Safari"
pick menu item "Enter Full Screen" of menu 1 of menu bar item "View" of menu bar 1
end tell
delete login item "SafariAutoStart"
end tell
do shell script "rm -r " & quoted form of POSIX path of pathToMe