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

sys_shell and out of memory

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

    sys_shell and out of memory

    Hi

    I am trying to use sys_shell but when I execute the following command line I get an OUT OF MEMORY error message.

    sys_shell("C:\ZIP-IT.EXE /Ed:\shipping\updates.cfu")

    I've looked at the X-basic manual no mention is made about memory usage or problems

    Thanks for the help.

    Robert

    #2
    RE: sys_shell and out of memory


    Robert,

    First thing I'd verify is that this sequence of characters will work correctly:

    C:\ZIP-IT.EXE /Ed:\shipping\updates.cfu

    -- tom

    Comment


      #3
      RE: sys_shell and out of memory

      Hi Tom

      I first created a short cut on my desktop using this command line. The short cut ran fine. I then copied the target line to my script. It won't work. I also tried to run only the EXE file zipit.exe but still the same message.

      Thanks

      Robert

      Comment


        #4
        RE: sys_shell and out of memory


        Robert, try this. Put the command line in a batch file, verify that it works correctly, and then use Sys_shell() to run the batch file.

        -- tom

        Comment


          #5
          RE: sys_shell and out of memory

          Hi Tom

          I tried it and it works. One interesting point though. When I changed the command line in sys_shell I mispelled the batch file name and got an out of memory message when I tried to run it.

          When I fixed the typo it ran fine. So I am looking at my original command line trying to see if the syntax or spelling is wrong but cannot see a problem.

          The other thing, a DOS window opens when I run the batch file and does not close after completion. I would rather not have it popup at all but at the very least close when done.

          Hope fully you have an answer for this.

          Thanks

          Robert

          Comment


            #6
            RE: sys_shell and out of memory

            Hi Tom

            OOOOPS....Forgot about the window mode option. It now runs mimimized but still is not closing.

            Thanks

            Robert.

            Comment


              #7
              RE: sys_shell and out of memory

              Bob:

              Have the last line of the batch as 'Exit' and the window will stay open only for the duration of the batch processing -- then close.

              Geez, if someone can tell use how to run it without showing the dos windows, I'd love it.

              You're also right - bad syntax, especially in a batch will produce the 'out of memory message'.

              Ken

              Comment


                #8
                RE: sys_shell and out of memory


                Search message board for threads dealing with batch files, you'll find suggestions for closing the batch process automatically I believe.

                -- tom

                Comment


                  #9
                  RE: sys_shell and out of memory

                  if you are running on 95/98/ME and you want the batch file to close automatically, go to the batchfile porperties, command, and check closeonexit - that will create a shortcut to the batchfile - then rename the batchfile shortcut to the same name as the batch file - this will have it run and close automatically

                  widow mode 2 runs minimized

                  like sys_shell("myoffice.bat",2)

                  Comment


                    #10
                    RE: sys_shell and out of memory

                    Hi Everyone

                    Thanks for all the info.

                    Robert

                    Comment


                      #11
                      RE: sys_shell and out of memory

                      Will run silent do it?
                      efs

                      Comment


                        #12
                        RE: sys_shell and out of memory

                        Unfortunately not.

                        Run silent is internal to A5 and the batch file is obviously outside. So you have to control the properties of the session which the OS creates for the batch file.

                        If the foregoing makes it sound like I understand these matters please do not be deceived. However, a solution along the lines William Kohlnstein suggests was described on the message board some time ago, perhaps so far in the past that it is on the *old* board.

                        Bill
                        Bill Hanigsberg

                        Comment


                          #13
                          RE: sys_shell and out of memory

                          Hi

                          For everyones information Williams answer works best for me.

                          I had already set the window option to "2". Opening up the properties and selecting close on exit does the trick.

                          Thanks again to everyone because all your contributions gave me and others more insights into the workings of alpha and windows.

                          Robert

                          Comment


                            #14
                            RE: sys_shell and out of memory

                            One problem you may have running a batch file occurs if you need to verify the batch file is complete. This would occur if you need the result of the batch file for another process. One way to do this is include as file copy operation as the last line in the batch file and then check for the existence of the file. If it isn't there, the batch is not complete.

                            Here is part of an example where I use xbasic to write the batch file.

                            I first set the value for two variables, local_path and private_path. These are the location where the batch file runs and the a5 private path. I also set up an error checker using on error to stopt the batch file if it times out. back is the pointer for the batch file.

                            back.write_line("copy "+chr(34)+local_path+batch+chr(34)+" "+chr(34)+private_path+"\done.txt"+chr(34))
                            back.flush()
                            back.close()
                            timer = toseconds(time())

                            if file.exists(:A5.Get_Private_Path()+"\done.txt")
                            file.remove(:A5.Get_Private_Path()+"\done.txt")
                            end if

                            sys_shell(:A5.Get_Path()+batch)

                            while .not.file.exists(:A5.Get_Private_Path()+"\done.txt")
                            if toseconds(time()) - timer > 60
                            error_generate("Timed Out Error")
                            exit while
                            end if
                            end while

                            The script stops at this point until one of two things happen. Either the batch file times out at 60 seconds, or the file done.txt is written by the batch file indicating it is done.

                            Jerry

                            Comment


                              #15
                              RE: sys_shell and out of memory

                              Hi Jerry

                              Thanks for the idea.


                              Robert

                              Comment

                              Working...
                              X