"Ring-ring" script for iCal.

Hi everyone,
I wondered whether someone could help this ammeter create his script
I want to make a script that plays the iChat videoconference "Ring" sound continuously in the background untill I click "OK". I will then use this in iCal, by selecting my script under the "Alarm" section for the event.
Unfortunately I am pretty much an absolute beginner with AppleScript. So far I have come up with this that doesn't work and if it did, wouldn't even do what I want:
global Play_Count
set Play_Count to 0
tell application "Finder"
open document file "Ringer.aiff" of folder "Scripts" of folder "Documents" of folder "Samtherocker" of folder "Users" of startup disk
end tell
tell application "QuickTime Player"
repeat while Play_Count is less than 5
rewind
play front movie
set Play_Count to Play_Count + 1
end repeat
end tell
I know that this script does not do what I want to achieve but I thought I'd add it to show what I'd done so far.
If anyone can help me or point me in the right direction that would be great. Also, can anyone reccommend a good book/website for learning AppleScript?
Sam

John that was great!
I think that you were right in saying that the script was more complicated than I really needed, so I took the bits from the script that I was lacking and added a few more and came up with this:
tell application "Finder"
open document file "Ringer.aiff" of folder "Scripts" of folder "Documents" of folder "Samtherocker" of folder "Users" of startup disk
end tell
tell application "QuickTime Player"
rewind
set looping of front movie to true
play front movie
set visible of every window to false
end tell
display dialog "Stop Alarm?" buttons {"OK"} default button 1
tell application "QuickTime Player"
quit
end tell
launch application "iCal"
It does exactly what I wanted it to do in the first place so thanks a lot John.
Sam
P.S. Can you recommend any good books/sites?

Similar Messages

  • Can you change the legth of time (or number of rings) it takes for on iphone 4 to time out making an outgonig call?

    Can you change the legth of time (or number of rings) it takes for on iphone 4 to time out making an outgonig call?
    Mostly it's to call in for radio contests. The Iphone is really good at making a quick call, but it seems to timeout after 15-20 rings. I realise this is a small thing, but free tickets is free tickets.
    Most commenst I see is abotu incoling calls, not outging.
    Thanks.

    No. You can't do this with any phone.

  • My iphone 4 speakers stopped giving me sounds when i play audio or video even while gaming. It works fine when ringing tunes of for voice mails. What is wrong with it?

    My iphone 4 speakers stopped giving me sounds when i play audio or video even while gaming. It works fine when ringing tunes of for voice mails, even works fine with headsets. What is wrong with it?

    well i'd seriosly say point a hot hair drier at the speakers as water has entered the phone most commonly via the home button but avoid getting it too hot let it cool every 3 minutes after constant drying. Don't worry I have honestly dont this with my iPhone 4 GSM 16GB. For future reference avoid letting it get wet.

  • After update to OS4.2.1 I can not get the ringer to work for incoming calls

    after update to OS4.2.1 I can not get the ringer to work for incoming calls. If I set Vibrate on, that's the only notification I get. Tried everything including blowing away ALL my apps and restoring phone to new. Lost all my apps but the ringer still won't ring

    God Bless u! LOL I have an otterbox case on my phone and had no clue that the mute button was there....Thank you so much!! The volume on my movies & everything else worked...even when I would go into "settings" and adjust the volume of the ringtone. I knew it was something simple...Thanks again..

  • Is there a way on my iPhone 4 to have it neither ring or vibrate for notifications?

    Is there a way on my iPhone 4 to have it neither ring nor vibrate for notifications?

    you should be able to go into settings and into the sounds submenu and disable sounds all together

  • Script for no sound when receiving spam

    Hi there, I'm looking for a script for Apple Mail that shuts off sound when a message that's labeled as spam comes in. I have several e-mail accounts running in Apple Mail. It happens often that while checking for new mail only spam comes in. It would be great if the notification stays silent in that case. Any ideas? TIA.

    EITHER YOUR RINGER IS NOT ON OR YOU HAVE GONE INTO SETTINGS AND TURNED SOUNDS DOWN THERE HOPE THIS HELPS

  • HT1338 Need Download Page to update dated iCal after upgrade to 10.6.8 from 10.5.8. Current version of iCal is on with 10.6.8 and would like to determine on my own if it is the latest version. Searching for iCal Downloads is beyond any useful outcome.

    Trying to find URL for iCal version downloads.
    Need to verify correct version of iCal for recent upgrade to OS 10.6.8.
    Current version of iCal is 4.0.4.
    Would prefer web address for downloads and not just a: "You've got the right version" "You need to download to" type of response to thread entry.
    Reason: iCal is spazing and duplicating current entrys on iPhone 4S iOS 6.3, and Quadrupeling and more current entrys as well as notifying me of calendar events that occurred seven years ago (random years) on my laptop running OS 10.6.8.
    Thinking that an update to iCal might be cure to refresh iCloud web address syncing and correct crazy notifications and doubling and tripling.. of iCal entrys.
    Thanks for the help, much appreciated.

    4.0.4 is the version of iCal for 10.6.8. You could try downloading and applying the combo updater for 10.6.8 -
    http://support.apple.com/kb/DL1399
    However Snow Leopard is not compatible with iCloud, so if you are somehow managing to make iCal sync with it it's a fudge and likely not to be reliable. Also, if you are syncing with iCloud you must avoid also trying to sync using iTunes - mixing two syncing methods is a quick way to problems.
    If your Mac is capable of upgrading to Lion or Mountain LIon that would give you proper access to iCloud and a higher version of iCal.
    The requirements for Lion are:
    Mac computer with an Intel Core 2 Duo, Core i3, Core i5, Core i7, or Xeon processor
    2GB of memory
    OS X v10.6.6 or later (v10.6.8 recommended)
    7GB of available space
    To purchase it you will have to ring Apple at the number given at the bottom left of this page.
    The requirements for Mountain Lion are listed here:
    http://www.apple.com/osx/specs/
    It is available from the Mac App Store (in Applications). (If you are currently pre-Snow Leopard you will have to upgrade to that to access the Mac App Store: it's available in the online Apple Store.)
    You should be aware that PPC programs (such as AppleWorks) will not run on Lion or above; and some other applications may not be compatible - there is a useful compatibility checklist at http://roaringapps.com/apps:table

  • Shutdown script in iCal event keeps running at boot

    I'm using 10.7
    I created an Applescript to force shutdown at a given time.
    It goes like this:
    do shell script "shutdown -h now" password "adminpassword" with administrator privileges
    When I boot the computer again, the script runs again, immediately shutting down the computer before I can even do anything.
    I've tried using TinkerTool to disable the resume feature on iCal, iCal Helper and Finder, but that doesn't help.
    Any ideas how to disable resume on this applescript? Is the fact that it's resuming even the problem?
    Thanks in advance for any help!

    This was solved with help from a user in another forum.
    Instead of the script I was using, he recommended this:
    tell application "System Events" to shut down
    It doesn't force-quit any open apps, but I found other scripts for that, so the problem is solved.

  • Affecting the "From" address for ical invites

    Does anyone know of any scripts that help adjust the "from" address for ical invites? I use 6 or so addresses for different purposes (almost all gmail), and it is helpful if I can send invites from a specific address which the intended recipient is used to seeing from me, else I risk it being sent to their junk inbox, and (gasp) appearing unprofessional.
    Thanks.
    Matthew

    Hi Matthew,
    There are six handlers in the applescript (all staring with "on send..." or 'on show..."). Find the fifth one.
    The third to last line in the fifth handler is "send mymail". Replace this line with:
    -- Altered to open notifications in Mail.app without sending
    -- Original line quoted out below.
    -- send mymail
    set visible of mymail to true
    activate
    -- End Altered to open notifications
    Save and close the applescript.
    This modification has survived several updates in Tiger on my machine. I'd expect the transfer to Leopard will mean re-assessing it.
    John M

  • Is there a continuous scrolling month view for ical, like outlook?

    is there a continuous scrolling month view for ical, like outlook?

    Not as far as I know - but maybe things are different in iOS (I'm on OS X)

  • Creating SQL-Loader script for more than one table at a time

    Hi,
    I am using OMWB 2.0.2.0.0 with Oracle 8.1.7 and Sybase 11.9.
    It looks like I can create SQL-Loader scripts for all the tables
    or for one table at a time. If I want to create SQL-Loader
    scripts for 5-6 tables, I have to either create script for all
    the tables and then delete the unwanted tables or create the
    scripts for one table at a time and then merge them.
    Is there a simple way to create migration scripts for more than
    one but not all tables at a time?
    Thanks,
    Prashant Rane

    No there is no multi-select for creating SQL-Loader scripts.
    You can either create them separately or create them all and
    then discard the one you do not need.

  • Error while executing script for sharepoint online (office 365) - the remote server returned an error: (503) server unavailable

    error while executing script for sharepoint online (office 365) - the remote server returned an error: (503) server unavailable.
    I am creating many site collections reading records from sharepoint list using powershell in sharepoint online tenant (office 365).
    Few site collections are created and then getting above error so this error record will be skipped then few succeeding record processed then again getting error.
    pattern is like:
    success
    success
    success
    success
    Error
    success
    success
    success
    success
    success
    success
    error
    success

    Hi,
    As it is an online environment, to troubleshoot this issue in an easier way, I suggest you contact Office 365 Support to see if there is any useful information in
    the log files in the server side:
    https://support.office.com/en-us/article/Contact-Office-365-for-business-support-32a17ca7-6fa0-4870-8a8d-e25ba4ccfd4b?ui=en-US&rs=en-US&ad=US
    Best regards
    Patrick Liang
    TechNet Community Support

  • Custom calculation script for checkboxs

    Hello,
    Can anyone help me out with custom calculation script for this?  I have two mutually exclusive checkboxes that, when checked, I want to populate data into other text fields.
    If Checkbox1 is checked:
    Company1=Warehouse Alpha
    Address1=1234 Any Street
    City/State/Zip1= Los Angeles, CA 90020
    Contact Name1= Mr. Nice Guy
    Phone Number1= 213-854-8565
    Email1=[email protected]
    If Checkbox2 is checked:
    Company2=Warehouse Beta
    Address2= 5678 Awesome Blvd.
    City/State/Zip2= San Bernardino, CA 96545
    Contact Name2= Mr. Handsome
    Phone Number2= 909-824-8265
    Email2=[email protected]
    Thanks,
    Bryan

    So one has two check boxes and one wants them to be mutually exclusive. Name them the same and change the export value of the field. Try it and observe what happens as you check the different check boxes.
    You have described what happens if either box is checked but what happens when a checked box Is unckecked?
    One can place scripts in many locations. I would use a mouse up action for both the check boxes, use the same script for both check boxes.
    I would assume you are using the following names for the fields to populate:
    Company
    Address
    CityStateZip
    ContactName
    PhoneNumber
    Email
    // Mouse up action for both check boxes;
    // initial value for the fields:
    this.getField("Company"),value = "";
    this.getField("CityStateZip"),value = "";
    this.getField("ContactName"),value = "";
    this.getField("PhoneNumber"),value = "";
    this.getField("Email"),value = "";
    // test for check box value for selected box;
    if(event.value == 1) {
    this.getField("Company"),value = "Warehouse Alpha";
    this.getField("CityStateZip"),value = "1234 Any Street";
    this.getField("ContactName"),value = "Los Angeles, CA 90020";
    this.getField("PhoneNumber"),value = "213-854-8565";
    this.getField("Email"),value = "[email protected]";
    if(event.value == 2) {
    this.getField("Company"),value = "Warehouse Beta";
    this.getField("CityStateZip"),value = "5678 Awesome Blvd.";
    this.getField("ContactName"),value = "San Bernardino, CA 96545";
    this.getField("PhoneNumber"),value = "Mr. Handsome";
    this.getField("Email"),value = "[email protected]";
    // end Mouse up action for both check boxes;

  • Sharepoint warmup script for https sites

    we want to warm up https site which is based on sharepoint 2010.
    When we run some sample powershells it shows access forbidden error so we are not able to warm up https site.
    Its slow on first load so need some warmup script for https sites.
    sharepointer

    Just ensure that the service account that you use to trigger the Powershell scripts has access to IIS and SharePoint.  Most often, the SharePoint Farm account would be used for scheduling the warm up scripts on the WFE server.
    I trust that answers your question...
    Thanks
    C
    http://www.cjvandyk.com/blog

  • WSUS script for pending reboot possible addition - How

    Hi, I am found script for pending reboot and script work perfectly. My problem is that script generate only pending computers reboot for master wsus server not for replica servers. Can I modify this script to generate pending reboot for all replica servers on
    one place(wsus master server) or I must run this script on every replica server. This is script:
    [reflection.assembly]::LoadWithPartialName("Microsoft.UpdateServices.Administration") | out-null
    if (!$wsus) {
    $wsus = [Microsoft.UpdateServices.Administration.AdminProxy]::GetUpdateServer();
    $computerScope = new-object Microsoft.UpdateServices.Administration.ComputerTargetScope;
    $computerScope.IncludedInstallationStates = [Microsoft.UpdateServices.Administration.UpdateInstallationStates]::InstalledPendingReboot;
    $updateScope = new-object Microsoft.UpdateServices.Administration.UpdateScope;
    $updateScope.IncludedInstallationStates = [Microsoft.UpdateServices.Administration.UpdateInstallationStates]::InstalledPendingReboot;
    $computers = $wsus.GetComputerTargets($computerScope);
    $report = @()
    $computers | foreach-object {
    $computer = $_.FullDomainName
    $updatesForReboot = $_.GetUpdateInstallationInfoPerUpdate($updateScope)
    $updatesForReboot | foreach-object {
    $temp = "" | Select Computer,Update
    $temp.Computer = $computer
    $temp.Update = ($wsus.GetUpdate($_.UpdateId)).Title
    $report += $temp
    $report | Select "Computer","Update" | Export-Csv -Path c:\..PendingReboot.csv -Delimiter 1 -NoTypeInformation

    Modified script
    work great. I have report from all replica server and master server after new updates
    from today. I am add mail option and finaly this is what I am modify:
    [reflection.assembly]::LoadWithPartialName("Microsoft.UpdateServices.Administration") | out-null
    if (!$wsus) {
    $wsus = [Microsoft.UpdateServices.Administration.AdminProxy]::GetUpdateServer();
    $computerScope = new-object Microsoft.UpdateServices.Administration.computerTargetScope;
    $computerScope.IncludeDownstreamComputerTargets = $true
    $computerScope.IncludedInstallationStates = [Microsoft.UpdateServices.Administration.UpdateInstallationStates]::InstalledPendingReboot;
    $updateScope = new-object Microsoft.UpdateServices.Administration.UpdateScope;
    $updateScope.IncludedInstallationStates = [Microsoft.UpdateServices.Administration.UpdateInstallationStates]::InstalledPendingReboot;
    $computers = $wsus.GetComputerTargets($computerScope);
    $report = @()
    $computers | foreach-object {
    $computer = $_.FullDomainName
    $updatesForReboot = $_.GetUpdateInstallationInfoPerUpdate($updateScope)
    $updatesForReboot | foreach-object {
    $temp = "" | Select Computer,Update
    $temp.Computer = $computer
    $temp.Update = ($wsus.GetUpdate($_.UpdateId)).Title
    $report += $temp
    $report | Select "Computer","Update" | Export-Csv -Path c:\yourpath...PendingReboot.csv -Delimiter 1 -NoTypeInformation
    $smtpServer = "your mail server"
    $att = "c:\yourpath...PendingReboot.csv"
    $msg = new-object Net.Mail.MailMessage
    $smtp = new-object Net.Mail.SmtpClient($smtpServer)
    $msg.From = "[email protected]"
    $msg.To.Add("[email protected]")
    $msg.Subject = "Pending Reboot"
    $msg.Body = "Your msg"
    $msg.Attachments.Add($att)
    $smtp.Send($msg)

Maybe you are looking for

  • Automatically update Equipment Hierarchy when confirming service order

    Hi Gurus, When I confirm the service order, the old part needs to be replaced by the new part. The requirement is that this replacement is done automatically in the equipment hierarchy after confirming the service order. ie.Equipment should get autom

  • Windows 8.1 Whea errors

    amm guys i have whea problems from the moment when i bought new power supply with 700 W im getting too many Whea errors most of the time when i play games..  There can be chances to be from the power supply? Before this 1 i had power supply with 550

  • No joy with Personal Domain

    Hi, 4 days ago I changed the CNAME for my domain to web.mac.com. - including the "www" and "*" records...and set my domain in .mac's personal domain settings. I uploaded a site to .mac a few days before... But nothing's happening when i try my domain

  • Z Creation of Business Role

    Hi, I am new in CRM and i want to create a business role for a one is for custmoer and one for Call center Agent. i know some tcode like CRM_UI_Profile  and PFCG but dont know how to create it. Can you explain me in Step by step manner or any priviou

  • HT2513 "Calendar Cache" couldn't be moved because you don't have permission to access "Calendars".

    It keeps on asking this question every time i open iCal. What do i do? please help!!!!