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

Statusbar

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

    Statusbar

    Hello,

    Can statusbar.robot(), or statusbar.percent()
    be used with the following script?

    a_tbl = table.open( "s:\a5data\sort sheets\import data\data.dbf" , FILE_RW_EXCLUSIVE )
    a_tbl.zap( .T. )
    a_tbl.close()
    Import.Run_silent("DATA IMPORT FILE@s:\a5data\sort sheets\sort sheets")
    Update.Run_silent("Split Bill of Lading@s:\a5data\sort sheets\import data\data.dbf")
    Post.Run_silent("Post Page No@s:\a5data\sort sheets\main table.dbf")


    I have tried a few times, but with no success??

    Thanks Ed Barley

    #2
    RE: Statusbar

    This is what I should have posted:



    DIM ax_choice as C
    DIM ax_response as N
    DIM ax_dialog as P


    ON ERROR GOTO ax_error_trap
    DIM ax_error_trap_desc as C
    DIM ax_error_trap_offset as C
    DIM ax_error_trap_msg as C
    DIM ax_error_trap_response as N

    statusbar.robot()

    'AX~Action Command~1~
    'AX~PX9~.T.~
    'AX~PX10~~
    'AX~PX56~0~
    'AX~PX55~0~
    ax_error_trap_desc = "Action Script"
    ax_error_trap_offset = "0"
    'AX~Action Command~4~
    'AX~PX4~sys_shell("c:\FMrename.bat",2)\AN\AK~
    'AX~PX56~0~
    'AX~PX55~~
    ax_error_trap_desc = "Inline Xbasic"
    ax_error_trap_offset = "1"
    sys_shell("c:\rename.bat",2)

    'AX~Action Command~4~
    'AX~PX4~sleep(5)\AN\AKscript_play("Import&Post Page No")\AN\AK~
    'AX~PX56~0~
    'AX~PX55~~
    ax_error_trap_desc = "Inline Xbasic"
    ax_error_trap_offset = "2"
    sleep(5)
    script_play("Import&Post Page No")


    END
    ax_error_trap:
    ax_error_trap_msg = "Trapped error in action command: [" + ax_error_trap_offset + "] " + chr(13) + chr(13) + "Command: " + ax_error_trap_desc + chr(13) + "Error: " + error_text_get()
    ax_error_trap_response = ui_msg_box("Action Program Error", ax_error_trap_msg, 2)
    IF ax_error_trap_response = 4 THEN ''Retry
    RESUME 0
    ELSEIF ax_error_trap_response = 5 THEN ''Ignore
    RESUME NEXT
    ELSE ''Abort
    END
    END IF
    ''****
    ''**** End
    statusbar.clear()

    Comment


      #3
      RE: Statusbar

      Well, yes and no.

      You could put either command after every line in the first script to give some indication of where the script is but there is no way to get the statusbar commands to tell you what is happening within the Import, Update, or Post operations. (At least there isn't any that I know of but with everything Selwyn keeps showing us I had to throw this in as a disclaimer.)

      Comment


        #4
        RE: Statusbar

        Thanks for your responce Cal,

        The whole process, can take maybe 1 minute sometimes, and makes the user a little uneasy because they cannot see what is happening. Is there someway, that a pop up message could be put on the screen, when the whole script is over?

        Thanks Ed

        Comment


          #5
          RE: Statusbar








          New Page 1




          I am not exactly sure what you want to do. Each of the operations that you
          perform should currently be updating the status bar with progress information
          for the individual operation.
          However, if you want to put up status information of your own that shows the
          progress of the whole script, then you can't do that because your text on the
          status line will get overwritten by the messages that A5 writes to the status
          line.
          There are a number of approaches that you could take to solve this problem.
          I put up a message some time ago showing how to create a custom status bar.
          Another approach is to use a modeless Xdialog box as a "status dialog". Here
          is an example:

          'Define the modeless
          Xdialog status bar...................................
          dim status_string as c
          status_string = ""
          dim flag_close as l
          flag_close = .f.
          ui_modeless_dlg_box("Status",""%dlg%
          {font=arial,10}
          {text=60,2:status_string} {condition=flag_close} "Close!close" {condition=.t.}
          {font=}
          ;
          %dlg%,""%code%
          if a_dlg_button = "close" then
          ui_modeless_dlg_close("status")
          end if
          %code%)



          status_string = "Step 1 of 3. Running Import Operation. Please wait...."
          ui_modeless_dlg_refresh("status")
          Import.Run_silent("DATA IMPORT FILE@s:\a5data\sort sheets\sort sheets")


          status_string = "Step 2 of 3. Running Update Operation. Please wait...."
          ui_modeless_dlg_refresh("status")
          Update.Run_silent("Split Bill of Lading@s:\a5data\sort sheets\import data\data.dbf")



          status_string = "Step 3 of 3. Running Post Operation. Please wait...."
          ui_modeless_dlg_refresh("status")
          Post.Run_silent("Post Page No@s:\a5data\sort sheets\main table.dbf")


          'when you set flag_close to .t. the "close" button on the status dialog becomes
          visible.
          status_string = "Done"
          flag_close = .t.
          ui_modeless_dlg_refresh("status")


          'If you want to
          automatically close the status dialog then include this command here

          ui_modeless_dlg_close("status")





          Comment


            #6
            RE: Statusbar

            Hello Selwyn,

            There are 7 people using computers in the office where I work. Within these 7 people, some are patient, some are mouse clickers, and others hit the keys, if they don't think things are happening. It is amazing. Even after you tell them to watch the lower left corner of their screen, they still get impatient.

            Just wanted to go that one extra step and keep them from doing the above. I had it in my mind to do something like your splash screen, when A5 opens up, that is pretty visible.

            I looked at your Xbasic Reference Manual examples, in regards to the Statusbar,and was not sure what to do from there?? I need to learn Xbasic.

            I will give this a whirl right now.

            Again thanks for your help.

            Have a nice weekend.

            Ed

            Comment


              #7
              RE: Statusbar

              Perfect, couldn't have asked for more.

              Ed

              Comment


                #8
                Re: Statusbar

                I need to use Selwyns code, but not sure what i put where. Do i put the whole code in a standard.a5w page. Are there any variables i need to know about?

                500 Internal Server Error
                "Script Error
                Error:line:7 Expected value"

                Can anyone help?

                Thanks,

                Denis

                Comment


                  #9
                  Re: Statusbar

                  UI_MODELESS_DLG_BOX() is desktop only. I believe all functions in the ui series are.
                  There can be only one.

                  Comment


                    #10
                    Re: Statusbar

                    Ed,
                    Years ago I asked the same thing, and I got some code from Jerry Brightbill. It is also in the Code Archive. The following function, "Pleasewait" displays a modeless dialog across the screen, see attached.

                    I set it up to display my message before I execute involved routines, or jump to sub applications, then when done, I just shut it off.

                    Call:
                    Code:
                    pleasewait(.T.,"YOUR MESSAGE HERE")
                    Close:
                    Code:
                    pleasewait(.F.)

                    Code:
                    'Date Created: 07-Apr-2003 01:05:10 PM
                    'Last Updated: 27-Sep-2005 02:59:29 PM
                    'Created By  : Jerry Brightbill
                    'Updated By  : Tom Henkel
                    FUNCTION PleaseWait AS C (Show = .F.,what = "" )
                    'DESCRIPTION: This function displays a 'Please Wait' dialog for use while processing.	
                    'What is an optional parameter that will be displayed along with the words "Please Wait"
                    PleaseWait = ""
                    
                    if show = .F.
                    	if ui_modeless_dlg_exist("Processing")
                    		ui_modeless_dlg_close("Processing")
                    	end if 
                    	exit function
                    end if
                    
                    text1 = what+" Please Wait"
                    if what = ""
                    	len = len(text1)*2.5
                      else
                      	len = len(text1)*2
                    end if
                    textbox="{text="+alltrim(str(len))+"text1}"
                    
                    box_code = <<%dlg%
                    	{background=Pale Yellow}
                    	{font=arial,12,bi}
                    	{include=textbox}     
                    %dlg%
                    
                    box_event = <<%code%
                    1=1
                    %code%
                    
                    ui_modeless_dlg_box("Processing",box_code,box_event)
                    ui_dlg_move("Processing", 2, 2.5)
                    
                    ui_modeless_dlg_setfocus("Processing")
                    ui_modeless_dlg_refresh("Processing")
                    
                    END FUNCTION
                    Thanks again, Jerry...

                    Hope this helps.

                    Tom

                    Comment


                      #11
                      Re: Statusbar

                      Thanks for the response guys.

                      Comment


                        #12
                        Re: Statusbar

                        Any chance of adding or replacing the "Please Wait" with a "Wait Dialog" with a progress bar. I have created a script that sends a table without confirmation and the table is quite large and takes 20-30 seconds to send. The function that Tom has shown does display a "Please Wait" but I'm looking to put in a dialog box with a "repeating" or "bouncing" progress indicator that will display when user send table and closes when table has been sent. Similar to what Tom's "Please Wait" does just with a progress indicator. Thank you in advance for your help...

                        Comment


                          #13
                          Re: Statusbar

                          WaitDialog

                          <WaitDiaglog>.create()
                          Code:
                          Syntax
                          
                          <WAITDIALOG>.CREATE( Message_Rows as N, Style as C )
                          
                          Argument
                          	
                          
                          Description
                          
                          Message_Rows
                          	
                          
                          The number of lines to allow below the progress bar for text messages.
                          
                          Style
                          	
                          
                              "Percent" - a standard progress bar display that shows the degree of completion
                          
                              "Repeating" = the progress bar builds from the left, disappears, and then builds again
                          
                              "Bounce" = the progress bar shuttles left to right, then right to left, and repeats continuously
                          Andrew

                          Comment


                            #14
                            Re: Statusbar

                            Thanks Andrew, I tried this solution. The problem I was having is that the dialog would appear, then disappear while table was being sent. The only solution that has worked for me was Tom's "please wait" function. I was just looking for an "alternate" dialog and was hoping to be able to have an dialog showing indication of progress while the table was being sent, then closing when complete. Any chance of you helping me modify Tom's function to work with a progress bar. Thanks again for the quick response....

                            Comment


                              #15
                              Re: Statusbar

                              Sorry, I do not know if that is possible. Maybe someone else can chime in if they know how to do it.
                              Andrew

                              Comment

                              Working...
                              X