Multiple CommandLineArgs ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • TristanD
    Forum Member
    • Oct 2006
    • 314

    Multiple CommandLineArgs ?

    Can an ams app hande multiple CommandLineArgs and if so how would that be done??
  • TJ_Tigger
    Indigo Rose Customer
    • Sep 2002
    • 3159

    #2
    Yes the _CommandLineArgs is a table passed to the application. Each item is an item in that table. You just need to be able to parse the table.
    TJ-Tigger
    "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
    "Draco dormiens nunquam titillandus."
    Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

    Comment

    • TristanD
      Forum Member
      • Oct 2006
      • 314

      #3
      can you give me a little example ?

      Comment

      • TJ_Tigger
        Indigo Rose Customer
        • Sep 2002
        • 3159

        #4
        ok it is not much but hopefully it will give you the idea. Build the project to an exe and then you can drag and drop music files onto the exe. The code should do the rest.
        Last edited by TJ_Tigger; 01-24-2007, 05:12 PM.
        TJ-Tigger
        "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
        "Draco dormiens nunquam titillandus."
        Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

        Comment

        • TristanD
          Forum Member
          • Oct 2006
          • 314

          #5
          * It doesn't matter how small the present is, Its the thought that counts*

          Thanks i will see if i can do anything with it

          Comment

          • TristanD
            Forum Member
            • Oct 2006
            • 314

            #6
            this isnt really what i ment.......

            i ment: can multiple thing be passed on by using cmdlineargs lets say.. Load image or something,,?

            Comment

            • TJ_Tigger
              Indigo Rose Customer
              • Sep 2002
              • 3159

              #7
              yes. Dropping multiple items on the exe puts those items as commandline argument items. In essence when the exe launches because items were dropped on the exe it executes in a fashion line this "path\cmdlnargs.exe path\music.mp3 path\music.mp3 path\music.mp3 path\music.mp3 path\music.mp3". multiple command line args.

              If you want to be more specific in what it is you are wanting to do with the command line one might then try to provide code that would also be more specific.

              Tigg
              TJ-Tigger
              "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
              "Draco dormiens nunquam titillandus."
              Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

              Comment

              • TristanD
                Forum Member
                • Oct 2006
                • 314

                #8
                ok let me be clear now

                I want to pass an url, a name and a filesize as commandlines to a program i made.. now i know how to pass on one cmdline but not how to make it work with more then one..

                Comment

                • TJ_Tigger
                  Indigo Rose Customer
                  • Sep 2002
                  • 3159

                  #9
                  ok that is a little clearer.

                  Will the arguments always be in that order and always present?

                  Are you wanting to use switches? (autorun.exe -u http://www.google.com -n name -s size)

                  What should the project do if the values are not present?
                  TJ-Tigger
                  "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
                  "Draco dormiens nunquam titillandus."
                  Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

                  Comment

                  • TJ_Tigger
                    Indigo Rose Customer
                    • Sep 2002
                    • 3159

                    #10
                    Here is another example that looks for three arguments if they are available. They are differentiated by being a string starting with http, a number and someother string. Probably not the most sophisticated but it works.
                    Attached Files
                    TJ-Tigger
                    "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
                    "Draco dormiens nunquam titillandus."
                    Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

                    Comment

                    • TristanD
                      Forum Member
                      • Oct 2006
                      • 314

                      #11
                      ur the greatest

                      the values are always present

                      Comment

                      Working...
                      X