[newbie qn] script runs under Script Editor but not as application

I have a simple script that runs successfully under the Script Editor. The script is:
tell application "Safari"
activate
tell (make new document) to set URL to "http://www.google.com"
end tell
However, when I tried to run it as an application, I encountered the error 'Can't set document "Untitled" of application "Safari" to "http://www.google.com".'
How should I rewrite the script so that it would run as an application? Thanks!

Hi PointZero01
Your script compiles and works fine saved as an application and tested under 10.5.6.
slightly different but does exactly the same
tell application "Safari"
activate
make new document
set URL of document 1 to "http://www.google.com"
end tell
Budgie

Similar Messages

  • VI server application runs under debug mode but not other wise

    I have an application which uses VI server to call vi's on my targets hard drive. When I run this using the highlight execution( or debug ) this works OK, however when I run without this I get error 66, connection closed by peer. When I look at my target using a direct monitor connection I get various messages relating to memory errors. I have run virtually the same code calling a simpler application and this seems to work fine, however when I simply target the RT engine with the same code ( using the RT comms wizard construction) I don't get a problem. This should, I think, be using the same amount of memory. What is the best was of assessing the memory available against the memory required? Do anyone have a
    ny ideas as to why the VI should run with execution highlighted and not without. I have tried adding delays so simulate this but it doesn't seem to work.

    Check out this KnowledgeBase article. It describes how to enable a memory monitoring tool that might help solve your problem.

  • SQL script runs under SQL Devoper, will not run under UNIX, SQLPlus

    I have a sql program I developed under the SQL Developer tool and it runs fine. I have ftp'd the sql to the Unix server and I am trying to run the same program under SQL Plus in unix. The program echo's back the line number that is the last line number in the code before the 'Exception' code in the program and it goes out into never never land.
    I can't figure out why this runs under SQL Developer but will not run under SQLPlus in Unix. Any ideas would be appreciated!!!!

    Assuming that the ftp process did not append any invisible characters(which it usually does) at the end of each line,
    did you put the '/' symbol at the end of your program before running in sql*plus
    something like
    begin
    end;
    /

  • A javaScript code that runs fine in IE but not in other plz help

    Hello friends,
    plese help me in getting the code for Opera and Mozilla browsers. The following code runs fine in IE but not in other browsers. it show titlebar in other browsers. What to do disable titlebar in other browsers? plz help
    <html>
    <head>
    <script>
    //Frameless Banner Popup
    // Set the url of the banner popup window page
    //var theURL = "index.htm";
    var theURL = "/cgi-bin/login";
    // Set the title of the popup window
    var title = "Login"
    // Set the size of the popup window
    var windowWidth = 350; // cannot be less than 100
    var windowHeight = 350; // cannot be less than 100
    //var windowWidth = window.screen.width; // cannot be less than 100
    //var windowHeight = window.screen.height; // cannot be less than 100
    // Set the position of the popup window
    var windowX = ((window.screen.width/2) - 175);
    var windowY = ((window.screen.height/2) - 175);
    // Set true to auto-center (positions will be ignored)
    var autocenter = false;
    // Set true for popup to close when launch page does
    var autoclose = false;
    var s="width="+windowWidth+",height="+windowHeight;
    var beIE=document.all?true:false;
    var done=new Object("no");
    if(autocenter){
    windowX = (window.screen.width-windowWidth)/2;
    windowY = (window.screen.height-windowHeight)/2;
    function doAgilePopup(){
    if (beIE){
    agilePopper = window.open("","popAgile","fullscreen,"+s);
    agilePopper.blur();
    window.focus();
    agilePopper.resizeTo(windowWidth,windowHeight);
    agilePopper.moveTo(windowX,windowY);
    var frameString=""+
    "<html>"+
    "<head>"+
    "<title>"+title+"</title>"+
    "</head>"+
    "<frameset rows='*,0' framespacing=0 border=0 frameborder=0>"+
    "<frame name='top' src='"+theURL+"' scrolling=no>"+
    "<frame name='bottom' src='about:blank' scrolling='no'>"+
    "</frameset>"+
    "</html>"
    agilePopper.document.open();
    agilePopper.document.write(frameString);
    agilePopper.document.close();
    }else{
    agilePopper=window.open(theURL,"popAgile","scrollbars=no,"+s);
    agilePopper.blur();
    window.focus();
    agilePopper.resizeTo(windowWidth,windowHeight);
    agilePopper.moveTo(windowX,windowY);
    agilePopper.blur();
    if (autoclose){
    window.onunload = function(){agilePopper.close();}
    done="okay";
    </script>
    </head>
    <BODY onLoad="doAgilePopup(),top.window.close()">
    </body>
    </html>

    missing semicolon in end of the variable frameString ,
    better write the string in single line thats easy to find the bugs like this.
    var frameString=""+
    "<html>"+
    "<head>"+
    "<title>"+title+"</title>"+
    "</head>"+
    "<frameset rows='*,0' framespacing=0 border=0 frameborder=0>"+
    "<frame name='top' src='"+theURL+"' scrolling=no>"+
    "<frame name='bottom' src='about:blank' scrolling='no'>"+
    "</frameset>"+
    "</html>"

  • I am having trouble running videos through Safari but not Google Chrome.  All I get is a black screen.  I have the latest adobe flash update and have enabled plug ins.  any suggestions?

    I am having trouble running videos through Safari but not Google Chrome.  All I get is a black screen.  I have the latest adobe flash update and have enabled plug ins.  any suggestions?

    Open System Preferences > Flash Player then select the Advanced tab.
    Click Delete All under Browsing Data and Settings
    Not empty the Safari cache.
    From your Safari menu bar click Safari > Preferences then select the Advanced tab.
    Select:  Show Develop menu in menu bar
    Now click Develop from the menu bar. From the drop down menu click Empty Caches.
    Now try a video.

  • ITunes accounts can be accessed under one User but not a second User.

    Hi
    I'm having problems setting up iTunes on a new PC I've recently purchased. On my old PC - (Vista), myself (David) and my wife (Chris) had different Windows Users accounts, both with separate iTunes accounts which we could access with no problems.
    On my new Pc (Windows 7) I have downloaded iTunes and can access my iTunes account with my ID and password when the PC is logged in as 'David' as the User, as can my wife BUT when the PC the PC is logged in as my wife as the  User 'Chris' neither of us can access our iTunes account with our relative ID and passwords. We get the message.. "The iTunes Store is temporarily unavailable. Please try again later.".
    I have seen this sentence on Google and on various forums including this one but cannot find a solution which fits my problem which is our iTunes accounts can be accessed when the PC is logged in under one User but not a second User.
    Has anyone have ideas to attempt to resolve this issue?
    Thank you

    Hi DavidG56,
    If you are having issues connecting to the iTunes Store from one of the user accounts, you may find the following article helpful:
    Apple Support: Can't connect to the iTunes Store
    http://support.apple.com/kb/ts1368
    Regards,
    - Brenden

  • I just uploaded lots of pictures.  They are only showing under last import but not in events.  how do I get them to show up under events?

    I just uploaded lots of pictures.  They are only showing under last import but not in events.  how do I get them to show up under events?

    Read this: http://help.apple.com/iphoto/#pht211dc8fc

  • Named Query (JOIN query) runs in Toplink JPA but not in EclipseLink

    I have a namedquery in JPA entities like (Entities do not include JOIN colums specifically.. no many-to-many or one-to-many relation in entities)
    select a from table1 a, table2 b where a.id=b.id
    This named query runs on Toplink Essentials without any problem.
    When I run this query using EclipseLink
    EclipseLink generates the query below and gives an error.
    select table1.id, table1.name, table1.surname from table1 t0, table2 t1 where t0.id=t1.id
    There are error _"*table1.surname*"_ is invalid identifier. Because; table1 is not define as an alias, must be "t0.surname".
    How can I solce this problem.
    The code runs on Toplink Essential but not in EclipseLink

    I have a namedquery in JPA entities like (Entities do not include JOIN colums specifically.. no many-to-many or one-to-many relation in entities)
    select a from table1 a, table2 b where a.id=b.id
    This named query runs on Toplink Essentials without any problem.
    When I run this query using EclipseLink
    EclipseLink generates the query below and gives an error.
    select table1.id, table1.name, table1.surname from table1 t0, table2 t1 where t0.id=t1.id
    There are error _"*table1.surname*"_ is invalid identifier. Because; table1 is not define as an alias, must be "t0.surname".
    How can I solce this problem.
    The code runs on Toplink Essential but not in EclipseLink

  • I am using version iPhoto'11. Since I installed this version I experience some difficulties. After importation of pictures I can see the pictures under Library/Pictures but not under Library/Events. However I can see the event and the number of pictures.

    Hello,
    I am using version iPhoto'11. Since I installed this version I experience some difficulties. After importation of pictures I can see the pictures under Library/Pictures but not under Library/Events. However I can see the event with the event title, the number of pictures and the pictures itselve as small thumbnails. BUt ounce I want to open the event to see the pictures in full screen the event title annouces 0 pictures and no pictures are visble anymore to mee. I have checked if the pictures are marked as hidden and this is not the case. What's going wrong. All the other events are visible in a normal way.
    The albums with the same pictures into them are visible.
    Thanks for your help,
    Raf

    Make a temporary, duplicate copy of the library and try the two fixes below in order as needed:
    Fix #1
    1 - delete  the iPhoto preference file, com.apple.iPhoto.plist, that resides in your Home/Library/Preferences folder. 
    2 - delete iPhoto's cache files that are located in your Home/Library/Caches/com.apple.iPhoto folder. 
    3 - reboot, launch iPhoto and try again.
    NOTE: If you're moved your library from its default location in your Home/Pictures folder you will have to point iPhoto to its new location when you next open iPhoto by holding the the Option key.  You'll also have to reset the iPhoto's various preferences.
    Fix #2
    Launch iPhoto with the Command+Option keys depressed and follow the instructions to rebuild the library. Select options #1, #2 and #6.
    Click to view image full size
    OT

  • Website page displays and javascript runs correctly in IE8 but not in Firefox 3.6.10

    website page displays and javascript runs correctly in IE8 but not in Firefox 3.6.10

    Can you post a link?
    Then we can take a look.

  • I can't see firefox. But, In windows task manager, firefox shows as a process but not an application. Icon shows in the tray.

    I downloaded and reinstalled firefox to try to eliminate an aggravation- playtopus. Now it doesn't load onto my desktop. I see the icon in the tray. In Task Manager I see firefox listed as a process. But not an application.
    tks.

    Check this
    *http://kb.mozillazine.org/Firefox.exe_always_open
    *https://support.mozilla.org/en-US/kb/firefox-already-running-not-responding

  • HT1911 I just verified my Apple user ID and password but certain updates won't download (gives me the signal that I'm incorrect).  I keep changing it, verifying but not all applications let me proceed.

    I just verified my Apple user ID and password but certain updates won't download (gives me the signal that I'm incorrect).  I keep changing it, verifying but not all applications let me proceed.  So I can't download itunes software updates or update my iphone even though I have just verified my info.  I know others that have this problem but can't get support to resolve it.

    Hi mpellichero,
    Thanks for visiting Apple Support Communities.
    The steps in this article can help if you are being asked for the password to your previous Apple ID:
    iOS 7: If you're asked for the password to your previous Apple ID when signing out of iCloud
    http://support.apple.com/kb/TS5223
    Best Regards,
    Jeremy

  • What's the best way to erase content but not the applications?

    I'm giving away my iMac to my niece. I want to erase all my  content files, libraries ,etc., but not the applications. What's the best way to do this, and to do it securely?

    If you have Downloaded and Upgraded to Lion See...
    Here is an excerpt of the SLA; the Lion license (purchased from MAS) is NOT transferable. The SLA is quite clear:
    B. If you obtained your license to the Apple Software from the Mac App Store or on Apple-branded physical media, it is not transferable. If you sell your Apple-branded hardware to athird party, you must remove the Apple Software from the Apple-branded hardware beforedoing so, and you may restore your system to the version of the Apple operating systemsoftware that originally came with your Apple hardware (the “Original Apple OS”) andpermanently transfer the Original Apple OS together with your Apple hardware, provided that:(i) the transfer must include all of the Original Apple OS, including all its component parts,printed materials and its license; (ii) you do not retain any copies of the Original Apple OS, fullor partial, including copies stored on a computer or other storage device; and (iii) the partyreceiving the Original Apple OS reads and agrees to accept the terms and conditions of theOriginal Apple OS license.
    Now Proceed...
    Boot from the original OS installer disk and do an Erase & Install.
    When the Mac reboots into Mac Setup Assistant Quit and shut it down.
    When the New Owner Boots it up it's a brand new Mac... just like when you got it.
    ( The Original Install Disc(s) should also be included with the sale )
    http://www.ehow.com/how_5852122_restore-imac-factory-settings.html

  • EBS Forms functional script runs fine in OpenScript but not from OTM

    Hi,
    I have an EBS forms functional test script which runs fine in OpenScript, but when scheduled from OTM, the web part runs fine but when it comes to forms, the script fails with the following error:
    Forms Object Not Found! XPath: //forms:window[(@name='NAVIGATOR')], Type: oracle.oats.scripting.modules.formsFT.helper.test.FormWindow, Cause: No Matches <Less>
    I have performed all the steps below already:
    1) Stopping the OATS Agent service and changing it to manual.
    2) Starting the command prompt and running the AgentManagerService command as mentioned in your forum.
    3) The console displays
    C:\>C:\OracleATS\agentmanager\bin\AgentManagerService.exe -c AgentManagerService
    .conf
    wrapper  | --> Wrapper Started as Console
    wrapper  | Launching a JVM...
    jvm 1    | Wrapper (Version 3.0.3)
    jvm 1    |
    4) I have added the test in the OTM with the following command line settings:
    -browser.type InternetExplorer -formsft.startup_timeout 30 -formsft.action_timeout 20 -formsft.response_timeout 10 -delayPercentage -1 -delayMin 0 -delayMax 5 -FormsAutomationEnabler.bat -enableForms true
    But each time the script fails, please note that my script has assets and they are placed within the script folder.
    Please help me on this at earliest.
    Thanks,
    Aarti

    Hello Aarti!
    I had the same problem and this steps help to solve the problem:
    You need to enable Forms Automation under agent. Please follow by below steps.
    1.open command prompt
    2.cd C:\OracleATS\agent
    3.FormsAutomationEnabler.bat -enableForms true
    4. Run script from OTM
    Attila

  • Script works in Script Debugger, but not a folder action - can u help?

    Hi
    I have written the following script to run as as folder action and it works fine when running it through in debug mode in Script Debugger, but as a folder action nothing happens.
    I wonder if someone could have a look and spot what the problem is.
    Thanks
    Nick
    on adding folder items to this_folder after receiving added_items
    set convertPath to "Macintosh HD:opt:local:bin:ffmpeg"
    tell application "Finder"
    set inPath to this_folder as alias
    set outPath to this_folder as alias
    set filesToConvert to (name of every item of inPath whose name extension is "m4a")
    end tell
    repeat with i from 1 to count of filesToConvert
    set fileName to removeExtension(item i of filesToConvert)
    do shell script POSIX path of convertPath & " -i " & (quoted form of ((POSIX path of inPath) & item i of filesToConvert)) & " -f mp3 -ar 44100 -ab 192k -acodec libmp3lame " & (quoted form of (POSIX path of outPath)) & quoted form of (fileName & ".mp3") & " -mapmetadata " & (quoted form of ((POSIX path of inPath) & item i of filesToConvert)) & ":" & (quoted form of (POSIX path of outPath)) & quoted form of (fileName & ".mp3")
    end repeat
    end adding folder items to
    to removeExtension(fileToParse)
    #display dialog fileToParse
    set prevTIDs to text item delimiters of AppleScript
    set text item delimiters of AppleScript to "."
    return first text item of fileToParse
    set text item delimiters of AppleScript to prevTIDs
    end removeExtension

    mmh, well, it seems something is awry with the triggering. other folder action scripts seemed to work fine, but now are intermittent.
    i created the following simple script:
    on adding folder items to this_folder after receiving added_items
    display dialog "1"
    end adding folder items to
    sometimes it works, sometimes not.
    what could be going wrong?

Maybe you are looking for

  • Sample rate off the audio input and out devices do not match - what to do?

    This is fundamental, I know, but nevertheless I can't find my way around it. I get this error message when trying to recor: Sample rate off the audio input and out devices do not match and am asked to do this: Use the appropriate operating system or

  • Thinkserver RD650 & 720ix RAID - How to get all drives showing up in TDM ??

    Hi, Have just received an RD650 with a 720ix controller. The chasis I have is the one where it provides a hybrid of disk form factors. So at the front left of the server it first has 6 x 2.5" bays, and then 3 x 3.5" bays, that makes up the first half

  • Driver program for NACHA format

    Hello Friends – We need to send ACH Payments in NACHA format. Can you pls let me know if this driver program is already available given by SAP. If so, Pls let me know the driver program I should assign at Payment Methods at Country level. Thanks

  • PAPI: Get processId of subflow process from Activity list of parent process

    Using PAPI or PAPI-WS how can I get the processId of the related process of a subflow activity? Specifically, I want to get the processId of all the subflow processes of a parent process provided I only have the parent process ID. For example, lets s

  • Change in Essbase outline..

    Hi All, I am using Hyperion Planning 11.1.1.1.0. I have a planning application with its required dimensions. Now i made some modifications to my database outline from EAS Console. But i dont see them getting reflected in the planning application. Can