Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

xbasic code help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    xbasic code help

    This should be something simple but i can not find it.

    doing a

    sys_shell("C:\"testA"\testB and so on works just fine but when i use a word with a space it will nit work.

    sys_shell("C:\"test A"\test B it will not work?

    When i have a space in words like the test A it will not work but will work if it is testA.

    I need to go into

    sys_shell("C:\Program Files

    How can i make this work with the space ..Program Files

    I have tryed

    Program Files
    Program_Files
    Program-Files
    "Program Files"
    ProgramFiles

    but none of this will work

    How can i make xbasic work with space's?

    Thanks

    #2
    Re: xbasic code help

    Looking at the WebHelp:

    sys_shell("c:\windows\notepad.exe c:\windows\a5.ini",1)

    The quotes should enclose the complete command line string as above.

    So sys_shell("c:\program files\Program Dir\Program Name.exe",1)

    Comment


      #3
      Re: xbasic code help

      Originally posted by Doug Page View Post
      Looking at the WebHelp:

      sys_shell("c:\windows\notepad.exe c:\windows\a5.ini",1)

      The quotes should enclose the complete command line string as above.

      So sys_shell("c:\program files\Program Dir\Program Name.exe",1)

      I have it this way but it will not work.

      Here is what i am doing.

      This works with the test folders i made.
      sys_shell("C:\testA\testB\4x6.exe C:\testA\testB\Trigger.jpg",1)

      Now using the real folderS i need it to work with it will not work.
      sys_shell("C:\Program Files\Hollywood Photo Magic\Drops\4x6.exe C:\Program Files\Hollywood Photo Magic\Drops\Trigger.jpg",1)

      What am i doing wronf here?

      The folders are all made

      C:\Program Files\Hollywood Photo Magic\Drops

      If i take the one that works
      sys_shell("C:\testA\testB\4x6.exe C:\testA\testB\Trigger.jpg",1)

      And remane one of the folders to test A and use
      sys_shell("C:\test A\testB\4x6.exe C:\test A\testB\Trigger.jpg",1)

      It then will not work?

      Comment


        #4
        Re: xbasic code help

        It may be that the program, 4x6.exe, can't interpret the long path name -- it may not even be sys_shell's fault.
        You can work around whatever the problem is by executing (in a command prompt window)
        subst h: c:\program files\Hollywood Photo Magic\Drops

        and then issue
        sys_shell("h:\4x6.exe h:\trigger.jpg",1)

        which should work.

        Or you can do something like this:
        cmd="subst h: c:\program files\Hollywood Photo Magic\Drops"
        cmd=cmd+crlf()+"h:\4x6.exe h:\trigger.jpg"
        save_to_file(cmd,"c:\myCmd.bat")
        sys_shell("c:\myCmd.bat",1)

        or even just
        cmd="c:\program files\Hollywood Photo Magic\Drops\4x6.exe c:\program files\Hollywood Photo Magic\Drops\trigger.jpg"
        save_to_file(cmd,"c:\myCmd.bat")
        sys_shell("c:\myCmd.bat",1)

        Comment


          #5
          Re: xbasic code help

          Since you have discovered that the extra space in the path is causing the problem, does that ring any bells for you? You are passing a program name and file to open with that program to the sys_shell() function. What is likely happening is that the command inside the sys_shell() actually using dos or some command parser that is choking on the space.

          Not at all certain but you might try

          Code:
          sys_shell("'C:\test A\testB\4x6.exe' 'C:\test A\testB\Trigger.jpg'",1)
          Sorry, my solution is no good and I can't duplicate your issue with spaces in the path name. Peter, as always, is likely correct.
          Last edited by Stan Mathews; 01-24-2007, 12:06 AM.
          There can be only one.

          Comment


            #6
            Re: xbasic code help

            Ok i tryed them all both from Peter and from Stan and none of them work.

            Peter
            (It may be that the program, 4x6.exe, can't interpret the long path name)

            This is not the case i do not think as it will work as long as i have no space in any of the file names. I have been testing it for hours now trying to get it to work.

            It needs to go into the Program Files to run things.

            When i make a folder called Program and in that a folder called Hollywood and in that Drops it all works.

            sys_shell("C:\Program\Hollywood\Drops\4x6.exe C:\Program\Hollywood\Drops\Trigger.jpg",1)

            It's something with that space in the words that will not let it work right.

            I can rename my Hollywood Photo Magic file to Hollywood-PM or something but the Program Files will be the same on everyones PCs for the place this will need to run from.

            Comment


              #7
              Re: xbasic code help

              Here's a quote from the help docs.... This is your problem:

              Argument - Program Name: The name of the program to run.
              Arguments used by the program are separated by space characters.
              Give this a try...

              Code:
              sys_shell([COLOR=red]"[/COLOR]C:\test A\testB\4x6.exe[COLOR=red]" "[/COLOR]C:\test A\testB\Trigger.jpg[COLOR=red]"[/COLOR],1)

              or try:

              Code:
              sys_shell("C:\'test A'\testB\4x6.exe C:\test A\testB\Trigger.jpg",1)

              I don't have alpha here to test it.... but I think you need to seperate the path from the arguments...

              Comment


                #8
                Re: xbasic code help

                Jeff i tryed both but for both i get a pop up saying

                Script TEMPLATE line 1
                Out of memory

                Comment


                  #9
                  Re: xbasic code help

                  hmm... give this one a shot.

                  Code:
                  sys_shell("C:\Program Files\Hollywood Photo Magic\Drops\4x6.exe [COLOR=red]'[/COLOR]C:\Program Files\Hollywood Photo Magic\Drops\Trigger.jpg[COLOR=red]'[/COLOR]",1)

                  Comment


                    #10
                    Re: xbasic code help

                    I just got my copy of alpha installed on my laptop... that last suggestion should work. It works on my machine. :)

                    sys_shell("C:\Documents and Settings\All Users\Desktop\notepad.exe 'C:\Documents and Settings\All Users\Desktop\Notepad Files\payments.txt'")
                    It appears you need the single quotes around the argument.

                    Comment


                      #11
                      Re: xbasic code help

                      Originally posted by Jeff@Listbrokers View Post
                      hmm... give this one a shot.

                      Code:
                      sys_shell("C:\Program Files\Hollywood Photo Magic\Drops\4x6.exe [COLOR=red]'[/COLOR]C:\Program Files\Hollywood Photo Magic\Drops\Trigger.jpg[COLOR=red]'[/COLOR]",1)

                      Yes i tryed that one to and it will not work.

                      Photoshop says
                      Could not run the droplet becouse the file could not be found

                      Thanks

                      Comment


                        #12
                        Re: xbasic code help

                        I changed my folder name so it might work more easy it is set up like this now.

                        sys_shell("C:\Program Files\HollywoodPM\Drops\4x6.exe 'C:\Program Files\HollywoodPM\Drops\Trigger.jpg",1)

                        Comment


                          #13
                          Re: xbasic code help

                          [quote=Digitaled;407888]I changed my folder name so it might work more easy it is set up like this now.

                          sys_shell("C:\Program Files\HollywoodPM\Drops\4x6.exe 'C:\Program Files\HollywoodPM\Drops\Trigger.jpg'",1) I don't know if it was a typo or not but you were missing the ending single quote. (I added it in red) [/quote]

                          Did that work? It shouldn't matter that you changed Hollywood Photo Magic to HollywoodPM... with the quotes around the argument it's not parsing the path at the spaces anymore. As long as you have the single quotes and double quotes in the right spot it should accept any correct, valid path.

                          Comment


                            #14
                            Re: xbasic code help

                            Jeff do you have Photoshop on you laptop if so here are the files to try and make work.

                            Or anyone who has Photoshop and wants to give this a try.

                            Here is a link to get the 4x6.exe file
                            http://grandwebsite.com/4x6.exe

                            and here is the Trigger,jpg file
                            http://grandwebsite.com/Trigger.jpg

                            The file set up is
                            C:\Program Files\HollywoodPM\Drops

                            Place both the 4x6.exe and the Trigger.jpg into the Drops folder.

                            Comment


                              #15
                              Re: xbasic code help

                              [QUOTE=Jeff@Listbrokers;407889]
                              Originally posted by Digitaled View Post
                              I changed my folder name so it might work more easy it is set up like this now.

                              sys_shell("C:\Program Files\HollywoodPM\Drops\4x6.exe 'C:\Program Files\HollywoodPM\Drops\Trigger.jpg'",1) I don't know if it was a typo or not but you were missing the ending single quote. (I added it in red) [/quote]

                              Did that work? It shouldn't matter that you changed Hollywood Photo Magic to HollywoodPM... with the quotes around the argument it's not parsing the path at the spaces anymore. As long as you have the single quotes and double quotes in the right spot it should accept any correct, valid path.
                              Just tryed it and it will not work.

                              Comment

                              Working...
                              X