Passing an argument to an application

How do I pass an argument to an application?

musicwind95 wrote:
I had downloaded the Swarm game, and in the Readme it says I can:
"The game has a difficulty switch that will give the computer or the player additional upgrades in the beginning. Run Swarm.app with the "-difficulty X" where X is a number from -30 to 30. The default setting is 0, giving the computer no advantage. Positive values will help the AI.
You can run Swarm in full screen mode by passing "-fullscreen" parameter to Swarm.app.
If you get tired of the awesome IndieBird splash screen, you can turn it off with "-nosplash". Just be sure to view it once in a while to keep the subliminal messages active."
I would I do this?
this means that the application has a command line version. check the help file to see if they discuss how to invoke it from command line. they should. in general the unix executable is located in the application package in the standard place so the following might work in terminal
/Applications/Swarm.app/Contents/MacOS/Swarm -difficulty 25 &

Similar Messages

  • My application needs to access web server. So, from that application how do i call firefox ? and how do i pass an argument such as url/web server ip address?

    My application needs to a access web server. So, from that application how do i call Firefox ? And how do i pass an argument such as the url/web server ip address?
    == This happened ==
    Not sure how often

    Try posting at the Web Development / Standards Evangelism forum at MozillaZine. The helpers over there are more knowledgeable about web page development issues with Firefox.
    [http://forums.mozillazine.org/viewforum.php?f=25]
    You'll need to register and login to be able to post in that forum.

  • Passing an argument in the SQL Query of a View Object

    Hi,
    It is possible that this question has been asked before, however I have searched for a half an hour in the forums and couldn't find a solution.
    I am also new to using JDeveloper and ADF. Here's the situation:
    I am developing an application that doesn't have to do anything else then displaying data from a database. Pretty straightforward actually.
    Now I have made a vew pages with several collapsible panels (af:showDetailHeader) and have setup the datasources (or so I thought).
    All that remains is:
    - drag & drop a view object, from the application module that I created, onto the collabsible panels, so a child element gets created which displays data from the database.
    - hack the layout so it looks like I want it to.
    The problem that I have is the following:
    I am using a 'User'-class that contains values I need when quering the database.
    That User-object is part of a user-session.
    What I want, for example, is to use the 'getPersonId()' function of that User-object and pass the argument to a SQL-query of a certain view-object.
    The query would become something like:
    'SELECT * FROM people WHERE people.personId = :someNumber'.
    Now I've read some stuff about variable binding, which is complemented by something like (backing bean code):
    getDBTransaction().getRootApplicationModule().getACertainViewObject().setWhereClauseParameter(1, user.getPersonId());
    The examples I have found that might match my wishes are not using business components, but EJB's. I am having difficulty with understanding the 'how'-part of variable binding.
    Also, I do not know enough of ADF to be able to create a situation like:
    'User loads page, collapsible panel 1 is fully shown, the others are undisclosed.'
    (meaning, that for panel1 a query has been executed.)
    'User clicks on collapsible panel 2 which triggers a backingbean that somehow retrieves data from a view object'.
    I would appreciate any help that somebody can give.
    If it is not too much of a problem, please provide code snippets in case you have a solution. I am new to ADF :(.
    -edit
    I am using JDeveloper 10.1.3.3.0 in case that is of any importance.
    Message was edited by:
    Hugo Boog

    Hello Stijn,
    I didn't think about a referenced bean rule in the faces-config.
    I added it right away and I am now able to set parameters of a View-object, not using a page button and before the page loads. You made my day!
    In case anyone ever reads this post again, the summary of how to generate a table based on a View-object using dynamic parameters.:
    1a: Go to faces-config.xml -> Overview tab'
    1b: Go to the menuitem "Referenced Beans"
    1c: Click on 'new' and select the existing bean you want to access data from and input a name. In this example I use name="user"
    2: Create a View-object using the wizard.
    2a: Specify the query you want in the menuitem 'SQL Statement'.
    Add the 'parameters' you want to. You will have something like:
    "SELECT * FROM someTable WHERE table.columnname LIKE :someArgument".
    - hint: if you want the result to become something like:
    "SELECT * FROM someTable WHERE table.columnname LIKE '%someArgument%'" then you have to add the '%'-characters in your code itself (read: someClass.setParameter("%" + someArgument);).
    2b: In the menuitem 'Bind Variables' you have to add the variables you are referring to in the query. If you look at the query in 2a, then you have to add a variable with name "someArgument".
    2c: Add the View-object to a Application Module (create one if nessecairy).
    3a: Open a .jsp(x) file. Drag the View-object created in step 2 from the 'Data Controls'-pane to the page.
    3b: Click on the '+' of the View-object in the 'Data Controls'-pane and open 'Operations' and drag 'ExecuteWithParams' to your page as a button.
    3c: We do not want to use a button, the action has to be executed immediatly. So In the page source remove the lines that were created after dropping 'ExecuteWithParams'.
    3d: Right-click on the page and select "Go to Page Definition".
    3e: Go to the action id that is called 'ExecuteWithParams#', where # is a number.
    Change the id to something useful.
    3f: Change the NDValue so it corresponds with the value you want.
    Example:
    <action id="getAddressData" IterBinding="AddressesView1Iterator"
    InstanceName="MyHRServiceModuleDataControl.AddressView1"
    DataControl="MyHRServiceModuleDataControl" RequiresUpdateModel="true" Action="95">
    <NamedData NDName="someArgument" NDType="java.lang.String"
    NDValue="#{user.personId}"/>
    </action>
    Note: It is possible to use the value of a Backing Bean in NDValue.
    Note 2: user is the bean I referred to in the faces-config.xml!
    3g: Under the executables item, add an 'invokeAction' to pass the parameter to the View-object before your JSP-file loads:
    <executables>
    <invokeAction Binds="getAddressData"
    id="loadAddressDataOfPersonIdInSession"
    Refresh="prepareModel"/>
    Thank Stijn Haus for this :)

  • Calling a function on an object passed as argument

    Hi everyone,
    i'm trying to call an actionscript function on an object passed as argument to a c function. Here are how I do :
    I have a class named test_class implemented as
    package
         public class test_class
              public var bliblou:int;
    and a C function that have to modify the bliblou var of an test_class object passed as argument. Here is my function :
    static AS3_Val test_obj_param( void* self, AS3_Val args )
         AS3_Val obj;
         AS3_ArrayValue( args, "AS3ValType ", &obj );
         AS3_Set( obj, AS3_String("bliblou"), AS3_Int( 123456 ) );
         return AS3_Null();
    Then I call the function in my actionscript main function like this :
    var loader:CLibInit = new CLibInit;
    var lib:Object = loader.init();
    var test:test_class = new test_class();
    lib.test_obj_param( test );
    But when the test_obj_param is trying to run, I obtain an error saying "unable to access a propriety of a null object".
    What am I doing wrong ? Is it possible to do what I try to (calling a function on an object passed as argument) ?
    Thanks in advance

    After a long trip to Alchemy possibilities and a lot of tests I have finally found a solution to my question.
    Instead of using AS3ArrayValue to get my objet, I use the AS3 function shift on the args array to get my object. Here is how I do
    static AS3_Val test_obj_param( void* self, AS3_Val args )
         AS3_Val emptyParams = AS3_Array("");
         AS3_Val obj = AS3_CallS( "shift", args, emptyParams );
         AS3_SetS( obj, "bliblou", AS3_Int( 123456 ) );
         AS3_Release(emptyParams);
         return AS3_NULL();
    Maybe there is a bug in the AS3ValType getter.

  • Passing data from one bsp application to another

    Hi,
    I have few queries that most of you would have done in ur projects:
    1. I want to pass data from one bsp application to another:
    eg based upon selected row of table view which populates material no and descriprion to another application which open the entire material master data.
    Now, i have both the pages in diff bsp applications in place but unable to pass the selected material code to the second bsp application.
    Had it been two different pages of same application I was able to achieve it with set parameter()
    2. To stop the application from reprcessing the data:
    eg: Suppose I have a bsp page where user fill details of a customer and on submitinng the details a customer is created in background and the entire page is disabled by my code. Even now if the user press refresh (F5) button then another customer gets created in the background. So basically i want to avoid the reprocess of the onSubmit event
    Few lines of sample code would be very helpful.
    Best Regards,
    Saurabh Tripathi

    Hi,
    When I am writing the following code in appl1/page1:
            export abc from transactionID
            to data buffer lv_page_data.
            CALL METHOD CL_BSP_SERVER_SIDE_COOKIE=>SET_SERVER_COOKIE
              EXPORTING
                NAME                  = 'TRANSACTIONID'
                APPLICATION_NAME      = RUNTIME->application_name
                APPLICATION_NAMESPACE = RUNTIME->application_namespace
                USERNAME              = ls_name
                SESSION_ID            = runtime->session_id
                DATA_VALUE            = lv_page_data
                DATA_NAME             = 'lv_page_data'
    and following code in appl2/page2:
      CALL METHOD CL_BSP_SERVER_SIDE_COOKIE=>GET_SERVER_COOKIE
        EXPORTING
          NAME                  = 'TRANSACTIONID'
          APPLICATION_NAME      = RUNTIME->application_name
          APPLICATION_NAMESPACE = RUNTIME->application_namespace
          USERNAME              = ls_name
          SESSION_ID            = runtime->session_id
          DATA_NAME             = 'lv_page_data'
        CHANGING
          DATA_VALUE            = lv_page_data
       IF lv_page_data IS NOT INITIAL.
         IMPORT abc to transactionid
           FROM data buffer lv_page_data.
       ENDIF.
    still the code doesn't work. Please explain and guide
    Best Regards,
    Saurabh Tripathi

  • How to pass an argument to a standalone java class in JDeveloper

    To the experienced:
    In JDeveloper when you write a java class with a main() method that takes no argument, you just right click the java file and select Run to run the program. But suppose the main() method takes arguments, how do you pass your arguments to the program? This is especially a problem as I use the studio version of JDeveloper (Versions 10.1.3.4 and 11.1.1.3) that each uses the version of JDK bundled with it, rather than the JDK (which is yet another different version) installed at the OS level of the PC.
    Many thanks for your help!
    Newman

    Hi, Puthanampatti,
    Suppose a java class has a main() method:
    <pre>
    public class FormatTerm {
    public static void main(String[] args) {
    String year = args[0];
    String semester = args[1];
    </pre>
    What I want to know is how to pass the arguments when invoking FormatTerm within JDeveloper (i.e., without going out of JDeveloper to invoke FormatTerm on a command line in DOS). I would appreciate it very much if you know how to do that in JDeveloper 11g (I use Version 11.1.1.3) and could help me out.
    Thank you very much for your help!
    Newman

  • How to pass the arguments dynamically to a Oracle procedure.

    Hi all..
    How to pass the arguments dynamically to a procedure.
    Thanks in Advance.

    I have a concurremt program which has 5 parameters right now. The user can add more parameters from front end as per their requirement.
    So that time.. the 6th parameter has to add to my procedure dynamically.
    Thanks.

  • Problem with entity passed as argument

    Hello !
    I have this code :
    Public Class myclass
    Private cont As MyentEntities
    Public Sub New( ByRef cnx As MyentEntities)
    cont = cnx
    End Sub
    Public Sub test
    If cont.mytable1.Count=1 then
    end if
    End Sub
    End class
    'On my main form :
    Dim E1 as MyEntEntities
    Dim m1 as myclass
    Private Sub MainForm_Load(sender As System.Object, e As System.EventArgs) Handles Me.Load
    E1=New MyentEntities
    m1=new MyClass(E1)
    End Sub
    Private sub fill_entity
    E1.MyTable1.Tolist
    End sub
    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
    m1.test
    End Sub
    When I click the button , I get an error :
    ....the entity of type 'MyTable1'  does not exist in the context.
    But I passed E1 with ByRef ?
    What's wrong ?
    Thank you !

    Hello,
    >>Problem with entity passed as argument
    With your provided code, I tested with my database, it is ok, below is the test demo which is similar with yours except the used databse:
    Public Class Form1
    Dim E1 As DFDBEntities
    Dim m1 As TestClass
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    E1 = New DFDBEntities
    m1 = New TestClass(E1)
    End Sub
    Private Sub fill_entity()
    E1.Orders.Tolist()
    End Sub
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    m1.test()
    End Sub
    End Class
    Public Class TestClass
    Private cont As DFDBEntities
    Public Sub New(ByRef cnx As DFDBEntities)
    cont = cnx
    End Sub
    Public Sub test()
    If cont.Orders.Count = 1 Then
    End If
    End Sub
    End Class
    Since we do not know your exact table structure, it is hard to know why this exception is thrown in your side, one reason I know is the .edmx file is not mapped correctly, you could check this link which describes various possibilities for the
    caused reason of this exception:
    http://stackoverflow.com/questions/5634392/ef-4-1-code-first-error-the-entity-type-sometype-is-not-part-of-the-model-for
    Or you could provide information as what database you are using, the table you are working with and the Entity Framework version.
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Status 51:No status record was passed to ALE by the application

    Hi All,
    my scenario is file->XI->IDOC.
    data is reaching r/3 system, but i see below error in WE02
    status 51: Application document not posted
    No status record was passed to ALE by the application
    registering the function module, linking FM with basic type with direction equal to 2, assigning FM to process code and inbound parameters of partner profiles are configured well.
    Plz let me know if i missed any steps.
    Thanks,
    Goutham

    use similar thread
    Inbound IDOC
    In WE19, Give the IDOC number & execute ... then put the cursor on the idoc control record . then click on the Standard Inbound push button on the application tool bar.it will show show all the details like partner no,type , message type , process code & function module name ...
    now put a break point in the function module .. & debug .
    if u r using customised inbound function module , then click on inbound function module .. there u will get a pop screen with FM name & debugging option in both background & foreground mode...
    Edited by: Dharamveer Gaur on Sep 19, 2008 2:17 PM

  • No status record was passed to ALE by the application

    Hi Experts,
    My requirement is something like this: The middleware (XI) is triggering an IDOC which is Inbound to SAP-ECC. This IDOC is used for posting of Financial documents (Invoice and Credit memos).
    I am processing the IDOC by writing a FM. Inside the FM I am reading data from IDOC and using a BAPI to post the documents. Then I am updating the status of the IDOC based on successful or unsuccessful posting.
    Issue: When XI triggers the IDOC, the IDOC is resulting in status "No status record was passed to ALE by the application". This is not the status that I am populating inside my FM. This means that the control is not entering the FM at all (please correct if I am wrong).
    My findings: When I re-process the same IDOC which resulted in error previously using WE19, the control goes inside my FM (obviously as I give my FM name in WE19 ) and the status gets populated according to my code.
    Problem that I am facing is only when I am trying to do an Intergration testing.
    I have searched SDN for same issue and found out that I need to clear/refresh all the necessary variables. I am doing that (and double checked it too).
    Please help me with this problem as I am running out of ways to find the solution (and time also ).
    Many thanks,
    Daljeet.

    Hi Daljeet,
    Please check SM58 logs.
    Thanks,
    Best regards,
    Prashant

  • Pass value from webdynpro abap application to bsp application

    Hello,
    I want call api bsp javascript from WDA exchanging values between the two applications.
    I have a solution but it is with portal integration.
    I would like a procedure without using the portal.
    Webdynpro and BSP only.
    How can I do this ?
    Thanks for your help.

    Hi,
    Refer these threads-
    Re: Passing Object ref to Webdynpro Application while calling from BSP screen
    Both BSP and WDA has an URL associated with it.
    In the WDA, create an LinkToUrl UI element upon which triggers the BSP application and pass the parameters to this BSP application. Check for this BSP application has also parameters in it.
    Refer this link Re: Read SICF URL
    Regards,
    Lekha.

  • Passing rule arguments in workflow

    Hi,
    I am trying to change the email of a user through workflow by using a rule. I am passing rule arguments in workflow not in the rule. but the argument values are not populating. here is the trace of the activity.
    <set name='testview.global.email'>
    <rule name='sri'>
    <argument name='firstname'>
    <ref>global.firstname</ref> --> null
    </argument> --> null
    <argument name='lastname'>
    <ref>global.lastname</ref> --> null
    </argument> --> null
    <Rule name='sri'>
    <concat>
    <ref>firstname</ref> --> null
    <ref>lastname</ref> --> null
    <s>@waveset.com</s> --> @waveset.com
    </concat> --> @waveset.com
    </Rule> --> @waveset.com
    </rule> --> @waveset.com
    </set> --> null
    I don't understand why it is (letters in bold) returning null vlaue.
    any help
    thanks in advance
    Srinivas

    hi,
    Try testview.global.firstname in place of global.firstname and
    testview.global.lastname in place of global.lastname.
    bcz in workflow u can access to user attributes by its view.
    thanx
    shant

  • Pass data from one web application to another web application

    Hi,
    Please provide suggestion for following scenario:
    Scenario: Basically the aim is to transfer large amount of data from one application to another and display JSP of second application.
    User enteres data on a JSP of one web application. When he submits that data, another web application opens in new window and data from first application should be passed to this second web application. Another web application will display that data on its own JSP. User can perform whatever he wants on second application screen.
    Possible solutions:
    1) response.sendRedirect(): This makes GET request. But, there is large data to send. So, GET is not effective.
    2) forward(request, response): Can't use as I have to pass data to different application that is in another context.
    3) URLConnection: Here, I can make POST request and set attributes in HTTP request and make connection to another application. I can pass data using output stream. But, I can't display second application JSP to user even if I use input stream to read response. Because control will be ultimately in first application only.
    Is there any othe method to achieve this or any of the above options extendable?
    Please give your inputs.

    Hi,
    According to your post, my understanding is that you want to migrate list data from one web application to another.
    We can migrate list data programmatically, there are some articles for your reference.
    http://blogs.msdn.com/b/tejasr/archive/2007/11/12/code-snippet-copy-list-data-between-sites-programmatically.aspx
    http://www.fivenumber.com/copy-sharepoint-list-items-from-one-site-to-another-programmatically/
    http://geekswithblogs.net/AnneBougie/archive/2009/01/23/copy-a-sharepoint-list.aspx
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • Is it possible to pass an argument to the function triggered by an event handler?

    Hello All,
    Trying to migrate my way of thinking from AS2 to CS4/AS3.
    Ok, I have 2 buttons on the stage. Each button does almost
    the same thing, so I want to create a single function, and each
    button calls that same function (we'll name that function
    "Navigate")... however, the function will need to end up doing
    something different dependant on which button was clicked.
    So, previously, in AS2, I would've added some code onto the
    buttons themselves with on(release) methods (see CODE EXAMPLE 1)
    So, each button effectively calls the Navigate function, and
    passes a different frame label to the function.
    Now, I'm trying to recreate this functionality in AS3. As you
    all know, on(release) has been done away with (still don't know
    why), but we now have to use event handlers, so I'm trying to
    figure out a way to pass a different frame label argument to the
    Navigate function. Currently I can achieve that by using a switch
    statement to test which button was clicked, and act accordingly
    (see CODE EXAMPLE 2).
    In this over-simplified example, this works fine, but in the
    real world I'm going to have more than 2 buttons, and the Navigate
    function would probably be much more complicated...
    So, I would like to be able to pass an argument(s) (like in
    the AS2 example) to the Navigate function... perhaps in the
    addEventListener() method? I tried this, but got compiler errors
    (see CODE EXAMPLE 3):
    The Million Dollar Question:
    Is it possible to dynamically pass/change an argument(s) to a
    function which is triggered by an event listener? (Or is the event
    that triggered the function the only argument you can have?)
    If this isn't possible, I'd greatly like to hear how you
    folks would handle this (other than having a switch statement with
    12 cases in it)???

    I've found a couple solutions that I'll post below for
    prosperity...
    You could create a Dictionary keyed by the prospective event
    targets and store any information in there you want associated with
    them. Then the navigate function can check that dictionary to get
    it's parameters:
    // Code //
    Button1.addEventListener(MouseEvent.CLICK, Navigate, false,
    0, true);
    Button2.addEventListener(MouseEvent.CLICK, Navigate, false,
    0, true);
    var buttonArgs:Dictionary = new Dictionary();
    buttonArgs[Button1] = "FrameLabel1";
    buttonArgs[Button2] = "FrameLabel2";
    function Navigate(e:MouseEvent):void{
    gotoAndStop(buttonArgs[e.target]);
    This in my eyes, is about the same amount of work as writing
    a long switch statement, but a little more elegant I suppose.
    I had a little trouble understanding the next solution,
    because I didn't quite understand an important piece of information
    about event listeners. The addEventListener () requires a Function
    as the 2nd argument passed to it.
    It didn't quite click until someone pointed it out to me:
    Navigate is a Function...
    Navigate("FrameLabel1") is a Function
    call...
    So by writing just
    Navigate, I'm not actually calling the function at the time
    of the addEventListener call, I'm just supplying the event listener
    with a reference to the name of the function. Then, when the
    listener is triggered, the listener will call (and pass a
    MouseEvent argument to) the Navigate function.
    Conversely, by writing
    Navigate("FrameLabel1") as the 2nd argument, the event
    listener trys to execute the Navigate function at the time the
    addEventListener is instantiated. And, since, in this example, the
    Navigate function returned as ":void" a compile error would occur
    because as I stated, an event listener requires a Function data
    type as the 2nd argument. This would basically be like writing
    addEventListener(MouseEvent.Click,
    void, false, 0, true)
    However, there is a way around this... basically, instead of
    defining the Navigate function as returning a void data type, you
    define it as returning a Function data type, and then nest another
    function (which actually contains the actions you want to perform)
    inside of it.
    Button1.addEventListener(MouseEvent.CLICK,
    Navigate("FrameLabel1"), false, 0, true);
    Button2.addEventListener(MouseEvent.CLICK,
    Navigate("FrameLabel2"), false, 0, true);
    function Navigate(myLabel:String):Function{
    return function(evt:MouseEvent):void{
    gotoAndStop(myLabel);

  • Pass an argument from external jsx to html panel?

    Hi everyone,
    Can you please tell me if it's possible somehow to listen to event from the external jsx in html panel? What I'm trying to do is to pass an argument from JSX to HTML Panel and to update
    the panel with it.
    Many thanks,
    Sergey

    Hi Sergey!
    What I was suggesting privately to you (I report this here for the others' sake) is to use soon-to-be-released CEP5 technology: http://blogs.adobe.com/cssdk/2014/04/introducing-cep-5.html
    Chiefly, the part that says:
    Call from ExtendScript into HTML DOM: Most of the currently supported Adobe apps (including but not only Photoshop CC and Illustrator CC) will include a new ExternalObject which provides an API that allows developers to dispatch events from ExtendScript to the JavaScript/HTML5
    But we have to wait for the next update of CC apps to support it!
    Regards
    Davide Barranca
    www.davidebarranca.com
    www.cs-extensions.com

Maybe you are looking for