AppleScriptObjC get a foreground app icon

All my scripts are launched from FastScripts.

When you use the basic command to display alert since the additions dosed, the alert is delivered with the application icon of foreground (as expected).

But when you use the AppleScriptObjC method to create an alert, the icon displayed is the FastScripts one.

Is there a way to get the icon of a foreground application and forward it to the alert?

I saw there is an applicationIconImage method but don't know how to use it.

Any clue?

I don't know what you (or FastScripts) are made for the foreground application, but you can use NSWorkspace to get the application for any file, for example:

set sharedWorkspace to current application's NSWorkspace's sharedWorkspace
set theIcon to sharedWorkspace's iconForFile:(POSIX path of (choose file))

Tags: iOS Developer

Similar Questions

  • Mobile app icons in 9.3 with touch 3d

    I noticed that with 9.3 and 3d touch on a 6 s it can be very difficult to move an icon of the application. When I press and hold on the icon, it can just stand there and vibrate/blur during one second or bring up the menu of tactile 3d applicable for this application (if enabled). Are there changes in the procedure of moving or remove app icons to work more predictable with the technique of prolonged contact?

    Thank you

    It can take some getting used to, but work on learning the difference between slightly touch the screen and pressing on the screen. The first days, I had my 6s this felt weird but I soon got used to it.

    You can also set the sensitivity of the 3D touch by going to settings > general > accessibility > Touch 3D. You have the possibility of light, medium and firm. Try to set it on the farm so that there is a major difference between a normal tap and press.

  • Bike G - app icons disappear & white boxes

    Hi guys,.

    I was meet UI problems since I upgraded my motorcycle G the KitKat 4.4.2. The app icons sometimes would disappear (totally black screen) or watch encrypted. I just bought the phone on the Motorola Web site and updated to Kitkat a few hours after getting it on 16 January. I don't know if I received a defective unit or is it a bug in the update of kitkat. I called customer service and they suggested to empty the cache. I did this and the problem persisted still probably 2 to 5 times a day. I also did make Factory Reset and that did not help also.

    Has anyone here experienced the same problem and found a solution for it? Another representative told me that I can exchange the phone when I call the sales team, but as much as I don't want to do because I can't go without a phone while you wait for her.

    Thank you very much for the help!


  • why I can not get the same apps I have on my iPad?

    why I can not get the same apps I have on my iPad?

    Because they are different versions for different operating systems.

  • On some pages, instead of the address of the page on the address bar, I get a mixture of icons (rss, home, print, refresh, search etc.). Downloaded again, but did not.

    On some pages (like gmail.com), instead of the address of the page on the address bar, I get a mixture of icons (rss, homepage, Star, previous-next, print, refresh, search etc.). I can not copy the address or refresh the page. I downloaded firefox again, but it did not work.

    Hello Kadomar, other users have reported that this error can be caused by third-party extensions like Icon RSS 1.0.6, which apparently is no longer maintained.

    Troubleshoot extensions, themes, and issues of hardware acceleration to resolve common problems of Firefox

  • How, please, can I get rid of the icons in the bookmarks toolbar so I have space for several names of bookmarks? Thank you

    I try to get as many items as possible on the bookmarks menu bar (usually via 3 letter names). F4 adds an icon next to each name - occupy unnecessary space. How, please, can I get rid of the icons in the bookmarks toolbar so I have space for several names of bookmarks? Thank you.

    You can watch this extension:

  • not getting not download app

    We j\have the airpad 2 and I have pad pro on the same apple ID .in I pad failed to get pro install app like XENDER, GOOGLE plays etc.

    What is the question you have? What happens when you try to install applications? You will need to provide more information, if you please.

  • HP 10 G2: Do not get the battery charge icon

    Just got a new Tablet 10 2 HP and tried to charge the battery for the first time. Online user manual deduces that the Tablet is not on to load. So, I'm not turn it on. The USB cable is connected with the Tablet off the coast.

    According to the user manual, when I plug in the USB cable I should get a small icon of recharge of the batteries in the upper right corner of the screen, but I did not. The screen remained black for nearly 30 seconds, and then a large battery icon displayed in the middle of the screen, indicating approximately 56% of the fees. This large battery icon remained on the screen for about 10 seconds and then the screen went black again. After a little experimentation, I discovered that I can get the large battery icon to display on the screen momentarily by briefly pressing the power button. When I type the swtich the large battery icon appears for about 10 seconds and it shows the current percentage of charge.

    It would be nice to get the small charging of the battery icon in the upper corner of the screen just to know that the Tablet is load... rather than having to hit the button on / off whenever I want to update load. Is it possible to get the low battery charge icon or is that determined by the version of Lollipop? My Tablet uses Lollipop 5.0.

    Any help would be greatly appreciated. TIA.

    Jack

    Each Android HP Tablet I belong to, or borrowed (as part of their program of experts) has not lost any charge the battery by displaying an indication of charge "all the time".

    Looks like your tablet is behaving normally.  State of charge is displayed when you ask.

    WyreNut

  • Get a spinning loading icon after I closed my iphone5, no reason for this? It lasts about 5 seconds. Other than the phone works normally.

    Whenever I closed my phone after about 3 seconds, I get a spinning loading icon on black background before his disappearance. Apart from that, the phone works fine. In my settings, it shows that a new software update is available, but since my connection is slow I decided to not updated for a while. Is something worrying?

    This spinning wheel on black background off is normal. Will occur if there is a software update.

  • Half of my app icons went dark

    Half of my app icons went dark on my iPhone 5s.

    When I click on it says pending and is still dark

    I checked my settings and updates that seem normal.

    What is the cause of this?

    The apps are updating and he has not yet finished.  Take a look in the section updates to the App Store.

  • Try to get a Photbucket App

    Try to get a Photbucket App, they ask for a pin code. I gave them my PIN, guard, mistake on their part to come and try later. The PIN only I have is when I log on windows. Yet I can sign on my Microsoft account

    PhotoBucket is a totally different Application that has nothing to do any Products from Microsoft (I know).

    You go to the Web of Photo bucket site and request a password reset. This time write it down.

    _________

    WARNING:

    Questions, discussions, reviews, responses & answers that I create, are mine and mine alone and do not reflect my position as a moderator of the community.

  • Kalonline-works until I get the anti-piracy icon so stop saying: there is a problem with the function of anti-hacking

    I play kalonline (RPG game), when to start the game it works up until I get the anti-piracy icon so stop saying: there is a problem with the function of anti-hacking. the program stops. I am the admin of it say kal computer run it in administrator mode and I did and I delete and reinstall the game. Solve the problem in win 7 by a right click and run as administrator, they wanted to work in win xp it all fits on how to solve this problem. These are the things, I was told to do to fix it.
    Hello

    It comes to KalOnline.

    Your error message can be corrected by following these steps:

    1. run KalOnline in Administrator Mode.

    2 uninstall KalOnline d_lete the entire Inixsoft folder, then reinstall the game.
    I did it and and it has not worked. then I was told that this was causing the problem

    Please check your computer system.

    This problem has occurred by a kind of problem of piracy.

    And if you have used a kind of memory-editing program, it could be happen too.

    So if your receipt similar to, then please remove it.
    I have none of these things on my computer. All I know is that people who have not updated windows xp can play the game and people who win 7 can play the game if they right click icon and run as administrator, that I still say side here but no way to prove it.

    Hello

    I suggest you to get in touch with the manufacturer of games and see if there are any other fix for this problem.

  • How can I get the internet active icon to reappear in the taskbar

    How can I get the internet active icon to reappear it wont despite doing everything to get him to reappear such as notifications of the tick, display in the task bar and turn into network connections for notification, nothing works.  It has disappear intermittently, but came back he refuses now to reappear

    Hi Andy MWR.
     
    -Remember to make changes to your computer before this problem started to happen?
     
    Try the methods that are listed in the article given below to resolve this issue:
  • How can I get rid of the icon "shut down windows"? It appears from the beginning to the top!

    How can I get rid of the icon "shut down windows"? It appears from the beginning to the top!

    Hello jsitch,

    This thread has been created in the forum Desktop and personalization; the Microsoft moderation team has moved this thread to the Performance and maintenance Forum.

  • How can I remove the app icons of the screen touchscreen printer?

    How can I remove the app icons of the screen touchscreen printer?

    What printer do you have? To remove apps from your printer, you need to sign in to your ePrint centre account then go to My Print Apps on the Printers tab. You can place your mouse over an icon of the application to display the delete option.

    Let me know if it helps.

Maybe you are looking for