How to write script calling with parameter [CS6-js (Mac)]

I'm doing script for produsing some sound:
var mString = "tell application \"Play Sound\"\rplay \"Mac:Users:a.ivanov:Sounds:" + "copied.wav" + "\"\rend tell"
app.doScript(mStrtest, ScriptLanguage.applescriptLanguage);
This work well.
Now, i'd like to call this script from other script with any desired wav-file (not only "copied.wav" )). How to write down correctly calling other script with param.
Thanks

Hi,
var myParameters = ["Mac:Users:a.ivanov:Sounds:", "copied.wav"];
var myAppleScript = "tell application \"Play Sound\" to play  ((item 1 of arguments) & item 2 of arguments)";
app.doScript(myAppleScript, ScriptLanguage.applescriptLanguage, myParameters);
doScript also excepts file, so if wanted save the line myAppleScript as *.jsx and insert the Filereference in the doScript
P.S. Assume MacOsx prior 10.5 may not include afplay

Similar Messages

  • How to write sql query with many parameter in ireport

    hai,
    i'm a new user in ireport.how to write sql query with many parameters in ireport's report query?i already know to create a parameter like(select * from payment where entity=$P{entity}.
    but i don't know to create query if more than 1 parameter.i also have parameter such as
    $P{entity},$P{id},$P{ic}.please help me for this.
    thanks

    You are in the wrong place. The ireport support forum may be found here
    http://www.jasperforge.org/index.php?option=com_joomlaboard&Itemid=215&func=showcat&catid=9

  • How can I make Web Photo Gallery with Photoshop CS6 on Mac 10.6.8?

    How can I make Web Photo Gallery with Photoshop CS6 on Mac 10.6.8?

    You can use Bridge to create a web photo gallery.
    Here's a video that shows you how to do it:
    Hope this helps!
    Julia

  • How to write a applet with multiple menu

    Hi all,
    How to write a applet with multiple menu or please tell me where can I get a examples
    thanks

    i'm writing a project and it seem not work with browser. If anyone can help please leave me a e-mail so that i can send my source to you.
    Thanks so much

  • How can I video call with some one who doesnt have an iPhone?? I have the new iPhone 4s

    How can I video call with someone who doesnt have and iPhone???? I have the new iPhone 4s

    Hi get the app called Fring which allows you to do it as long as they have fring too

  • How to make slide images with Dreamweaver CS6?

    How to make slide images with Dreamweaver CS6? Please teach me.

    Hello
    in addition to Jon's hint, I'll send you some links to nice sliders (have fun with the different representations ):
    http://sandbox.scriptiny.com/javascript-slideshow/
    http://jquery.malsup.com/cycle/
    http://wowslider.com/best-jquery-slider-crystal-linear-demo.html
    http://www.jcoverflip.com/demo
    http://www.jacksasylum.eu/ContentFlow/
    http://addyosmani.com/blog/jqueryuicoverflow/
    You only need to use the source code to implant these shows there where you want. In my eyes it would be the best that you use first a very new and blank DW file to perform (maybe in LiveView) the one or the other.
    Hans-Günter

  • How to write a messenger with using java?

    May I know how to write a messenger with using java? The messenger need included two functions which are file transfer and add users to join the conversation.
    Thank you.

    Ok, so you need to start from the beginning, the requirements, is it a swing (i.e. GUI) app, web app, console, etc...?
    As stated by sprizor making an IM client is no easy task, you need to both implement the server side and the client side, which both communicate with each other, file transfers are also quite complex, and even maintaining a multi-user chat can be quite difficult.
    If you are after a Web Based app, then you will need to look into Push technologies, like Grizzly Comet which is a nice wrapper for the NIO java stuff:
    https://grizzly.dev.java.net/
    Good luck...

  • How to disable reject call with a message? Xperia Z(c6603) KK4.4.2 (.230)

    How to disable reject call with a message? please help
    Xperia Z(c6603) KK4.4.2 (.230)

    I selectd this device because i was counting on the brands traditional stiriving forcsup. Quality.This was a mistake.About 1000 euros for a device that looses quality with every update and consumes my time with frustrating experiences all along.Very poor development i must say.

  • How do I answer calls with the KITKAT update?  I hit the flashing button but it's still ringing?  Where are the Answer settings?

    How do I answer calls with the KITKAT update?  I hit the flashing button but it's still ringing?  Where are the Answer settings?

    Aha!  Thank you!!!  That was not obvious. Sometimes I don't get the green and red icons.  So it's slide it to the right for answering and slide to the left for voice mail.

  • How do I share iTunes with multiple users on Mac mini?

    How do I share iTunes with multiple users on Mac mini?

    You have to turn on Sharing and then Authenticate Sharing on the other devices. You can have up to 5.

  • Major glitches with Encore CS6 on Mac

    Hi, I am having a major problem with Encore CS6 on mac. Whenever I have tried to build a DVD (using a DVD+R disk in the superdrive of my MBP) it makes my screen glitch, and my computer freeze up.
    I would appreciate it if you could help me with this ASAP because I need to have this project done no later than the 20th of December.

    I'm running OSX 10.8 Mountain Lion on my mid 2012 Macbook Pro with 16Gb of Ram, and a 2.6GHz dual core i7 processor.
    What do you mean by build to a folder or image? (I'm still relatively new to Encore.)
    Here's what keeps happening

  • I want to boot my new mini mac in OX 10.6.8 how can i do it with the last mini mac 2,3 Gh i7 ?

    i want to boot my new mini mac in OX 10.6.8 how can i do it with the last mini mac 2,3 Gh i7 ?

    Stef207 wrote:
    i want to boot my new mini mac in OX 10.6.8 how can i do it with the last mini mac 2,3 Gh i7 ?
    Those specifications are not for the "last" mac mini, but for the mid-2011 Mac Mini: Macmini5,2.
    While that model came with Lion and could not be downgraded to Snow Leopard out of the box, look for the work done by newfoundglory https://discussions.apple.com/people/newfoundglory in this thread on how to accomplish an install of Snow Leopard that will allow that model of Mac Mini to boot into Snow Leopard, if it is that important to you:
    https://discussions.apple.com/thread/3209335?start=0&tstart=0

  • Please help; how to write XML document with JSP?

    I try to write XML document with JSP...
    But I got wrong results everytime.
    The result is not XML file displayed in the browser,
    but HTML file.
    I even tried to use HTML special code for <, >, "
    but still display as HTML file not XML file.
    How to do this?
    Thanks in advance. I put my codes below.
    Sincerely,
    Ted.
    ================
    Here is code for the JSP (called stk.jsp):
    <%@ page contentType="text/xml" %>
    <%@ page import="bean.Stock" %>
    <jsp:useBean id="portfolio" class="bean.Portfolio" />
    <% java.util.Iterator pfolio = portfolio.getPortfolio();
    Stock stock = null; %>
    <?xml version="1.0" encoding="UTF-8"?>
    <portfolio>
    <% while (pfolio.hasNext())
    stock = (Stock) pfolio.next(); %>
    <stock>
    <symbol>
    <%=stock.getSymbol() %>
    </symbol>
    <name><%=stock.getName() %> </name>
    <price><%=stock.getPrice() %> </price>
    </stock>
    <% } %>
    </portfolio>
    =================
    Here is the code for bean.Stock:
    package bean;
    public class Stock implements java.io.Serializable
    String symbol, name;
    float price;
    public Stock(String symbol, String name, float price)
    this.symbol = symbol;
    this.name = name;
    this.price = price;
    public String getSymbol()
    return symbol;
    public String getName()
    return name;
    public float getPrice()
    return price;
    ===============
    And here is bean.Portfolio:
    package bean;
    import java.util.Iterator;
    import java.util.Vector;
    public class Portfolio implements java.io.Serializable
    private Vector portfolio = new Vector();
    public Portfolio()
    portfolio.addElement(new Stock("SUNW", "Sun Microsystem", 34.5f));
    portfolio.addElement(new Stock("HWP", "Hewlett Packard", 15.15f));
    portfolio.addElement(new Stock("AMCC", "Applied Micro Circuit Corp.", 101.35f));
    public Iterator getPortfolio()
    return portfolio.iterator();
    }

    Hi
    I'm not sure whta your query is but I tested your code as it is has been pasted and it seems to work fine. There is an XML output that I'm getting.
    Keep me posted.
    Good Luck!
    Eshwar Rao
    Developer Technical Support
    Sun microsystems
    http://www.sun.com/developers/support

  • How make a normal call with ipad mini

    i want to call and send text message by normal way, do you know how can i do? or wich app i need to download??

    There are texting apps that can be downloaded for texting to non iOS devices. I have no idea how well they work. I have never used one.
    https://itunes.apple.com/us/app/text-me!-free-texting-sms/id338088432?mt=8
    The closest that you can come to making a call with an iPad would be to use an app like Skype. You can't make a "normal" call on the iPad since it is not a phone.

  • How to start microsof access with parameter through runtime.exec

    Hi,
    I try to start access with parameter like this:
    String[] cmd = new String[4];
    cmd[0] = "C:\\Programme\\Microsoft Office\\OFFICE11\\MSACCESS.EXE";
    cmd[1]= "C:\\MyDB.mdb ";
    cmd[2] = "/cmd";
    cmd[3] = "parameter1 parameter2";
    Runtime rt = Runtime.getRuntime();
    Process proc = rt.exec(cmd);
    However the access mdb startet but it seems not to take the parameter i want to put in to access.
    Have anyone an Idea, what is wrong here?
    Thanks

    Hi
    What do you expect Access to do?
    The /cmd command line option sets the value that is returned by VBA Command function (see http://msdn2.microsoft.com/en-us/library/aa211469(office.11).aspx).
    If you want to start a macro, you would need the /x switch (see http://office.microsoft.com/en-us/access/HA101666051033.aspx).
    Hope this helps
    Christoph

Maybe you are looking for

  • A bookmark folder with thousands of bookmarks I've saved over many years has disappeared and I can't find it in the bookmarks menu or recycle bin

    I've also tried doing a restore by choosing the "Show all bookmarks" "Import and backup" "Restore" to a day earlier and the folder still didn't show up. When I tried to do this again using one of the many earlier dates I had seen that were available

  • Poor jpg quality in video files

    Hi, My apologizes if my questions are common knowledge. In general, why does still photos look blurry and IMO crappy in video files (made in Premiere)? For example, why doesn't a 900 x 600 px. jpg in a 900 x 600 px. flv video look exactly like in Pho

  • Is there any driver sound for osx maverick 10.9?

    after install os x maverick i lost the sound on my macbook white  13 inch..all i can hear is the "chan" at the beginning ..itunes works fine..but i cant hear anything and with headphone still not sound...help me please i have 4 days without sound =(

  • Can you edit an image out of a photo

    I'm using iPhoto version 9.6 on my macbook with OS X 10.10 (Yosemite).  Is it possible to remove an image (say, an object or a person, face, etc) in iPhoto editing?

  • User Tracking delete interval

    CM User Tracking delete interval what is the diff between "End Host Table" and " History Table "? also these option can't be set lower than "7" days? I want delete the entery more than 2 days old and I want to keep only the latest entery. but the num