WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

ShellOp

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

aMsgTimeOut Text Length Limitation

 Keywords: aMsgTimeOut Text Length Limitation Limit Display Time Out Timeout

Question:

Is there a way to display more text in the aMsgTimeout box? For example, the following does not completely display:
aMsgTimeout(30,"Information","This installation will take approximately 30 minutes, during which time you will be unable to use your machine.":@CRLF:"Please do not use the keyboard or mouse during this installation.":@CRLF:"Your machine will be rebooted after the installation.":@CRLF:@CRLF:"Press OK to continue, or Cancel to exit","OK","Cancel")

Answer:

I wonder if the amount of text that gets displayed is dependent on the users display settings. On my system I can only get 44 characters to display on each line and only three lines....
AddExtender("wwsop34i.DLL")
aMsgTimeout(10,"Information","01234567890123456789012345678901234":@CRLF:"01234567890123456789012345678901234":@CRLF:"01234567890123456789012345678901234","OK","Cancel")
Exit
Unfortunatelu there are no settings or parameters that effect the amount of text displayed by aMsgTimeout. A workaround would be to create your own customized aMsgTimeout. The code might look something like this:
#DefineSubRoutine MyDialogCallbackProc(MyDialog_Handle,MyDialog_Message,MyDialog_Name,MyDialog_EventInfo,rsvd)
   ;DialogprocOptions Constants
   MSG_INIT=0                ; The one-time initialization
   MSG_TIMER=1               ; Timer event
   MSG_BUTTONPUSHED=2        ; Pushbutton or Picturebutton
   ;DialogControlSet / DialogControlGet Constants
   DC_TITLE=4                ; PICTURE RADIOBUTTON CHECKBOX PICTUREBUTTON VARYTEXT STATICTEXT GROUPBOX PUSHBUTTON MENUITEM
   ;Return code constants
   RET_DO_CANCEL=0           ; Cancels dialog
   RET_DO_DEFAULT= -1        ; Continue with default processing for control
   RET_DO_NOT_EXIT= -2       ; Do not exit the dialog   ON_EQUAL = @TRUE
   ; Initialize variable ON_EQUAL
   Switch MyDialog_Message                                  ; Switch based on Dialog Message type
      Case MSG_INIT ; Standard Initialization message
         DialogProcOptions(MyDialog_Handle,MSG_TIMER,1000)
         DialogProcOptions(MyDialog_Handle,MSG_BUTTONPUSHED,@TRUE)
         pbar = ""
         fPbar = 1
         count = 0
         Return(RET_DO_DEFAULT)

     Case MSG_TIMER                                         ; Timer
            count = count +1
             If count> timeout Then Return 1 ;Timeout
            DialogControlSet(MyDialog_Handle,"VaryText_Progress",DC_TITLE,PBAR)
            Switch fPbar
               Case 1
                  pbar = StrCat(pbar, "Ý")
                  fPbar = 2
                  Break

               Case 2
                  pbar = StrReplace(pbar, "Ý", "Û")
                  fPbar = 1
                  Break
            EndSwitch
            DialogControlSet(MyDialog_Handle,"VaryText_Progress",DC_TITLE,PBAR)
            Return(RET_DO_DEFAULT)

     Case MSG_BUTTONPUSHED
        If MyDialog_Name == "PushButton_Left"                ; Left
              Return(2)

        ElseIf MyDialog_Name == "PushButton_Right"        ; Right
              Return(3)

        EndIf                                              ; MyDialog_Name
        Return(RET_DO_DEFAULT)

   EndSwitch                                                ; MyDialog_Message
   Return(RET_DO_DEFAULT)
#EndSubRoutine                                               ; End of Dialog Callback MyDialogCallbackProc

title =  'Timeout Example'
messagetext =  '012345678901234567890123456789012345678901234567890':@CRLF:'012345678901234567890123456789012345678901234567890':@CRLF:'012345678901234567890123456789012345678901234567890':@CRLF:'012345678901234567890123456789012345678901234567890':@CRLF:'012345678901234567890123456789012345678901234567890':@CRLF:'012345678901234567890123456789012345678901234567890':@CRLF:'012345678901234567890123456789012345678901234567890':@CRLF:'012345678901234567890123456789012345678901234567890':@CRLF:'012345678901234567890123456789012345678901234567890':@CRLF:'012345678901234567890123456789012345678901234567890':@CRLF:'012345678901234567890123456789012345678901234567890':@CRLF:'012345678901234567890123456789012345678901234567890':@CRLF:'012345678901234567890123456789012345678901234567890'
leftbutton = 'OK'
rightbutton = 'Cancel'
timeout = 30

MyDialogFormat=`WWWDLGED,6.2`

MyDialogCaption=title
MyDialogX=002
MyDialogY=045
MyDialogWidth=206
MyDialogHeight=154
MyDialogNumControls=004
MyDialogProcedure=`MyDialogCallbackProc`
MyDialogFont=`DEFAULT`
MyDialogTextColor=`DEFAULT`
MyDialogBackground=`DEFAULT,DEFAULT`
MyDialogConfig=0

MyDialog001=`043,113,036,012,PUSHBUTTON,"PushButton_Left",DEFAULT,%leftbutton%,1,10,32,DEFAULT,DEFAULT,DEFAULT`
MyDialog002=`117,113,036,012,PUSHBUTTON,"PushButton_Right",DEFAULT,%rightbutton%,0,20,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
MyDialog003=`025,131,144,012,VARYTEXT,"VaryText_Progress",vtVariable1,"",DEFAULT,30,DEFAULT,"Terminal|4096|40|65329","0|0|128",DEFAULT`
MyDialog004=`017,017,158,088,VARYTEXT,"VaryText_Txt",messagetext,"",DEFAULT,40,DEFAULT,DEFAULT,DEFAULT,DEFAULT`

ButtonPushed=Dialog("MyDialog")

;(1 = timed out, 2 = left button pressed, 3 = right button pressed)
Switch ButtonPushed
   Case 1
      Pause(title,'Timed out')
      Break
   Case 2
      Pause(title,'Left button pressed')
      Break
   Case 3
      Pause(title,'Right button pressed')
      Break
EndSwitch

Exit

Article ID:   W17604
Filename:   aMsgTimeOut Text Length Limitation.txt
File Created: 2010:04:13:09:19:10
Last Updated: 2010:04:13:09:19:10