Applescript Launch Item Hidden?

Can Applescript launch Activity Monitor hidden – like how the system Login Items can be kept hidden?
This Applescript works –
launch application "Activity Monitor"
delay 0.5
tell application "Finder" to set visible of process "Activity Monitor" to false
– but it flashes the Activity Monitor window before hiding it.
Could a Terminal call do it? Something like – 
do shell script "open /Applications/'Activity Monitor'"
— but with a keep-hidden option? (The -g flag (background) is close, but not quite.)
Thank you.

Telling an application to launch doesn't keep it hidden like it is supposed to, but run works with some applications such as Activity Monitor:
  tell application "Activity Monitor" to run

Similar Messages

  • How to launch a hidden process

    Hello! I am new to programming for the Macintosh.
    I would like to launch a hidden process in a similar way one might do on Windows with CreateProcess by passing SW_HIDE to the startup info, or using ShowWindow(hwnd, SW_HIDE).
    I am not interested in "Hiding" the window in the typical Macintosh sense, because the Dock still indicates that the process is running. I don't want to edit the Info.plist file to include LSBackgroundOnly because modifying that file would require elevated access (which I am trying to avoid).
    If there was a way to combine the typical Macintosh "Hiding" with the behavior provided by LSBackgroundOnly (preventing the Dock from showing the process) without modifying the Info.plist file, that might be good enough.
    Any alternate, completely different approaches are also appreciated.

    I accomplished this by doing the following:
    I used NSWorkspace's NSWorkspaceLaunchAndHide option to call launchApplicationAtURL. For my usage (but for not all applications) this was enough to hide the launched application's windows.
    To prevent the launched application from showing up in the dock (or gaining focus) I modified the application's Info.plist to include the LSBackgroundOnly property.
    Because I did not want to require administrator access but needed to modify an application's Info.plist file, I do the following:
    1) Create a new <ApplicationName>.app directory in the current user's home directory
    2) Copy the target application's Info.plist file to the new directory
    3) Modify the copied Info.plist to include the LSBackgroundOnly property
    4) Create symbolic links to all the other files/folders in the target application's directory (MacOS, PkgInfo, Resources)
    5) Launch from the new <ApplicationName>.app
    With that, most applications will start invisibly (no windows, no dock icon, but obviously visible from the Activity Monitor, ps ux, etc).
    Some applications still display a window. I've been able to hide this window by (for example) running an AppleScript that tells the application to hide all of its windows, but this solution is inelegant as the window is still usually visible for a fraction of a second. If anyone knows how to handle these edge cases, I would appreciate the help!
    Otherwise, I hope this is helpful to anyone else who is trying to accomplish the same effect!

  • Hiding the actions on the launched Item.

    Hi All,
        Is it possible to do configuration on UWL to hide the buttons on the launched item. In the Task view we have different items and i know we can hide some action button there by setting the "Exclude action " property in the Iview, but when the user clicks on the description the item is launched . The launched item has some action button displayed on that page. Is it possible to hide those action button through some configuration in the XML??.  Is the configuration limited to only the view and the launch configurations..once the item is launched can we control that as well. The item that is currently being launched is a standard Webdynpro Java application that SAP provided. The tasks are general collaboration tasks..so there is not much configuration done in terms of the view and the launch configuration.
    Regards,
    Rajee.

    So, you are asking that is it possible to configure the actual application that is launched from UWL? If yes, then this has actually not that much to do with UWL. You need to check out the configuration options of the corresponding application itself.
    You need to specify that which application is launched. Let's say that you have iView X that is launched from UWL. Most probably you can do some configurations to the iView itself (iView properties). Maybe you can hide some buttons etc. Maybe the application is actually configurable in backend system (in SPRO). So, you need to tell what application it is and what you want to do for it. And then it might be good idea to ask this question from the corresponding application area instead of UWL. For example if you want to configure a travel expense approval application, you can ask the question possibly from HR/Travel area. Or maybe someone here in UWL area can help if I happen to know the application that you need to configure.
    Regards,
    Karri

  • How to remove automatically launched items/apps?

    Sorry if this is a duplicate question.
    Actually i didn't find best answer for disabling items that automatically lauched when osx starting.
    I've been removed all startup items from login startup items (System Preferences - User & Groups - Login Items).
    Nothing found on StartupItems folder (Library - Startup Items) too.
    But some items still automatically launched on Mac start (such as Splashtop Streamer, Busycall).
    How to remove those startup items without completely uninstalling them?
    Any help would by appreciated.

    Those are system modifications, and if you want them to do what they do, they have to load at startup. If you don't like what they do, remove them according to the developer's instructions, or refer to the developer for support.

  • AppleScript - Launching an app package, problems

    Help!
      I have a Filemaker runtime app that I want to launch using a single icon that I can distribute easily (and have a drag-install directly into the user's App folder). I found a page that allows me to do this using AppleScript:
    http://campsoftware.com/2010/11/filemaker-runtime-packages-and-installer/
    They have me using a script that looks like this:
    -- Path to the runtime in the App
    set appPath to (((path to me) as text) & "Contents:Resources:PSD:PSD.app")
    -- Convert path to a POSIX path
    set newAppPath to POSIX path of appPath
    -- executing the script file
    try
        set command to "open " & newAppPath
        do shell script command
    end try
    I save that script as an app, then I go into the app's package contents and drop my runtime in the Resources folder. That way, the file path knows where to find the .app and launch it. but when I double-click, it does not work. At all. It just tries to launch in the dock, and immediately terminates, never opening the runtime app.
    I'm positive that the file path is correct. How can I fix this problem?
    thanks for your time.

    The 'quoted form of' text solved the issue. Here's the script in its working condition:
    -- Path to the runtime in the App
    set appPath to (((path to me) as text) & "Contents:Resources:PSD:PSD.app")
    -- Convert path to a POSIX path
    set newAppPath to quoted form of POSIX path of appPath
    -- executing the script file
    try
        set command to "open " & newAppPath
        do shell script command
    end try
    Thanks for all the help!

  • AppleScript menu item in Japanese Environment

    hi, here's the script to build AdHoc Network automatically in Japanese Environment on OS X Lion.
    Is there anyway to use this in English or Japanese Environment?
    Not only this case, I'm wondering is there good tips of AppleScript for different Language environments?
    It seems I cannot use item number insted of the name, because the number isn't static ( it depends on the number of wifi station).
    property NetworkName : "LIVE" -- Name of Network
    property NetworkPassword : "12345" -- password
    tell application "System Events"
        -- switch to English key mode : start --------
        tell process "Finder"
            key down control
            key down shift
            key code 41
            key up shift
            key up control
        end tell
        -- switch to English key mode : end --------
        tell process "SystemUIServer"
            tell menu bar 1
                set menu_extras to value of attribute "AXDescription" of menu bar items
                repeat with the_menu from 1 to the count of menu_extras
                    if item the_menu of menu_extras contains "Wi-Fi" then exit repeat
                    -- do this with OS 10.6
                    -- if item the_menu of menu_extras is "Airport Menu Extra" then exit repeat
                end repeat
                -- Build network
                tell menu bar item the_menu
                    perform action "AXPress"
                    -- If Airport is off, turn it on
                    if title of menu item 2 of menu 1 is "Wi-Fi を入にする" then -- "Turn Airport On"  for English Environment
                        perform action "AXPress" of menu item "Wi-Fi を入にする" of menu 1 -- "Turn Airport On"  for Englis
                        perform action "AXPress"
                    end if
                    perform action "AXPress" of menu item "ネットワークを作成..." of menu 1 -- Create Network… for English
                end tell
            end tell
            tell window 1
                keystroke NetworkName
                delay 0.1
                click pop up button 2
                delay 0.1
                click menu item 3 of menu 1 of pop up button 2
                delay 0.1
                keystroke NetworkPassword
                keystroke tab
                keystroke NetworkPassword
                click button 1
            end tell
        end tell
    end tell

    Regular AppleScript isn't internationalized, but Lion's AppleScript Editor can create a Cocoa-AppleScript applet, which is.  The applet bundle has localized resources for several languages which can be accessed by using Cocoa methods via AppleScriptObjC. For example, you can add Localizable.strings files to your English and Japanese .Iproj folders that contain the localized equivalent of various keys, and use NSBundle's localizedStringForKey method to look them up as needed:
    set localizedText to current application's NSBundle's mainBundle's localizedStringForKey_value_table_(someKey, missing value, missing value) as text
    See Apple's Internalization Programming Topics documentation for more information.

  • FBL5N Line Item hidden

    Hello Dears  , ..
    How can I hid or Remove line item from customer line items which displayed in report (FBL5N)
    Thanks for advance .

    Thanks all .
    put my business is :
    Month 7 -
    > number range 1   
    Month 8 -
    > number range 2
    there is some thing wrong  occurred ...
    the user in month 8 /enter Invoice with number range (1) this is of month 7 So it appears in a rong way in  FBL5N with wrong  so i want to hide or delete this invoice form the output of report .    
    so thanks  for ur efforts

  • Touching coners of the screen to launch secret hidden settings

    Hi there used to be a way of launching advanced manufacturer settings on bb touch screen phones by touching/tapping the conners of the screen but somehow I forgot the combination,anybody?

    Hi Daylightdon, if Size is grayed out, then the window is currently maximized. Use Restore to switch from a maximized window to a resizable window, and then you should be able to use Size.
    ''Edit:''
    If Restore is grayed out, you are in full screen mode. Press the F11 key to switch to regular mode, or use the Restore button on the title bar that appears when you move your mouse pointer to the top of the screen.

  • After restart, Safari & Mail (Log-in items, hidden, fullscreen) aren't clickable.

    Anyone else have this problem? I have to quit and relaunch those apps to get them to work. On a Mac Pro Nehalem.

    This solved my problem perfectly and on the first try!!! Thanks so much!!!
    leroydouglas wrote:
    Did you try disabling your mailbadge or deleting it?  Is this the MailBadge software?
    or you just talking about the inbox count showing on the icon?
    IMAP or POP?
    You can try this
    1. Quit Mail if it’s open.
    2. In ~/Library/Mail/V2/MailData, delete any file that begins with “Envelope Index,” ex. Envelope Index or Envelope Index-shm.
    Found in your Home Library folder is hidden by default. To display it, choose Finder > “Go" and hold the option key down.
    3. Open Mail.
    Mail creates new Envelope Index files. This process may take some time depending on how many messages Mail is reindexing.

  • Daily View Calendar items hidden

    We are using Groupwise 2012 Webaccess and recently discovered that in the calendar Daily View that appointments created before 8 AM or after 5 PM do not show in the daily view of the calendar, but they show fine in the weekly and monthly view. The time before 8 AM and after 5 PM is shaded darker so there appears to be a time setting somewhere that defines the workday. However, there doesn't appear to be any settings within users web access options to change this view to display all before work and after work appointments. This is true for appointments created using client software as well as within webaccess. Does anyone know of a fix or setting that needs to be changed to display all appointments in the Daily View?
    Thanks.

    CLAYGEHRING,
    It appears that in the past few days you have not received a response to your
    posting. That concerns us, and has triggered this automated reply.
    Has your problem been resolved? If not, you might try one of the following options:
    - Visit http://support.novell.com and search the knowledgebase and/or check all
    the other self support options and support programs available.
    - You could also try posting your message again. Make sure it is posted in the
    correct newsgroup. (http://forums.novell.com)
    Be sure to read the forum FAQ about what to expect in the way of responses:
    http://forums.novell.com/faq.php
    If this is a reply to a duplicate posting, please ignore and accept our apologies
    and rest assured we will issue a stern reprimand to our posting bot.
    Good luck!
    Your Novell Product Support Forums Team
    http://forums.novell.com/

  • Erro Checksum error for Hidden and Protected item ID (1118508917223363)

    i am generating one report with delete option.For delete Link i am using one HIdden item P1_SELECT
    when i select it with text field then no error.but when i select it hidden then it show me
    Checksum error for Hidden and Protected item ID (1118508917223363), value (2), posted checksum (C4733DF9C658202B914CF661E2349FFC), expected checksum (********************************), index_i (6), index_j (4), index_m (4);How can i remove this error.
    Thanks

    Hi,
    The problem is when you are creating an item "Hidden and protected" so apex will associate a checksum value for that item's value and as you are changing the value, the checksum will not changed.
    If there is no security issue use "Hidden" instead of "Hidden and protected" for that item.
    Regards,
    Kartik Patel
    http://patelkartik.blogspot.com/
    http://apex.oracle.com/pls/apex/f?p=9904351712:1

  • Is there a way to stop the launching applications to come to foreground?

    Is there a way to stop the launching applications to come to foreground?
    Back with os 10.3 Panther or 10.4 Tiger the apps opened in the background. That was one of the good differences with Windows. I guess that 10.5 Leopard adopted this annoying Windows behavior. Hope it's gonna change with 10.7 Lion.
    (Of course I am looking for another solution than the AppleScript/Terminal launch that can be found on Google. I'd rather have a plist option to change if it exists!)

    I have found this page http://www.realsoftware.com/listarchives/realbasic-nug/2009-03/msg01167.html where it is proposed to add :
    <key>LSBackgroundOnly</key>
    <string>True</string>
    to MyApp.app/Contents/Info.plist
    I tried this but the app launches totally hidden in the background. Plus you have to set this behavior for every app.
    The open -g option works fine as expected.
    Still looking for a system-wide option, but it doesn't seem to exist.
    About the utility of such an option, I'll just remember you that some machine don't load apps very fast and, instead of waiting for an app to launch, the user will do something else until the app launches. You'll understand that waiting in front of a computer isn't acceptable and having a MBPro isn't possible for everyone.

  • Run an applescript as launchd opens ScreenSharing app?

    2014 iMac - Yosemite, 2009 MacBookPro - Yosemite, LAN on a 2013 AirPort Extreme. Screen Sharing and Remote Access both set up and working fine.
    I am clawing up the learning curve on a few things as I try to get one simple thing to happen:
    When I Screen Share from my MacBook Pro to my iMac I want the screen resolution on the iMac to automatically switch to one that the MBP user can read (the 27"  iMac screen when shown on a 13" MBP screen makes it very difficult to even tell what the icons are, and impossible to read text.)
    In an ideal world, the resolution of the iMac's screen would switch back after the Screen Sharing session is ended - but this isn't hugely important.
    I can't find a solution that doesn't require me to have a constantly-listening applescript running on the iMac, but I just don't like that idea.
    From a past life on Windows, I know I could launch an application with parameters - either by triggering events on launch by injecting your own commands that ran before the 'run' command to the exe file or you could redirect the exe path to a script that ran the exe at the end of the script after doing other stuff. But I've never done that stuff on Apple before, and don't really know where to start.
    Searching here hasn't turned up what I want, probably because I don't know what terms to use in the search.
    So, here is what I'm wondering:
    1) What is the name of the application that displays itself as "Screen Sharing"?
    2) How is this app launched by launchd when launchd gets the request on port 5900?
    3) Is is possible to make an applescript run when launchd launches Screen Sharing (with a redirection of path to a script that changes resolution THEN launches screen sharing)?
    4) Is it possible to make another script run when a screen sharing session closes? If so, point me in the right direction?
    Thanks, and feel free to refer me to the appropriate forum if this forum is not the right place for my question.
    (BTW, I am really surprised that the screen sharing app doesn't already have the ability to do this. Long ago when I used VNC on Windows machines it would resize it for you.)

    After some further testing in Profile Manager I found that adding the applescript to items that open at logon seems to work. No need for the plist, unless of course I decide not to use Profile Manager at all.

  • Trouble with using javascript $s function to populate a page item

    Hello Oracle APEX Community,
    I'm working on a drilldown dashboard page and have been encountering a problem when i try to populate a Text Page Item (hidden or not) using the javascript built in $s function.
    The function works great when the data is a number such as dept_id (even if the field type is varchar). However, trying to pass anything which is a text the process fails, except when a value is hard-coded as a parameter for the function. So for example, I have a chart with counts of constituents by state. I would like to populate (filter) a table based on when you click on a bar for a state without having to submit the page. I'm using dynamic actions and a built in javascript function in the SQL for the chart to accomplish this; but again, it works great when I use a varchar field like the FIPS code (i.e. the FIPS for Texas is '48'), but when I try to populate the page item using the state abbreviation 'TX' (again varchar) it fails.
    Here's an example of code that works:
    SELECT 'javascript:$s("P1_DEPTNO",'||d.deptno||')' LINK,
    d.dname LABEL,
    sum(e.SAL) sal
    FROM emp e, dept d
    where e.deptno = d.deptno
    group by 'javascript:$s("P1_DEPTNO",'||d.deptno||')', d.dname And here's an example of code that does not work:
    SELECT 'javascript:$s("P1_DEPTNO",'||d.loc||')' LINK,
    d.dname LABEL,
    sum(e.SAL) sal
    FROM emp e, dept d
    where e.deptno = d.deptno
    group by 'javascript:$s("P1_DEPTNO",'||d.loc||')', d.dname However, when I hard code a text value the script works:
    SELECT 'javascript:$s("P1_DEPTNO","BOSTON")' LINK,
    d.dname LABEL,
    sum(e.SAL) sal
    FROM emp e, dept d
    where e.deptno = d.deptno
    group by 'javascript:$s("P1_DEPTNO","BOSTON")', d.dname
    ORDER BY d.dname I'm encountering this problem on several versions of APEX: (4.0.2.00.07-local installation) and (4.1.0.00.28-apex.oracle.com)
    Does anybody know of this problem and how to solve it? I've looked for settings on the page item itself, and can't figure it out.
    I've re-written my sql to utilize the value fields of my tables instead but I have some objects on the page which are really going to depend on the character based data instead.
    Thanks,
    Wayne

    In your javascript you are generating, surround your value with double-quotes and it'll should then always work with both numbers and strings (your strings are probably being interpreted as variable names and they don't exist at runtime, hence erroring out).
    Example:
    SELECT 'javascript:$s("P1_DEPTNO","'||d.loc||'")' LINK,Edited by: gti_matt on Aug 16, 2011 9:50 AM

  • Update Session State for only one item

    I have several hidden items (e.g. fund, object and unit) that hold values that are input parameters for a function that returns a SQL statement to a 'PL/SQL Function Body Returning SQL Query' region. These hidden items are set when a user selects a value from a pop-up tree. I want to dynamically set corresponding visible prompt text items (fund_prompt, object_prompt and unit_prompt) to a descriptive value that makes sense to the user. I've tried using a source type of SQL and placing the following SQL statement in the source
    SELECT child_prompt
    FROM fr_hierarchy_fund
    WHERE child = :FUND;
    When the value in one of the hidden items is changed, the visible prompt item displays "undefined" until the page is submitted.
    Is there a way to set the session state of an item without submitting the page?
    Thanks
    David

    David,
    Items, hidden or not, are not set in session state until the page is submitted. You might consider submitting the page with a javascript event on your popups. The request value can be used to control what processing you do or don't do on page submission and a branch right back to the page should allow you to show everything based on current item values.
    Scott

Maybe you are looking for