SourceDrive

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • ScottDuncan
    Forum Member
    • Oct 2003
    • 116

    SourceDrive

    Can I get the _SourceDrive the exe was executed from? I used the _SourceDrive method but it thinks the G = C. G is USB, is this a
    problem?
  • Josué Alba

    #2
    Well the usage is

    _SourceDrive.."\\folder"

    Even when the source driver is the root should be concatenated with the "\\" like:

    _SourceFolder.."\\"

    Comment

    • ScottDuncan
      Forum Member
      • Oct 2003
      • 116

      #3
      thank you for the quick reply. It's working fine if the root is C. but if my exe is on G it thinks its on C. Any Ideas?

      Comment

      • rhosk
        Indigo Rose Customer
        • Aug 2003
        • 1698

        #4
        Is this a comp. single file exe?
        Regards,

        -Ron

        Music | Video | Pictures

        Comment

        • ScottDuncan
          Forum Member
          • Oct 2003
          • 116

          #5
          Yes Yes (the forum says "Yes" is too short)

          Comment

          • ScottDuncan
            Forum Member
            • Oct 2003
            • 116

            #6
            I recompiled as a "Folder" and it recognizes G. It's not a problem for this project to be in the "Folder" format. Is there a reason why i shouldn't be able to create a .txt on G (usb)?

            Comment

            • rhosk
              Indigo Rose Customer
              • Aug 2003
              • 1698

              #7
              Thought so, well first try publishing into a folder - make sure it works that way. Then, there's a code (escapes me right now) to tell the system where the SFX is originating. Does it need to be a single exe? Unless it's a fairly small project, I stay away from SFX, MO

              Edit - posted at the same time, it's up to you whether to publish as SFX. Like I said, there is some initialization code to use. Do a search for single file exe & I'm sure you'll run across it. If you can publish to a folder, again, I think you're better off, especially if you add stuff later
              Last edited by rhosk; 02-04-2005, 12:22 PM.
              Regards,

              -Ron

              Music | Video | Pictures

              Comment

              • rhosk
                Indigo Rose Customer
                • Aug 2003
                • 1698

                #8
                WHat's the code you're using for G:? May have to be network syntax? Just guessing.
                Regards,

                -Ron

                Music | Video | Pictures

                Comment

                • ScottDuncan
                  Forum Member
                  • Oct 2003
                  • 116

                  #9
                  here's the code that I believe will write a TXT. It works if I write to C.

                  Time = System.GetTime(TIME_FMT_MIL);
                  Drive = _SourceDrive;
                  Paragraph.SetText("Paragraph", Drive);--Diagnostic Text

                  TextFile.WriteFromString(_SourceDrive.."//"..Time..".txt", result, false);

                  Comment

                  • rhosk
                    Indigo Rose Customer
                    • Aug 2003
                    • 1698

                    #10
                    Try this...totally a shot in the dark for me, not a network guy

                    TextFile.WriteFromString(_SourceDrive.."////"..Time..".txt", result, false);

                    If that doesn't work, try 'application.error' check to see what it says.
                    Regards,

                    -Ron

                    Music | Video | Pictures

                    Comment

                    • ScottDuncan
                      Forum Member
                      • Oct 2003
                      • 116

                      #11
                      It's working. I went back to the project to double-check that the EXE was still writing to C. It wasn't. The way I was concatenating "Time" was breaking the process. I hard coded the "Time" and all works fine. I still don't know why the concatenation didn't work.

                      Comment

                      • ScottDuncan
                        Forum Member
                        • Oct 2003
                        • 116

                        #12
                        rhosk,
                        I wrote my last post before seeing your last. I just fixed the concatenation and problem solved (except the concatenation).

                        Comment

                        • Intrigued
                          Indigo Rose Customer
                          • Dec 2003
                          • 6138

                          #13
                          SFXSOURCE: - USB Hardrive - EXE - Intrigued

                          Put this code in a new project and then Build it. Then copy it to your USB Hardrive and then run it.

                          Code:
                          Drive = String.Replace(_CommandLineArgs[1], "SFXSOURCE:", "", true);
                          
                          Dialog.Message("", Drive);
                          Now, that's the easiest way I can find to parse out the correct file path.

                          Credit for the SFXSOURCE: use: Brett
                          Intrigued

                          Comment

                          • ScottDuncan
                            Forum Member
                            • Oct 2003
                            • 116

                            #14
                            I think the ":" in the "Time" variable it triggering the error. I can make a few adjustments to fix this.

                            Ps. Thanks for all the help rhosk, the people at this forum just don't failed to help with whatever they can. I'm gonna make a point to try to assist in the forum more, the forum is one of the best features of AMS.

                            My AMS projects are based in art and philosopy (actually my life is based there), i recently posted a simple "Xplug" at my website (in the "Xplugz" section). I build the Xplugz in AMS. I have about 25 Xplugz so far, but have only posted the one as a sample. I'm still working on the backside code of all of them. Shortly i'll have more up.

                            homemadebyx.com or digitallyoverwhelmed.com

                            Comment

                            • ScottDuncan
                              Forum Member
                              • Oct 2003
                              • 116

                              #15
                              Intrigued, Thanks,
                              you saved me the time to figure it out.

                              Comment

                              Working...
                              X