How to create an icon for an app.

Hi all, I'm new to this part of the forest. I'm trying to learn Applescript and with any language I try to teach myself, the hardest thing is where to go after the "Hello world" thing. I need something simple but useful to motivate myself. Anyway a few times I've been researching something on Safari and since my favourite in those circs is "File - New Window" I end up with 8 or so windows open. Then if I have to restart for any reason (e.g. needed the domestic power off to carry out electrical work) I want to go back to those web pages. I could of course bookmark them all or find them in Safari History, but I thought "wouldn't it be great (TM)" if I could click something and it would make a note of all those URLs then quit Safari; then later click and it would start Safari and return to those URLs. So after a bit of fooling around I've got an Applescript which does that. Just proof of concept at the moment, e.g. it doesn't test for being asked to quit Safari when it's not running or vice versa and it doesn't handle tabs (that's going to be in mark 2.0) but if anyone can assist I'd like to give it an icon other than the default applescript one. Can anyone advise please? I've tried copying and pasting images from Preview and even "mv" ing stuff around in Terminal but to no avail. (I'll put the script in a second post in case anyone's interested.

Here's the script. It doesn't do the log file thing yet.
set ckptFile to "Macintosh HD:Users:xxxx:Documents:safchekckpt"
set URLlist to {}
set logFile to "Macintosh HD:Users:xxxx:Documents:safcheklog"
set dialog_msg to "Checkpoint Safari: this script can close Safari (non-tabbed) after noting " & ¬
" the URLs of all open windows, or start Safari and re-open those windows. Only one list of " & ¬
" URLs is kept so checkpointing and closing Safari loses the previous list of URLs. However " & ¬
" a log file is kept to which each checkpoint's URL list is appended with timestamps."
display dialog dialog_msg buttons {"start Safari", "close Safari", "Cancel"}
set button_back to button returned of result
if button_back = "start Safari" then
tell application "Safari" to activate
tell application "Safari" to close window 1
try
close access file ckptFile
end try
set f to open for access file ckptFile
set URLlist to read f as list
repeat with theUrl in URLlist
tell application "Safari"
make new document at end of documents
set URL of document 1 to theUrl
end tell
end repeat
end if
if button_back = "close Safari" then
tell application "Safari"
set k to count of documents
if k > 0 then ¬
repeat with i from 1 to k
set end of URLlist to URL of document i
end repeat
quit
end tell
try
close access file ckptFile
end try
set g to open for access file ckptFile with write permission
write URLlist to g as list
close access g
end if
Apart from adding an icon, I would be grateful for any suggestions on where I should put the app and its file(s) [ obviuosly not in one user's Documents folder ] so that all users on the system can use it. TIA for any feedback. Terry. ( I bet someone tells me there's already an option in Safari to do this but it's just a learning exercise )

Similar Messages

  • How to create shortcut icons for settings

    how to create shortcut icons for settings

    I also have this issue. Apple has indicated they want to have a larger presence in businesses. VPN is a huge part of any business network. Frustrations are hightened by the VPN disconnecting whenever the device Auto-locks. We have a definite need to make VPN's on iPads less tedious...

  • How to create apple id for mac app store without using credit card and there is no any option for payment none. please tell how to download free apps from mac app store

    how to create apple id for mac app store without using credit card and there is no any option for payment none. please tell how to download free apps from mac app store

    my problem solve by me
    first create apple id
    fill credit card details
    and complete your account creating  process.
    than go to app store or itune store
    login your acount
    click right side  - account button
    than again login for account setting
    next go to payment information and click edit button
    when u enter payment infomation
    click none button in payment method and click done button.
    than ur credit card has been removed.
    but rs. 60 will deducted in your account when u doing this process.

  • Can I create an icon for an app tab so that it is useful for the many tabs that don't generate their own?

    It's very simple. I've started using app tabs, and my first three are fine. Now I've created an app tab from my tab to the website http://www.thomasyoungcentre.org/index.html.
    However, its app tab only appears as a white page, which isn't very memorable, especially as I find that some other websites I use have the same blank app tab. So I wonder if I can make a little custom icon of some kind to identify this website for me on its app tab. Alternatively, what do I need to tell the website managers that will enable this feature for us.

    You must realize that the quality of sound has been compromised by the very fact of compression and equipment. You are never likely to experience the nature of a live event by listening on an iPod. The best solution is to get a better quality of earbuds/ earphones/ headphones to improve the playback experience. The higher quality headphones such as Bose, Sennheiser, Sony have capabilities to counter ambient interference ( Bose noise-cancelling for example), and they have a better quality speaker than the Apple earbuds. This standard issue bit of kit is more of a courtesy to iPod buyers so that they will have something right out of the box in order to listen to their music but they are not the highest audio quality. The best audio quality will cost every bit as much as, or even more than, the cost of an iPod. As for turning up the volume, that is a foolish undertaking that can have long-term consequences on your hearing. Tinnitus cannot be cured! You will live with it unto your last days.

  • How to create db conn for JDBC-ODBC Bridge for MS Access in ADF APP?

    Sir,
    How to create db conn for JDBC-ODBC Bridge for MS Access in ADF APP?
    Regards

    Hello Every Body!
    I succeeded in getting connect to the ms access database in adf application in jdeveloper as below:
    First in control panel to to admin tools and  go to data source(odbc) and create system dsn as bellow pic
    Then go to jdeveloper resources ide conn and then database and new database conn and then select jdbc-odbc briddge and then give custom jdbc url as bellow pic
    Cheers
    tanvir

  • I got home today and got a message on Messages or IMessage and the Messages app would not open i restarted my computer and it had a question mark as the icon for the app. Help!?!?! What does this meen how can i prevent further damage or fix damage delt

    I got home today and got a message on Messages or IMessage and the Messages app would not open i restarted my computer and it had a question mark as the icon for the app. Help!?!?! What does this meen how can i prevent further damage or fix damage delt

    Is this what you see when you start up your MBP?
    http://support.apple.com/kb/ts1440
    Ciao.

  • HT4623 I downloaded the new  operating system to my iphone 4S and the icons for my apps are missing? How do Icorrect this?

    I downloadedthe new operating system to my iphone 4S and now I can't find my icons for my apps?  Any Suggestions??

    If you will go to settings to itunes and apps store. Once you've logged in with your apple id you then are given the option to automatically download apps that were purchased using the Apple id in which you logged in with .
    Good luck.

  • How to setup JNDI Name for Oracle Apps adapter?

    Hello,
    I am learning Oracle SOA 11g and trying to do some tutorial on Oracle Application Adapter.  I know how to configure JNDI for DBadapter and I did that successfully. I followed same steps to create New JNDI for Oracle Apps Adapter.
    1. I Created new data source using Path Services->Data Sources -> New Genric Data Source. Connection to database was successful and created new JNDI Name: jdbc/PKDTAPPS.
    2. Then Deployment-> OracleApps Adapter-> Configuration-> Outbound Connection Pools -> New and created JNDI Name eis/Apps/PKDTAPPS.
    However I did not find newly created JNDI Name in step 2 under Deployment-> OracleApps Adapter-> Configuration-> Outbound Connection Pools -> javax.resource.cci.ConnectionFactory.
    Please let me know if am I following correct steps to create new Oracle Apps Adapter JNDI Name or not.
    Since above approch did not work I created new JNDI for DBAdapter with same database connection details. And then latter on use that JNDI Name while creating Oracle Application Adapter in JDeveloper composite. And it allowed me to access Oracel Apps open interface. However while deploying the application it gave me following error.
    <Feb 16, 2015 10:50:59 AM CST> <Error> <oracle.integration.platform.blocks.deploy.servlet> <SOA-21537> <Sending back error message: There was an error deploying the composite on AdminServer: [JCABinding]
    [adapter-Apps-101-JournalImport.InsertJournal/1.0]Unable to complete unload due to: Cannot locate Java class oracle.tip.adapter.apps.AppsTableWriteInteractionSpec: Cannot locate Java class
    oracle.tip.adapter.apps.AppsTableWriteInteractionSpec..>
    Since I have no past experience kindly suggest me what is right way to do this.
    Thanks,
    Shri

    Hi shri,
    Can you check the targets of oracle apps adapter that is it deployed on both cluster and admin server both.
    Deployment-> OracleApps Adapter-> Targets
    Regards,
    Anshul

  • Can I create an icon for a document in iCloud and place it in the dock for easy access?

    I would like to create an icon for a spreadsheet that is stored in iCloud.and place the icon in the dock for easy access.  This is possible with documents stored on the iMac.   Thanks

    How did you save Word documents to iCloud, Word will not do that so how did you? Did you use another application or maybe drop them in the Mobile Documents folder?
    Please explain the how, then it may be easier to answer your question.

  • How to create Activex object for my Visual C++ object

    Hi,
    I am working on development on Acrobat 9.0 SDK. I am facing problem is that I can compiled Visual C++ source code to an api. I can test functions on this api on Acrobat 9.0 windows, but I could not test it on IE web browser, because I don't know how to create Activex object from my Visual C++ source code or its api.
    I read Acrobat 9 SDK document and found under C:\Acrobat 9 SDK\Version 1\PluginSupport\Tools\Visual Studio App Wizard has two files: Acro9PIWizInstaller.msi and setup.exe. I am not very sure those file are the key to help me to create Activex objects for my api.  Are they the one I need to create Activex object? If not, could you please advise me how to create Activex object for my api or C++ codes.
    Thanks a lot for any of your comments or advices.
    Thai

    Hi lrosenth,
    Thanks a lot for your information.
    My question is, on Javascript how do I call a function from .api. Below is my very simple test.
    I got a function on BasicPlugin.cpp under C:\Acrobat 9 SDK\Version 1\PluginSupport\Samples\BasicPlugin. See below.
    I added BasicPlugin.api on C:\Program Files\Adobe\Acrobat 9.0\Acrobat\plug_ins
         ACCB1 int ACCB2 MyPluginCommand() {
              int num = 5;
              return num;
    On my HTML file, I create an <Object> below:
        <OBJECT id="acrobatapp"
                classid="clsid:85DE1C45-2C66-101B-B02E-04021C009402">
        </OBJECT>
        <OBJECT id="acrobatpdf"
                classid="clsid:CA8A9780-280D-11CF-A24D-444553540000"   >
            <Param name="SRC" value="http://www.adobe.com/devnet/acrobat/pdfs/acrobat_digital_signature_appearances_v9.pdf">
       </OBJECT>
    On my Javascript. I call function MyPluginCommand() as below, but it is not working. How do I call function MyPluginCommand() on Javascript?
         var acrobatapp= document.getElementById("acrobatapp");
         var num= acrobatapp.MyPluginCommand();
         alert(num);
    Thanks for your support,
    Thai

  • How to create the ICONS and SYMBOLS

    how to create the ICONS and SYMBOLS
    Title was edited by:
            Alvaro Tejada Galindo

    HI,
    Check this sample code....Not mine...
    REPORT SHOW_ICONS.
    TABLES: ICON.
    INCLUDE <ICON>.
    FIELD-SYMBOLS: <F>.
    SELECT * FROM ICON.
       ASSIGN (ICON-NAME) TO <F>.
       WRITE:   /(5) <F>, 20 '@',21 ICON-ID+1(2),23 '@',ICON-OLENG,
                ICON-BUTTON,ICON-STATUS,ICON-MESSAGE,ICON-FUNCTION,
                ICON-NAME.
    ENDSELECT.
    Also Try this,
    INCLUDE <symbol>.
    INCLUDE <icon>.
    Write:/ 'Phone Symbol:', SYM_PHONE AS SYMBOL.
    SKIP.
    WRITE: / 'Alarm Icon: ', icon_alarm AS ICON.
    For more information check out the following link it will help you.
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9e4a35c111d1829f0000e829fbfe/content.htm
    Regards,
    Padmam.

  • How to create an handle for Miniport driver Ioctl interface?

    Hi All,
    I am trying to create an handle for my miniport driver Ioctl interface, but it showing the following error while opening the handle with CreateFile API.
    "you are requesting IOCTL_HAL_GET_DEVICE_INFO::SPI_GETPLATFORMTYPE,
    which has been deprecated. Use IOCTL_HAL_GET_DEVICE_INFO::SPI_GETPLATFORMNAME
    instead"
    Can anyone suggest on how to create the handle for Miniport Ioctl interface?
    Thank you,
    Sagar

    Hi,
    I have seen this error only in GUI based apps. Maybe you are pointing to the wrong error.
    Check if CreateFile returns INVALID_HANDLE_VALUE. API return value should give you more information.
    Regards,
    Balaji.

  • How to creat the Varient for 1099MISC With Holding Tax

    How to create the Variant for 1099MISC With Holding Tax ?

    HI,
    please follow the below steps to create variant at report.
    tcode se38
    report RFIDYYWT
    pass all the parameters
    press save icon
    give variant name
    retrive the variant in report
    tcode se38
    report name RFIDYYWT
    press : shift + F5
    or get varinat icon.
    I hope above will resolve your issue.
    Regards
    Madhu M

  • Icons for new apps not showing up on iPad?

    My iPad and iPhone are not displaying icons for new apps. How can I fix this?

    To the OP .... Did you try either of theses steps?
    Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.
    to you both ....
    Reset the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons.
    If you have many apps they can't all fit one one screen. Try swiping from screen to screen to see if you can find them. I would suggest checking restrictions as well, but I believe that if restrictions are enabled, you couldn't download the apps in the first place.
    You can also look for the apps in iTunes on your computer. Connect the iPad to your computer, launch iTunes, select your device on the left sidebar under devices and click on the apps tab. Look at all of your iPad screens in there and see if you can find them.

  • Yoga 11 - can not create an account for the App store,

    I can not create an account for the App store, I live outside of the USA and the only address option is in the USA. Can you help me
    Moderator Note: Edited subject to match content.

    Hi
    Welcome To Lenovo Community
    We are really sorry to hear about the issue you are facing,
    I have verified the Microsoft windows 8 app store has different regions listed
    And you can connect app store using an existing Microsoft account like Hotmail, msn etc.
    Please refer below link
    http://windows.microsoft.com/en-US/windows-8/explore-windows-store#1TC=t1
    Also if you can share the link or screen shot of the app store to help you further
    Do give this a try and let us know  
    Hope This Helps
    Cheers!!!
    WW Social Media
    Important Note: If you need help, post your question in the forum, and include your system type, model number and OS. Do not post your serial number.
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"!
    Follow @LenovoForums on Twitter!
    How to send a private message? --> Check out this article.
                            English Community   Deutsche Community   Comunidad en Español

Maybe you are looking for

  • How can i see txt or numbers txt from phone that is on my plan

    how can i see or print out txt from a phone on my plan ..either the txt or number that was txt

  • How to secure data by operating unit in oracle payments

    Hello We are in the process of setting up to make payments from one single bank account across all operating units to avoid maintenance and number of templates. As part of our process we submit the payment process request across all operating units a

  • JAVA Detection problem

    Hi I am using ECC 6.0. My JAVA Server not getting started. In MMC Its not showing any of JAVA processes to start. Following is the contents of DEV_JCONTROL file. Can any body help me to resolve this. Thanks in advance trc file: "H:\usr\sap\EC6\DVEBMG

  • Production Order With out BOM

    Hi Gurus, I have a scenario where I want to produce a Material With out BOM but with a Routing. Here I when I am creating a production order it ask for  Valid BOM, please let me know the setting os that it will not ask for BOM and no error message is

  • Why no manual?

    It's a major and inexplicable omission not to have a manual for downloading like every other Adobe product. The so-called online manual is nothing but a bunch of tutorials; very nice, but useless when trying to read up on a particular feature.