Is there an AppleScript or Automator Script that will wake a Mac from Sleep?

Is there an AppleScript or Automator Script that will wake a Mac from Sleep?

Frank and All,
The following answer to your question above is complicated, but I hope it explains why my question was formed with so much frustration in it.
I have an OpenOffice(OO) Macro that was launched with Calendar at 6pm each business night. It ran properly in all Apples operating systems until I Hit Maverick(OSX10.9). From then on, the AppleScript would run from one to 3 days, then would disappear from the Calendar entry. The Calendar alert would still run, but the "OpenFile" section of the alert would disappear. I also was running elgato EyeTV HD during the day, so I would use energy saver to put my MacBook Pro to sleep at 12 Midnight and wake it again at 9am. I picked up a used Mac Mini to do the EyeTV stuff, provide AppleTV the files in H264 format through iTunes' media share, and found it had plenty of power to do the 6pm automated stuff simultaneously as well. Because I still wanted to run the OpenOffice Macro on my MacBook Pro at 6pm, and wanted to use it for a host of other things when I was on the road, I wanted it to sleep most of the time and only wake up automatically to run the 6pm OO Macro. When I called Apple about the issue I was having with Maverick and Calendar loosing the OpenFile command as part of the Alert Message, they told me the no longer supported answering AppleScript Questions but they now would support Automator questions. I pointed out that the OpenFile would also fail after one to three days if I used a Calendar Alert to launch an Automator App. At first, I did not like Automator, but now I see why Apple is pushing us to use it. Automator adds a TIME STAMP ID to the Apps developed in Automator so the first time you launch the App after a change to it, you must reply to a dialog message saying that this is the first time you are running this version of the App. If a Scammer has replaced your app with one that can reek havoc on your computer, the replacement app will not run unless you are there to agree that you know where the modified app came from and click the OK button to continue (BRILLIANT, Enhanced Security idea on Apples part). I also noticed that after Mountain Lion, the Applescript delay timing was all screwed up as well. Well I tried to use LaunchD Task Scheduler to circumvent the Calendar Problem and that worked until I upgraded to Yosemite Last week. Then LaunchD no longer worked and I am only into a few days of using The Calendar Launched Automator App to see if it will continue to run.
But I think I solved the dilemma I was having with opening an Automator App in a Sleeping Mac. I Googled up the following question, "AppleScript to wake up computer".  I went thru several complex responses until I found this on that is INCREDIBLE EASEY! What came back was a brettterpstra.com  response from Feb 20th,2014. What it said, in a Quick Tip: caffeinated your Terminal Article,  if you wanted to wake a Mac from sleep, use the Terminal command named "Caffeine -u -t 1". I placed it in an Automator Most Used Action called "Run Shell Script -- Caffeine -u -t 1" and it worked!  Now, I can put my Mac to Sleep but at 6pm, the Automator App will launch, run the "Caffeine -u- -t 1" command and proceed to work as if I had awakened the Mac From Sleep mode by pressing a keyboard key and had run the Automator Script with a double click.
Sorry for the long, drawn-out reply, but maybe this will help others.

Similar Messages

  • Is there an Applescript or Automator action that can change Preferences in

    When I log on to my ISPs website to clean out my spam filter, the site redirects me to a second area that contains the filtered spam. Each time I access it I must change my "Accept Cookies from "Only sites you navigate to" to "Always". The problem is remembering to change it BACK. Is there an applescript or automator thingy that will allow me to to make these changes? I'm using Safari 3.1.2.
    Thank you.

    This question was answered in the Safari-for-Mac forum.

  • Is there an anti-malware add-on that will make Firefox disconnect from the internet by mistakenly clicking on an infected link!?

    Just wondering if there is an anti-malware add-on that will make Firefox disconnect from the internet by mistakenly clicking on an infected link!?

    In order to be able to find the correct solution to your problem, we require some more non-personal information from you. Please do the following:
    *Click the Firefox button at the top left, then click the ''Help'' menu and select ''Troubleshooting Information'' from the submenu. If you don't have a Firefox button, click the Help menu at the top and select ''Troubleshooting Information'' from the menu.
    Now, a new tab containing your troubleshooting information should open.
    *At the top of the page, you should see a button that says "Copy text to clipboard". Click it.
    *Now, go back to your forum post and click inside the reply box. Press Ctrl+V to paste all the information you copied into the forum post.
    If you need further information about the Troubleshooting information page, please read the article [[Use the Troubleshooting Information page to help fix Firefox issues]].
    Thanks in advance for your help!

  • Is there an automator script that automatically opens html links contained in a .txt file?

    I want to make safari automatically open any html files that I email to myself using Send to Dropbox. I need an automator workflow that will automatically open any html files that are sent as .txt to a certain folder in my dropbox. This is the code I currently have:
    ARGV.each do |f|
    file = File.new(f, “r”)
    while (line = file.gets)
    system “open #{line}”
    end
    file.close
    end
    What am I doing wrong?
    This is taken from this post: http://www.macstories.net/tutorials/how-to-send-any-webpage-from-ios-to-your-mac -browser/#comment-146806660.
    As a side note, does anyone know of an easy way to send links to iphone and vice-versa? I know there is the icloud tabs option but I want something that will automatically open when I click send. It ***** that Google Chrome already has the feature and it works perfectly but Apple has yet to adopt such an extension. I find it pretty useful.
    Any help would be appreciated.

    I forgot to mention that I keep getting this error...
    -e:2 automator invalid char `\342' in expression

  • IWeb Applescript and Automator - scripts you shouldn't be without

    Applescript and automator will automate mundane manual repetative task that seem to take forever. These scripts fill in iWeb's void that makes it hard to implement advance features such one click ftp publishing, code editing, swithching domain site files, etc. Don't miss out on these scripts that will save you ton of time. These are scripts you shouldn't be without.
    Work smarter not harder with iWeb applescript, only from MacEzzy.
    -- Also check out the free downloadable iWeb templates.
    Powerbook G4 Ti   Mac OS X (10.4.4)  

    Thank you for your feedback.
    -- Article never mentions compressed or uncompressed. Traditionally tiff format is used for buttons and small images on web pages and jpeg is used for higher quality photos exemplified by iWeb.
    -- Search engine spiders or crawlers start from top of the page to the bottom of html pages. They craw for topic as well as content. This is exactly what appears from iWeb html pages for meta (meta name="Generator" content="iWeb 1.0.1")
    -- I am the first to admit I don't know everything but I don't make up information. I use iWeb on a daily bases and try new things to push the envelope. Things that I find helpful to me I make it available for other iWeb community users so that they don't go through tribulation.
    -- I put google ads and paypal donate buttons throughout the pages to test if iWeb is up for commercial challenge. I also tested how well the search and replace script worked. I have exemplified in macezzy website it is possible to use iWeb for business purpose. The script worked extremely well, it would have taken hours to insert google and paypal codes manually. Using the script it only took 10 min. I wanted to share that with other users who might wanted to do similar things. Sorry if that offend you, I will remove them.
    -- I never claimed to have created the script except the script that makes the first folder in documents folder. I did change the wording so that it is clear to users that they are switching sites(domain file). I did not create the awesome search and replace script either. I do mention that I have made the iWeb_ftpUpload automator.
    I have started macezzy site when iWeb was introduced and there wasn't much information about iWeb. I have and do try many things with iWeb and report to iWeb community users of things that I find helpful. I haven't made a dollar off the site and I have invested lot of my time because I like to see other users succeed.
    Powerbook G4 Ti   Mac OS X (10.4.4)  

  • AppleScript or Automator script to Change Mail Subject

    The following AppleScrip works great with Microsoft Outlook and I tried to change the name to Mail and it did not work
    tell application "Microsoft Outlook"
              try
                        set theMessage to item 1 of (get current messages)
                        if class of theMessage ≠ incoming message then error -99
              on error
                        display dialog "please select an incoming message before running
    this script" buttons {"Abort"} default button 1 giving up after 10
              end try
              set oldSubject to subject of theMessage
              try
                        set newSubject to text returned of (display dialog "Enter New
    Subject:" default answer oldSubject)
              on error
      -- user cancelled
                        return
              end try
              set subject of theMessage to newSubject
    end tell
    What I am trying to do is create an Automator script that can be added to my usr/Library/Serices folder that will let me change the Subject of an OS X 10.7 Apple Mail message. 
    I am s novice on AppleScripts so some help will be appreciated

    The error I get when I edit Microsoft Outlook to Mail says
    Expected “,” but found plural class name.

  • Script that will help validate if there is any data loss after a DB restore

    Hi,
    I need to write a single script that will perform the following
    operations:
    1)return me the highy accessed tables across all databases.
    2)List the count, Min and Max system date of the highy accessed tables returned from step 1.
    The idea is to validate if there is any data loss to the highly transactional tables after a database restore operation has been performed.
    Thanks.

    Hello,
    I would also like you to see nice blog by Aron,you can modify the script a bit to change according to your need
    http://sqlblog.com/blogs/aaron_bertrand/archive/2008/05/06/when-was-my-database-table-last-accessed.aspx
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers
    Hello Shanky,
    The post would not be helpful too much for OP's requirement. The post was talking about when was the database last accessed. DMLs are not capturing in the script and also there will be many variant forms that can be applied for DML. Hence, I do not think,
    the script would help too much. 
    Or Am I missing something? 
    Latheesh as i mentioed OP has to modify the script little bit may be add User_seek,user_update,user_scans.Still IMO there is no *perfect* way to actually analyze this.So I pointed out point in my original post.Also unless he has some timestamp he cannot
    see min time when it was accessed ,max time can be taken from last user seek,scan,lookup time. Motive was to lethim know what he was trying to achieve cannot be axactly obtained by using sys.dm_index_usage_stats.Below query will give most accessed table
    : Source (Query)
    SELECT
    t.name AS 'Table',
    SUM(i.user_seeks + i.user_scans + i.user_lookups)
    AS 'Total accesses',
    SUM(i.user_seeks) AS 'Seeks',
    SUM(i.user_scans) AS 'Scans',
    SUM(i.user_lookups) AS 'Lookups'
    FROM
    sys.dm_db_index_usage_stats i RIGHT OUTER JOIN
    sys.tables t ON (t.object_id = i.object_id)
    GROUP BY
    i.object_id,
    t.name
    ORDER BY [Total accesses] DESC
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • IDCS6(MAC) 10.9.4 - a script that will make an anchored object and paste in clipboard contents

    I'm trying to create a script that will create an anchored object that will paste in clipboard contents.
    So far I have:
    var frameRef = app.selection[0];
        var parentObj = frameRef.insertionPoints.item(0);
        var anchorFrame = parentObj.rectangles.add();
    And this works fine, creating an inline object, that can further be defined (with anchor point settings etc).
    However, it is when I go to use app.paste() or app.pasteInto() that all hell breaks loose.
    The line of code I added was:
    anchorFrame.content = app.pasteInto();
    and the error I get is:
    What am I doing incorrectly?
    Colin

    @Colin – For the paste command you like to use, you have to:
    1. First select an object, in your case the added rectangle object
    2. Then use the pasteInto() method from the app object
    3. There is no content property for a rectangle object
    Watch out what is selected after you added the rectangle.
    What you have is a selection of the text frame when you start your code in line one.
    Adding a rectangle will not change that selection.
    The following code will do the job.
    However, if you use pasteInto() the pasted objects could be only partly visible inside the frame.
    Depends on the size and position of the added rectangle relative to the original copied page items.
    Make sure that you give the rectangle a proper size after or while you are adding it:
    var frameRef = app.selection[0];
    var parentObj = frameRef.insertionPoints.item(0);
    //Will add a rectangle sized 40 x 40 mm
    var anchorFrame = parentObj.rectangles.add({geometricBounds:[0,0,"40mm","40mm"]});
    app.select(null); //Optional
    app.select(anchorFrame);
    app.pasteInto();
    Uwe

  • "A script that will delete perfstat snapshots older than 90 days with SPPURGE..."

    Hello to all my fine Oracle related friends...We are all one large extended Family...
    I want to create a script that will execute SPPURGE on Perfstat for snapshots that are older than 90 days.
    Now, I have Grid 12c Cloud Control up and running for all the Databases that we have...
    Should I use Grid 12c to execute the SPPURGE and just pass the parameters in like that?
    Or should I go "Old School" and make a Shell Script and schedule it in the crontab?
    What would you guys do?
    I want implement this for 41 "Standard Edition" Databases....some are "Data Guard".....
    Thanks,
    Xevv.

    Xevv Bellringer wrote:
    Hi Ed,
    I tried executing this manually and it's not deleting the snapshots at all.
    begin
    statspack.purge(trunc(sysdate-90),true);
    end;
    I even let it for an entire day and then altered the code like this...But when I execute it, it doesn't deleted the data..
    begin
    statspack.purge(trunc(sysdate-1),true);
    end;
    When I do a select sysdate -1 from dual; it gives the correct date?
    Could there be a "NLS Setting" some where causing this?
    How do you determine that it is not deleteding data?  (please show evidence)
    How, and how often, are you collecting a statspack snapshot?  (please show evidence)

  • Is there an app for the ipad that will allow you to access your mac.

    Is there an app for the ipad that will allow you to access your mac via wifi or cell network.

    Yep, two of the most popular apps are "LogMeIn Ignition" and "iTeleport." Check them out, they'll both set you back by about 30$ though.

  • I use an email client that notify's you when a new email arrives in your inbox. On IE a window pop's up to let you know whith a chime. In Firefox the window opens but with no chime. Is there an extention or add on that will do this?

    I use an email client that notify's you when a new email arrives in your inbox. On IE a window pop's up with a chime that lets you know of new mail in your inbox. In Firefox the window pops up but with no sound. Is there an add on or extention that will do this?
    == User Agent ==
    Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; NISSC; .NET CLR 1.0.3705; .NET CLR 2.0.50727; InfoPath.1)

    Is the notifier part of the email program? Is it an independent program like poptray? If it is separate from Firefox, it really shouldn't matter which browser you are using. Unless the notification is within IE.

  • Is there a update for Photoshop Elements 8 that will support raw files from a Canon T3i 600d?

    Is there a update for Photoshop Elements 8 that will support raw files from a Canon T3i 600d?

    You have two alternatives:
    (1) Upgrade to PSE 9,10 or 11. (2) Download and install the free Adobe DNG converter to convert your raw files to the Adobe universal Raw format and the files will open in all versions of PSE (keep your originals as backups and for use in the camera manufactures software)
    Windows download click here DNG Converter 7.3
    Mac download click here DNG Converter 7.3
    You can convert a whole folder of raw images in one click. See this quick video tutorial:
    You Tube click here for DNG Converter tutorial

  • I need a script that will find the computer a user last logged into.

    I am still learning scripting, I need a script that will allow me to pull in usernames from a csv file. Find what computer they last logged into and output that to an csv file.
    I have looked all over and can't find exactly what I need.
     I found the following script but I need  to add the resuitsize unlimited but can not figure out where to put it we have a large environment. Also I need to be able to grab username from a csv file. Any assistance you can provide is appreciated.
    ##  Find out what computers a user is logged into on your domain by running the script
    ##  and entering in the requested logon id for the user.
    ##  This script requires the free Quest ActiveRoles Management Shell for Active Directory
    ##  snapin  http://www.quest.com/powershell/activeroles-server.aspx
    Add-PSSnapin Quest.ActiveRoles.ADManagement -ErrorAction SilentlyContinue
    $ErrorActionPreference = "SilentlyContinue"
    # Retrieve Username to search for, error checks to make sure the username
    # is not blank and that it exists in Active Directory
    Function Get-Username {
    $Global:Username = Read-Host "Enter username you want to search for"
    if ($Username -eq $null){
    Write-Host "Username cannot be blank, please re-enter username!!!!!"
    Get-Username}
    $UserCheck = Get-QADUser -SamAccountName $Username
    if ($UserCheck -eq $null){
    Write-Host "Invalid username, please verify this is the logon id for the account"
    Get-Username}
    get-username resultsize unlimited
    $computers = Get-QADComputer | where {$_.accountisdisabled -eq $false}
    foreach ($comp in $computers)
    $Computer = $comp.Name
    $ping = new-object System.Net.NetworkInformation.Ping
      $Reply = $null
      $Reply = $ping.send($Computer)
      if($Reply.status -like 'Success'){
    #Get explorer.exe processes
    $proc = gwmi win32_process -computer $Computer -Filter "Name = 'explorer.exe'"
    #Search collection of processes for username
    ForEach ($p in $proc) {
    $temp = ($p.GetOwner()).User
    if ($temp -eq $Username){
    write-host "$Username is logged on $Computer"

    If you are querying by user "resultset size" will be of no use.
    You also have functions that are never used and the body code doe snot look for users.
    Here is what you scrip looks like if printed well.  It is just a jumble of pasted together and unrelated items.
    ## Find out what computers a user is logged into on your domain by running the script
    ## and entering in the requested logon id for the user.
    ## This script requires the free Quest ActiveRoles Management Shell for Active Directory
    ## snapin http://www.quest.com/powershell/activeroles-server.aspx
    Add-PSSnapin Quest.ActiveRoles.ADManagement -ErrorAction SilentlyContinue
    $ErrorActionPreference = "SilentlyContinue"
    # Retrieve Username to search for, error checks to make sure the username
    # is not blank and that it exists in Active Directory
    Function Get-Username {
    $Global:Username = Read-Host "Enter username you want to search for"
    if ($Username -eq $null) {
    Write-Host "Username cannot be blank, please re-enter username!!!!!"
    Get-Username
    $UserCheck = Get-QADUser -SamAccountName $Username
    if ($UserCheck -eq $null) {
    Write-Host "Invalid username, please verify this is the logon id for the account"
    Get-Username
    get-username resultsize unlimited
    $computers = Get-QADComputer | where { $_.accountisdisabled -eq $false }
    foreach ($comp in $computers) {
    $Computer = $comp.Name
    $ping = new-object System.Net.NetworkInformation.Ping
    $Reply = $null
    $Reply = $ping.send($Computer)
    if ($Reply.status -like 'Success') {
    #Get explorer.exe processes
    $proc = gwmi win32_process -computer $Computer -Filter "Name = 'explorer.exe'"
    #Search collection of processes for username
    ForEach ($p in $proc) {
    $temp = ($p.GetOwner()).User
    if ($temp -eq $Username) {
    write-host "$Username is logged on $Computer"
    I suggest finding the original code then use the learning link at the top of this page to help you understand how it works in Powershell.
    ¯\_(ツ)_/¯

  • Is there an App for the iPad that will show my GPS position on a world map, even if I'm at sea?

    Is there and App for the iPad that will show mu GPS position on a world map, even if I'm at sea?
    Thanks,
    Tomac

    BobTheFisherman wrote:
    GPS will show your position anywhere if your device has unobstructed view of the GPS satellites. The issue is that you must find a maps/charts that include all areas of the sea.
    There is no mobile data connection required to use GPS on land or sea. Once again your issue is the availability of downloadable maps/charts for the areas you will be traveling.
    Sorry, but you can't install an app like NAVIGON on an iPad without 3G cellular data connection:
    copied from NAVIGON app:
    ...can be installed on any iPhone3GS, iPhone4, iPhone4S, iPhone5 or iPad device (the navigation function is only available on the iPad WiFi+3G)
    Can I navigate with my mobile phone?
    Answer:In principle yes. For mobile phones there are both Onboardnavigation solutions and Offboardnavigation solutions.
    The following requirements must be fulfilled:
    •     The software must support the mobile phone. NAVIGON software
          always comes with a compatibility list. The software is guaranteed
          to work only for the mobile phones on this list.
    •     The mobile phone must have a GPS receiver. Many new mobile
           phones come with a built-in GPS receiver. Otherwise you can use
           an external GPS receiver which is connected to the mobile phone
           by cable or Bluetooth.
    •     It should be noted that an offboard solution incurs costs for using
          the mobile phone network to communicate with the provider's server.
    Message was edited by: Ingo2711

  • Why can't I minimize more than 2 notepads in FF? I used to be able to minimize as many notepads as I wanted. FF must have done an update & now I can't do that anymore. Is there a setting I can change that will enable me to do that?

    # Question
    Why can't I minimize more than 2 notepads in FF? I used to be able to minimize as many notepads as I wanted. When I do research on a topic I keep many notepads open until I am finished. FF must have done an update & now I can't do that anymore. Is there a setting I can change that will enable me to do that again?
    Also at that time, the length of sentence I am typing changed.
    It doesn't seem to have any limit to how far it can extend to the right.
    Please help. I am not very techy & don't understand Computerese.
    Please explain in everyday English.
    Thanks in advance,
    posy

    Hi Prabhuti,
    Thank you so much for all your suggestions & helpful links to get help. I am not very computer literate. I have taken many classes over the years I've had a computer but I am still only a beginner.
    I want to tell you that I found a solution to my problem. I finally realized that maybe FF was not the problem but Wind. 7 on my new comp. I went on the 7 Forums & found another person who had the same problem & the answer was simple all I had to do was to right click on the Notepad icon & it would bring up a new Notepad & I could open & minimize as many as I want. I had moved the Notepad icon to my taskbar from the Start menu when I got my new computer.
    I have one more question for you. The notepad 2 program was mentioned there along with several others. I think it was about that prog. that someone said that it could open many notepads & when you closed the comp. the notepads would not disappear. Do you know if it was that program? Also is it possible to use that program the same way as I used the original Notepad? There are so many technical options on that program that I didn't understand. All I want to do is open the Notepad & copy & paste my notes in it & minimize them. Not losing them if I shut down the comp. would be real benefit to me. I believe that is the same prog. you recommended to me. Since you seem to understand tech things I thought maybe you could tell me if that is possible?
    Thank you so much for all your help.
    posy

Maybe you are looking for