Automator leave all

I want a script to close all open applications and empty the trash.

Applications and Finder behave differently.

Automator "Utilities" options appear the best result, so I'm focused there.

I am able to stop all applications, but the Finder is stubborn

I can close the Finder components as a group within Automator, but combining this group with the group "Close all Applications" The Automator scripts fails to close the components Finder (Finder, Get info and inspector window).

Here's what I have so far.

Group 1: on his own closing everything except the Finder stuff.

Utilities > quit all applications

Quit all applications

Group 2: this group works well.

Utilities > run AppleScript

the term {parameters}

Tell application "Finder".

empty the trash

tell the end

delay 1

Back entrance

end of race

Group 3: run on its own that works, but not with "quit all Applications.

Utilities > run AppleScript

the term {parameters}

Tell application "Finder".

activate

quit smoking

delay 3

Tell application "Finder".

activate

tell the end

tell the end

Back entrance

end of race

Group 4: it works on its own for Finder stuff, but does not work with other groups.

Utilities > run Script Shell

CAT

osascript-e 'tell application "Finder" to quit smoking.

I noticed that sometimes the AppleScript works, and a second later it stops working.

For now, I found a way to make it work. Automator works great Finder asking you to empty the trash. Then I dropped the trash from Group 2 to group 4, the bottom of the collection of Automator. Now it works... for now...

Group 1: Utilities > quit all applications

Quit all applications

Group 2: Utilities > run AppleScript

the term {parameters}

Tell application "Finder".

activate

quit smoking

delay 3

Tell application "Finder".

activate

tell the end

tell the end

Back entrance

end of race

Group 3: Utilities > run Script Shell

CAT

osascript-e 'tell application "Finder" to quit smoking.


Group 4: Utilities > run AppleScript

the term {parameters}

Tell application "Finder".

empty the trash

tell the end

delay 1

Back entrance

end of race


If anyone knows why this command works, an explanation would be appreciated.

Tags: Mac OS & System Software

Similar Questions

  • Can I leave all my pictures from the iPhone where I imported on my Mac?

    It is easy and a stupid question, I know, but I want to be sure that doing the right thing!

    Please tell me: can I leave all my pictures from the iPhone where I imported prior to my MacBook?

    Is that what your iPhone sync in any way with your Mac? My photo stream? iCloud photo library?

    You import photos in iPhoto on your Mac? Or perhaps the Photos for Mac application?

  • I get the following error message when trying to format drive C: "Windows cannot format this drive. "Leave all utility disc or other programs that could use this drive.

    Original title: how to format drive C?

    I have Windows XP installed on my C drive, but due to the lack of hard drive space, I installed another Windows XP on drive D. Now when I try to format the C drive of the new installed Windows, I get this error:

    "Windows cannot format this drive. "Leave all utility disc or other programs that could use this drive.

    Hello

    Check if you are able to format drive C in a clean boot state.

    From your computer by using a minimal set of drivers and startup programs so that you can determine if a background program is interfering with your game or program. This type of boot is known as a "clean boot".

    Reference:
    How to configure Windows XP to start in a "clean boot" State
    http://support.Microsoft.com/kb/310353

    When you are finished troubleshooting, follow these steps to reset the computer to start as usual:
    1. click on start and then click Run.
    2. type msconfig and click OK.

    The System Configuration Utility dialog box appears.

    3. click on the tab general, click Normal Startup - load all services and device drivers and then click OK.
    4. When prompted, click on restart to restart the computer.

    Warning: Formatting the drive will remove or erase all the data on that drive.

  • computer crashed, have windows vista, indented leave, all the documents lost, can I get all the files, how do

    computer crashed, have windows vista, indented leave, all the documents lost, can I get all the files, how to do it, in simple terms,

    Thank you.

    If by "computer of new beginning" you mean that you have started your recovery or disk restore factory set and reinstalled Windows, then the ability to recover your files is practically zero.  You can try a utility like Recuva (http://www.piriform.com/recuva) but since you have rewritten the entire hard drive, it is highly unlikely that anything will be recoverable.

  • I want to leave all other PDFs that I opened if I decide to close 1 PDF file

    I want to leave all other PDFs that I opened if I decide to close 1 PDF file

    You can use the x on the tab:

  • Trace keycode function not to leave all the Keycodes

    The function trace in this file is not out of all the codes of keys on my keyboard. Some letters generate a key code and others do not. For example, 'u' outputs 85, but the 'I' outputs nothing.

    Here is the trace function...
    trace (Event.keycode);

    And here's the rest of the code that is a work in progress...


    package {}
    import flash.display.Sprite;
    import flash.display.StageAlign;
    import flash.display.StageScaleMode;
    import flash.events.Event;
    import flash.events.KeyboardEvent;
    import flash.ui.Keyboard;

    SerializableAttribute public class Velocity3D extends Sprite
    {
    private var ball: Ball;
    private var xpos:Number = 150;
    private var ypos:Number = 0;
    private var zpos:Number = 150;
    private var vx:Number = 0;
    private var vy:Number = 0;
    private var vz:Number = 0;
    private var friction: Number =. 98;
    private var fl:Number = 250;
    private var vpX:Number = stage.stageWidth / 2;
    private var vpY:Number = stage.stageHeight / 2;
    private var ballb:Ball;
    private var xposb:Number = 130;
    private var yposb:Number = 0;
    private var zposb:Number = 150;
    private var vxb:Number = 0;
    private var vyb:Number = 0;
    private var vzb:Number = 0;

    public void Velocity3D()
    {
    init();
    }

    private function init (): void
    {
    internship. Align = StageAlign.TOP_LEFT;
    stage.scaleMode = StageScaleMode.NO_SCALE;

    Ball = new ball (40, 0xff0000);
    ballb = new ball (40, 0xffff00);
    addChild (ball);
    addChild (ballb);
    addEventListener (Event.ENTER_FRAME, onEnterFrame);
    stage.addEventListener (KeyboardEvent.KEY_DOWN, onKeyDown);

    }

    private void onEnterFrame(event:Event):void
    {
    XPos += vx;
    YPos += vy;
    ZPOS += vz;

    VX * = friction;
    Vy * = friction;
    VZ * = friction;

    xposb += vx;
    yposb += vy;
    zposb += vz;

    LIGHT * = friction;
    vyb * = friction;
    VZB * = friction;

    If (zpos >-fl)
    {
    var scale: Number = fl / (fl + zpos);
    ball.scaleX = ball.scaleY = scale;
    ball.x = vpX + xpos * scale;
    ball.y = vpY + ypos * scale;
    ball. Visible = true;
    }
    on the other
    {
    ball. Visible = false;
    }


    If (zposb >-fl)
    {
    var scaleb:Number = fl / (fl + zposb);
    ballb.scaleX = ballb.scaleY = scale;
    ballb.x = vpX + xpos * scale;
    ballb.y = vpY + ypos * scale;
    ballb. Visible = true;
    }
    on the other
    {
    ball. Visible = false;
    }
    }

    private void onKeyDown(event:KeyboardEvent):void
    {
    trace (Event.keycode);
    Switch (Event.keycode)
    {
    decision 87:
    Vy-= 1;
    break;

    case Keyboard.NUMPAD_2:
    Vy += 1;
    break;

    case Keyboard.NUMPAD_4:
    VX-= 1;
    break;

    case Keyboard.NUMPAD_6:
    VX += 1;
    break;

    case Keyboard.UP:
    VZ += 1;
    break;

    case Keyboard.DOWN:
    VZ-= 1;
    break;

    case Keyboard.F1: //82
    vyb-= 1;
    break;

    case Keyboard.F2: //67
    vyb += 1;
    break;

    case Keyboard.F3: //68
    LIGHT-= 1;
    break;

    case Keyboard.F4: //70
    LIGHT += 1;
    break;

    case Keyboard.F5: //65
    VZB += 1;
    break;

    case Keyboard.F6: //90
    VZB-= 1;
    break;

    by default:
    break;
    }
    }
    }
    }



    -----

    It's the ball class...

    package {}
    import flash.display.Sprite;

    SerializableAttribute public class ball extends Sprite {}
    public var radius: Number;
    private var color: uint;
    public var vx:Number = 0;
    public var vy:Number = 0;
    public var: mass number = 1;

    public void Ball (radius: Number = 40, color: uint = 0xff0000) {}
    This.RADIUS = RADIUS;
    This.color = color;
    init();
    }
    public void init (): void {}
    graphics.beginFill (color);
    graphics.drawCircle (0, 0, RADIUS);
    graphics.endFill ();
    }
    }
    }

    you know - I have ran into this kind of thing and meditated on it for several hours - then come to discover that I needed to 'disable keyboard shortcuts' - in the command menu of the SWF file in the IDE to test running! lol - I don't know if that's your problem here, but it's worth a ;)

  • Why my Acer laptop not restore my laptop the original software (factory) and leave all other files on it.

    I tried e twice Acer recovery tool to format my hard drive and return it to the original settings, but it does not work. any advice?

    Using instructions like this?

    ACER PC Restore to factory settings

    http://en.kioskea.NET/FAQ/2040-Acer-PC-Restore-to-factory-settings

  • Is it safe to leave the smart box on the 6s all the time?

    Smart box still on the iPhone 6 s with 100% of the battery charge?

    You can leave all the time.  There is a circuit in the case and phone to prevent overload.

  • If I leave my desktop computer all the time, my computer open to attack and or infection?

    I am concerned about leaving my computer all the time. If I leave all the time open the computer to attack and or infection?

    Thanks for the information.

  • New 13 "Macbook Pro - leave it on or turn off?

    Bought a new 13 "Macbook Pro. What is the right way to use it? I'm on the computer all day, usually early in the morning and again in the afternoon. The last computer I bought they advised me to just leave all the time and put it to sleep. Now some say to turn it off. What is the right way to get the most life out of my computer? Thank you!

    Have sleep/power nap when not use.

    Once a month drain to 10% battery and then recharge it fully.

    This is the Office Mac Pro forum. I asked that your post moved to the forum of laptop MacBook Pro or another appropriate forum.

  • Will not wear my watch for a week... should I leave it on the charger for a week or take off for the week?

    Will not wear out my watch for a week... should I leave all week on the charger or leave it?

    Hello

    You can leave it on the charger if you wish.

    https://help.Apple.com/watch/#/apd2b717523a

  • How to close the instance of Firefox launched via file/new window without killing all instances of Firefox?

    Before the last update Firefox, running on Ubuntu if it makes a difference, I was able to select close on the file menu (and if memory is also by clicking the x on the last tab) to exit an instance of Firefox open via file new window.

    With the 9.x update this no longer seems to be possible. If I choose the file altogether starting an instance that was launched via the new window, all instances of Firefox away!

    It's embarrassing because I have to leave all the instances that have been launched.

    I tried closing last tab add on, and it allows me to close the last tab content but still leaves the instance running with a blank tab.

    Is there a setting somewhere that I missed to restore the operating mode to exit the additional instances of Firefox without killing all the previous configuration?

    Thank you
    Burt

    Each window must have its own close button (big X in the right corner.)
    But it depends on the 'Theme' that you use in Ubuntu. This large X chould be a round point when you hover over the color changes. It could be on the left instead of the right site.
    This screenshot shows the close the left side, but always an X button.

    CTRL + SHIFT + W closed the window Active.
    CTRL + W closes the current tab.

  • PIXMA Pro-1 leaving on or off?

    Today, I took the Pro-1 printer and have it operational and I'm just very happy with the out of the box - quality prints - they are simply sensational!   So here's my question - I'll print sever times weekly on this printer, but certainly not every day.    What is advised on this printer?   Leave all the time, or turn it off between uses?    Approach rather than the other cause burn you through more than faster ink?

    Hi SkeeterHarris,

    The decision on whether to let the printer or turn off completely.  I would recommend just turning off the printer if you decide to do and do not unplug it from the power outlet.  The reason is that the printer will still have a little power and keep running timers.  What these timers, is keep track of cleanings that must be performed to ensure that the printer prints correctly.  If you leave off or on won't matter because these timers work still and keep the printer printing in best quality.  You will use the same amount of ink regardless of keep or disable.

    I hope that answers your question.

  • List of blackBerry Smartphones of all devices that are without trackball or wheel

    Hello world

    Our company develops an application for BlackBerry devices. Someone could give me a list of all devices that are without trackball or wheel?

    Thanks in advance

    AN_employee wrote:

    Could someone give me a list of all devices that are without trackball or wheel?

    Which leaves all devices including the touchpad and touch screen.

    Touchpad:

    85xx

    97xx

    Touch screen:

    95XX

    Is this what you need?

  • Allowing COnsolidation automated using HS reviews. Con("",vPcon,"nature")

    Hi Experts.

    I'm having a problem with the rule to fill newspapers Consolidation automated for all Elim. entries made during the process of consolidation of HFM.


    My application is configured to use the Consolidation rules and I joined the standard consolidation rules and they work very well.

    A tutorial Oracle says to use the HS. Con "", vPCon, "text qualifier").

    I added this rule at the end of my article to consolidate and newspapers were occurring in the value of "élimination" Member, but the amounts were not disposal quantities appropriate, that we should see.

    "Call Hs.Con with Nature to follow the elim so that automated Consolidation reviews can be generated.

    Set vDataUnit = HS. OpenDataUnit("")

    HS = vPCon. Node.PCon("")

    vNumItems = vDataUnit.GetNumItems)

    For i = 0 To vNumItems - 1

    Call vDataUnit.GetItem (i, vAccount, ACIP, vCustom1, vCustom2, vCustom3, vCustom4, dData)

    If HS. Account.IsICP (vAccount) then

    Dial the HS. Con ("V #[disposal]", vPCon, "élimination")

    End If

    Next

    End Sub

    So then I tried to incorporate the suggested rule Oracle HS. Con ("", vPCon, "élimination") directly in the consolidation of the main script, but then we don't get all parent level data during consolidation (as it breaks the consolidation before it can finish correctly).

    Should use us a rule something like this to make sure that we are entering the value member elimination during the execution of the loop of Open Data Unit?

    Set vDataUnit = HS. OpenDataUnit("")

    vNumItems = vDataUnit.GetNumItems)

    For i = 0 To vNumItems - 1

    Call vDataUnit.GetItem (i, vAccount, ACIP, vCustom1, vCustom2, vCustom3, vCustom4, dData)

    If HS. Account.IsICP (vAccount) then

    povValue = "[disposal]" or to use a variable as Set HS = vElim. Account.Elimination

    Dial the HS. Con (vElim, vpCon, "élimination")

    End If

    Next

    You have any suggestions on how to run the rule to fill newspapers with member value elimination of each PKI account data?

    Thank you very much in advance.
    Mark Smith

    Here is the data that I get in my reviews:

    Sample report showing Elim journals

    Application: CENXTEST

    Scenario: real

    User: cenxadmin@Native directory

    Year: 2018

    Date: 28/05/2015

    Period: February

    Time: 11:28:06

    Value: [removal]

    Status filter: Work, submitted, approved, rejected, released

    Type filter: Auto reverse, regular, automatic reversal

    Filter of Type balance: balanced, balanced by entity, asymmetric

    Entity

    Label

    Description

    Account

    PKI

    Flow

    Credit

    TOT_OPS

    CENX_CONS_TOT_OPS_Elimination

    CENX_CONS. TOT_OPS

    1519200

    0502

    1 280 000

    0540

    1 280 000

    NA_OPS_W_CORP

    TOT_OPS_NA_OPS_W_CORP_Elimination

    TOT_OPS. NA_OPS_W_CORP

    1519200

    0502

    640 000

    0540

    640 000

    NA_OPS

    NA_OPS_W_CORP_NA_OPS_Elimination

    NA_OPS_W_CORP. NA_OPS

    1519200

    0502

    320 000

    0540

    320 000

    WAEL

    NA_OPS_CAKY_Elimination

    NA_OPS. WAEL

    1519200

    0540

    160 000

    0502

    CAKY_0502_Elimination

    1. CAKY.0502

    1519200

    0540

    80 000

    CCAC

    NA_OPS_CASC_Elimination

    NA_OPS. CCAC

    1519200

    0502

    160 000

    0540

    CASC_0540_Elimination

    1. CASC.0540

    1519200

    0502

    80 000

    Total

    2 480 000

    2 480 000

    Here's another rule, that we tried, but it did not work:

    Dim vPCon

    Dim vElim

    Dim vNumItems

    HS = vPCon. Node.PCon("")

    Set vDataUnit = HS. OpenDataUnit("")

    vNumItems = vDataUnit.GetNumItems)

    For i = 0 To vNumItems - 1

    Call vDataUnit.GetItem (i, vAccount, ACIP, vCustom1, vCustom2, vCustom3, vCustom4, vData)

    If HS. Account.IsICP (vAccount) then

    The value of vElim HS =. Account.Elim (vAccount)

    Dial the HS. Con (vElim, vPCon, "élimination")

    End If

    Next

    Hello. Looks like your rule is to consolidate all the data [Total parent] [disposal] and bypassing [percentage]. If you look in the sample applications in the consolidation rules, you will see there are commonly two subroutines. The first, Consolidation, is the standard that takes care of [percentage]. The second, usually called elimination, is called by the first to care for [eliminating]. In this second subroutine, there are two HS. Lines of con. The exact nature (the third field) on these two lines.

    Eric

Maybe you are looking for