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

Dialog Editor version 6.X
plus
plus

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

WINBATCH INSIDER TECH NOTES



Dynamic Dialogs:

A How-2 Guide for Dynamic Dialogs in WinBatch

Contents:


INTRODUCTION

Greetings Fellow WinBatch Users.

Our (nearly) psychic tech support - Help for Network, Programming, MSCE and System Administrators We're recently released a new version of WinBatch that has vastly improved dialogs over older copies of WinBatch, along with a new Dialog Editor to assist in creating the code to create the new dialogs. In addition to several new dialog control types, the new dialogs give you complete control over fonts and colors, as well as allowing bmp images to dialog backgrounds, pictures or even push buttons.

Using the aforementioned capabilities is fairly straightforward when creating the dialog with the new Dialog Editor. For example it is easy to make a dialog that looks like the dialog shown here.

However... The new dialogs also support a new advanced feature that we call "Dynamic Dialogs" where you can have some of your code run as the user performs various operations on the dialog. Although not that hard to set up, a little coaching is quite valuable when you are getting started on your first dynamic dialog. And that is what this newsletter is about.

This new version is a FREE upgrade to existing WinBatch 2001/2002 customers. It is also available to customers of 2000C and older with normal upgrade pricing. See Upgrade Info below.


TECH ARTICLE - Dynamic Dialogs

Getting Started

In order to get started with Dynamic Dialogs, we will start with a simple, basic dialog that has a single checkbox and an OK button, as shown on the right. In addition we'll review the various variables that define a dialog, without getting into all the murky detailed explanations that are in the official documentation.

The dialog at the right was made with the Dialog Editor included with WinBatch. The Dialog Editor produced the WinBatch code seen below.

EXAFormat=`WWWDLGED,6.1`

EXACaption=`Example A`
EXAX=-1
EXAY=-1
EXAWidth=060
EXAHeight=045
EXANumControls=002
EXAProcedure=`DEFAULT`
EXAFont=`Microsoft Sans Serif|7373|70|34`
EXATextColor=`0|0|128`
EXABackground=`DEFAULT,128|255|255`

EXA001=`004,004,046,011,CHECKBOX,MyCheckBox,"Click Me",1,1,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
EXA002=`009,022,033,010,PUSHBUTTON,DEFAULT,"OK",1,2,DEFAULT,DEFAULT,DEFAULT,DEFAULT`

ButtonPushed=dialog("EXA")
message("CheckBox Value on Dialog Exit is",MyCheckbox)


First of all, to get familiar with basic dialog code, here is the quick rundown. The EXA is the name of this dialog as specified in the Dialog Editor. It could be anything. In this case it stands for Example A. The default produced by the Dialog Editor, if not otherwise specified, is MyDialog. Thus all the dialog variables in this example all start with EXA.
EXAFormat
Used to tell WinBatch what kind of dialogs we are dealing with. These are the version 6.1 dialogs.

EXACaption
Simply specifies the caption or title of the dialog box.

EXAX
Specifies where the upper left corner of the dialog starts in relation to the left edge of the screen. In this case -1 is used to signify that the dialog is to be centered.

EXAY
Specifies where the upper left corner of the dialog starts in relation to the top edge of the screen. In this case -1 is used to signify that the dialog is to be centered.

EXAWidth
Specifies the width of the dialog.

EXAHeight
Specifies the height of the dialog.

EXANumControls
Tells WinBatch how many controls are in the dialog.

EXAProcedure
Defines the DialogProc Procedure. We'll be getting into this below, as this is the essence of this newsletter. When no DialogProc is desired, this value is usually set to 'DEFAULT'.

EXAFont
Defines the default font for the dialog, used if a control does not have its own font specification.

EXATextColor
Defines the default text color, used if a control does not otherwise specify a text color.

EXABackground
Tells WinBatch what background to use for the dialog. It may be either a BMP file or a color.

EXA001
EXA002
etc.
The numbered variables define each of the controls in the dialog. They are difficult to code by hand, hence the Dialog Editor. But, usually, a quick inspection of the data on the line will tell you what control it is defining. You will need to be able to at least tell what control each variable is defining to get your Dynamic Dialogs to work.

ButtonPushed=Dialog("EXA")
Not really a dialog definition variable, but included here for completeness. This is the line that actually tells WinBatch to display the dialog on the screen.





Exercise A

It is obvious that these may be more or less inane exercises, but they only take a few seconds, and studies by seemingly reputable organizations have shown that actually doing the exercises greatly increases long term comprehension of the material. This first exercise is designed to get you familiar with the exercises and to make sure your system is properly set up to do them.

First of all there is one major requirement: A reasonably current version of WinBatch must be installed. 2002F or newer will be sufficient.

  1. Highlight and copy to clipboard the WinBatch dialog code shown above.
  2. Run WinBatch Studio and select File/New.
  3. Paste the code into your new WinBatch Studio Window.
  4. Save the code someplace. We recommend that you use the filename "ExampleA.wbt" to help keep things straight.
  5. Hit the "RUN" button on the toolbar.
  6. Note the blue dialog, similar to the one show above appears on the screen,
  7. Note that you can click the check box, and the checked/unchecked state flips back and forth.
  8. Hit the OK button. A message box will appear showing you the state of the checkbox as the dialog was exited.
  9. Hit OK on the message box to exit the program.

Exercise A is complete.





Adding DialogProc code

Basically, to do Dynamic Dialogs, you have to add code, either in a #DefineFunction or a #DefineSubroutine block to instruct WinBatch what to do. In this step we will add a basic #DefineFunction template to the previous code and also "hook" the dialog up to the newly added code. As before, we will present the code and then explain what is going on.
#definefunction MyDialogCode(dlghandle,dlgmessage,dlgID,reserved4,reserved5)

   ;Define a few handy constants here
   MSG_Initialization=0

   switch dlgmessage

       case MSG_Initialization  ; The Dialog Initialization call
          break

   endswitch

   return (-1) ; do default processing

#endfunction


EXBFormat=`WWWDLGED,6.1`

EXBCaption=`Example B`
EXBX=-1
EXBY=-1
EXBWidth=060
EXBHeight=045
EXBNumControls=002
EXBProcedure=`MyDialogCode`
EXBFont=`Microsoft Sans Serif|7373|70|34`
EXBTextColor=`0|0|128`
EXBBackground=`DEFAULT,128|255|255`

EXB001=`004,004,046,011,CHECKBOX,MyCheckBox,"&Click Me",1,1,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
EXB002=`009,022,033,010,PUSHBUTTON,DEFAULT,"&OK",1,2,DEFAULT,DEFAULT,DEFAULT,DEFAULT`

ButtonPushed=dialog("EXB")
message("CheckBox Value on Dialog Exit is",MyCheckbox)

If you examine the code above you can see that a #DefineFunction block has been added to the top of code that looks suspiciously similar to the code in the previous example. You may also note that all the EXA's of Example A have been changed to the EXB's of Example B. You might even think I get paid by the hour for this.

In any case, a little further inspection will show that the EXBProcedure variable, unlike the EXAProcedure variable in the previous example, has been set to "MyDialogCode" which is the name of the #DefineFunction added to the top of the script. This is what links up the dialog to your code and also tells WinBatch to start processing the Dialog Procedures.

The Dialog Procedure, MyDialogCode in this case, is a special case of either a #DefineFunction or a #DefineSubroutine.

#DefineFunction
A WinBatch procedure wherein all variables are "pure local". Basically the only way to get information into a #DefineFunction is via the passed parameters, and the only way to get information out of it is via the return value. Obscure exceptions do apply.

#DefineSubroutine
a WinBatch procedure wherein all variables are "global". All variables are in common with the rest of your program. This allows easy import and export of information from your #DefineSubroutine from and to the rest of your script. The downside is that it is easy to mistakenly stomp on information in your main script that you did not intend to. As usual, obscure exceptions apply.

In particular, the #DefineFunction (or #DefineSubroutine) must have five parameters. e.g.

#definefunction MyDialogCode(dlghandle,dlgmessage,dlgID,reserved4,reserved5)
The parameters are
  1. dlghandle: A special number that refers to the dialog. This number will be used later in subsequent calls to various Dialog support functions. It is not used in Example B.

  2. dlgmessage: Another number. This number is designed to allow your Dialog procedure to figure out what is going on and why it was called. By default, your Dialog procedure will be called once, with a dlgmessage value of zero. The idea is that your code (as shown in a later example) will request further services from WinBatch in regards to your dialog.

  3. dlgID: The number of the control that caused a requested event (explained later) to be directed to your Dialog Procedure. This can be used, for example, to determine what pushbutton a user may have clicked on or what radio button has been selected.

  4. reserved4: This parameter is reserved and is not currently used. Nevertheless it is still required.

  5. reserved5: This parameter is also reserved.

Once inside the MyDialogProc procedure it may be handy (although not 100% necessary) to define a few variables. The Dialog support functions make use of quite a few different numbers to represent different things, and it can get quite confusing if you hard code all the numbers, as most people will quickly forget what they mean. So we start off on the right foot here by defining our first variable to help us keep the various Dialog support function parameters straight.

;Define a few handy constants here
MSG_Initialization=0
When the Dialog Procedure starts up, by virtue of the EXBProcedure variable in the Dialog Definition statements discussed earlier, the Dialog Procedure gets one chance to tell WinBatch what it wants. Just before the Dialog is displayed to the user, the Dialog Procedure is called with a dlgmessage value of zero, which is the signal that the Dialog procedure should perform its initialization steps. Generally the initializations steps consist of telling WinBatch, via various Dialog support function calls (discussed later) what other messages your Dialog procedure wished to receive. In this case we define a single variable, MSG_Initialization, by setting it to zero. We will use this variable in our switch statement coming up next.
   switch dlgmessage

       case MSG_Initialization  ; The Dialog Initialization call
          break

   endswitch

   return (-1) ; do default processing
The switch statement is the heart and soul of a Dialog Procedure. There is one case for each different type of message that you set it up to receive. In this case that has not happened yet. Anyway, you can see the case for the MSG_Initialization value, indicating that it will handle the Dialog Procedure Initialization code.

Currently the MSG_Initialization case does nothing except break out of the switch statement and then return with a -1 value.

What do the return values mean?

When Dialog procedures exit, they are supposed to return a value. The returned value is used by WinBatch to figure out what you wish to occur. The permitted return values and their actions are...
positive integer  e.g. 1, 2, 3, etc
Exit dialog. Set the return value of the Dialog function to this value.
0
Cancel dialog. Do normal CANCEL processing.
-1
Do default processing.
-2
Do default processing EXCEPT that if the default processing would cause the dialog to be closed, do not close the dialog.
So that's it. Our Example B simply has a hooked up Dialog Procedure and an initialization case that does, basically, nothing. But all the major pieces are in place now.




Exercise B

Ok. Please humor your tech writer here. As before just doing the steps *really* helps.

  1. Highlight and copy to clipboard the WinBatch dialog code shown above.
  2. Run WinBatch Studio and select File/New.
  3. Paste the code into your new WinBatch Studio Window.
  4. Save the code someplace. We recommend that you use the filename "ExampleB.wbt" to help keep things straight.
  5. Hit the "RUN" button on the toolbar.
  6. Note the blue dialog, similar to the one show above appears on the screen,
  7. Note that you can click the check box, and the checked/unchecked state flips back and forth.
  8. Hit the OK button. A message box will appear showing you the state of the checkbox as the dialog was exited.
  9. Hit OK on the message box to exit the program.

You will note that there is _NO_ difference from the previous Example A. But hopefully we did not break anything either. Exercise B is complete.





Fleshing out the initialization procedure

Now that the basics are in place, we can work on the initialization code to tell the dialog procedure what we are interested in. In this simple example, we are going to ask the user to confirm the clicking of the checkbox. Thus we will need to be notified of any activity in any checkbox.

First the code...

#definefunction MyDialogCode(dlghandle,dlgmessage,dlgID,reserved4,reserved5)

   ;Define a few handy constants here
   MSG_Initialization=0
   MSG_CheckBoxClicked=4

   switch dlgmessage

       case MSG_Initialization  ; The Dialog Initialization call
          dialogprocoptions(dlghandle,MSG_CheckBoxClicked,@true)
          break

   endswitch

   return (-1) ; do default processing

#endfunction


EXCFormat=`WWWDLGED,6.1`

EXCCaption=`Example C`
EXCX=-1
EXCY=-1
EXCWidth=060
EXCHeight=045
EXCNumControls=002
EXCProcedure=`MyDialogCode`
EXCFont=`Microsoft Sans Serif|7373|70|34`
EXCTextColor=`0|0|128`
EXCBackground=`DEFAULT,128|255|255`

EXC001=`004,004,046,011,CHECKBOX,MyCheckBox,"&Click Me",1,1,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
EXC002=`009,022,033,010,PUSHBUTTON,DEFAULT,"&OK",1,2,DEFAULT,DEFAULT,DEFAULT,DEFAULT`

ButtonPushed=dialog("EXC")
message("CheckBox Value on Dialog Exit is",MyCheckbox)

There were not many changes this time. Besides the obvious EXB to EXC changes, two lines were added.
   MSG_CheckBoxClicked=4
First of all a new variable MSG_CheckBoxClicked was added to the handy constants section.
       case MSG_Initialization  ; The Dialog Initialization call
          dialogprocoptions(dlghandle,MSG_CheckBoxClicked,@true)
          break
Secondly, the DialogProcOptions line was added. DialogProcOptions takes three parameters. The first parameter is the dlghandle value passed into the #DefineFunction by WinBatch. The second parameter is the type of event or message that we are interested in. In this case it is the MSG_CheckBoxClicked event that indicates that the user is doing something with the check box. And the third parameter is @TRUE, indicating that, yes, we do want to be notified of any Check Box activity.




Exercise C

I agree this may be getting monotonous, and there is still no excitement in the dialog. when you run it, it will be the same as before. Do it anyway.

  1. Highlight and copy to clipboard the WinBatch dialog code shown above.
  2. Run WinBatch Studio and select File/New.
  3. Paste the code into your new WinBatch Studio Window.
  4. Save the code someplace. We recommend that you use the filename "ExampleC.wbt" to help keep things straight.
  5. Hit the "RUN" button on the toolbar.
  6. Note the blue dialog, similar to the one show above appears on the screen,
  7. Note that you can click the check box, and the checked/unchecked state flips back and forth.
  8. Hit the OK button. A message box will appear showing you the state of the checkbox as the dialog was exited.
  9. Hit OK on the message box to exit the program.

You will note that there is still _NO_ difference from the previous Example A or B. Does everything still run? Exercise C is complete.








Now we will add the code to do something vaguely useful.
#definefunction MyDialogCode(dlghandle,dlgmessage,dlgID,reserved4,reserved5)

   ;Define a few handy constants here
   MSG_Initialization=0
   MSG_CheckBoxClicked=4
   DCTL_CheckBox=1

   switch dlgmessage

       case MSG_Initialization  ; The Dialog Initialization call
          dialogprocoptions(dlghandle,MSG_CheckBoxClicked,@true)
          break

       case MSG_CheckBoxClicked
          flag=askyesno("Example D","Do you really want to change the value of this checkbox?")
          if flag==@no
             ;Set it back to what it was
             cbval=dialogcontrolget(dlghandle,dlgID,DCTL_CheckBox)
             dialogcontrolset(dlghandle,dlgID,DCTL_CheckBox,!cbval)
             break
          endif
          break

   endswitch

   return (-1) ; do default processing

#endfunction


EXDFormat=`WWWDLGED,6.1`

EXDCaption=`Example D`
EXDX=-1
EXDY=-1
EXDWidth=060
EXDHeight=045
EXDNumControls=002
EXDProcedure=`MyDialogCode`
EXDFont=`Microsoft Sans Serif|7373|70|34`
EXDTextColor=`0|0|128`
EXDBackground=`DEFAULT,128|255|255`

EXD001=`004,004,046,011,CHECKBOX,MyCheckBox,"&Click Me",1,1,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
EXD002=`009,022,033,010,PUSHBUTTON,DEFAULT,"&OK",1,2,DEFAULT,DEFAULT,DEFAULT,DEFAULT`

ButtonPushed=dialog("EXD")
message("CheckBox Value on Dialog Exit is",MyCheckbox)

In this rendition a new handy constant was added...
   DCTL_CheckBox=1
This constant, DCTL_CheckBox is for values in the DialogControlGet and DialogControlSet functions. It indicates that the item we are working with is supposed to be a Checkbox.

Also added was the entire case for the MSG_CheckBoxClicked event.


       case MSG_CheckBoxClicked
          flag=askyesno("Example D","Do you really want to change the value of this checkbox?")
          if flag==@no
             ;Set it back to what it was
             cbval=dialogcontrolget(dlghandle,dlgID,DCTL_CheckBox)
             dialogcontrolset(dlghandle,dlgID,DCTL_CheckBox,!cbval)
             break
          endif
          break
In this case we have already detected a change to a Checkbox. The WinBatch function AskYesNo is used to prompt the user to confirm the changing of the checkbox. If the user selects "NO", then we read the value of the checkbox with the DialogControlGet function, passing dlghandle, dlgID, and our new constant, DCTL_CheckBox. The function will return the value of the checkbox. We then do a DialogControlSet with the same parameters, plus an additional one, the value that we want the checkbox to be. (Note the use of the ! symbol, which means NOT, which basically flips a @TRUE to an @FALSE and vice versa.)

Also remember, that in WinBatch Studio, if you click on a function name (shown in blue), then hit Shift-F1, WinBatch Studio will pop open the help page for that function.





Exercise D

Finally interesting stuff begins to happen. At this point we have everything in place, and the Dialog procedure should function.

  1. Highlight and copy to clipboard the WinBatch dialog code shown above.
  2. Run WinBatch Studio and select File/New.
  3. Paste the code into your new WinBatch Studio Window.
  4. Save the code someplace. We recommend that you use the filename "ExampleD.wbt" to help keep things straight.
  5. Hit the "RUN" button on the toolbar.
  6. Note the blue dialog, similar to the one show above appears on the screen,
  7. Note that when you click on the check box you are asked on confirm the change.
  8. Continue to play with the program to see how it works. I would hazard a guess that you should be able to handle this without further instructions.

Exercise D is complete.








There is just one more step to having this all figured out. The code we have been working with will treat *all* checkboxes in this manner. So what happens if there are more than one checkbox, and you only want to have the user confirm one of them? Well, as usually, there is simply a little more code. To wit...
#definefunction MyDialogCode(dlghandle,dlgmessage,dlgID,reserved4,reserved5)

   ;Define a few handy constants here
   MSG_Initialization=0
   MSG_CheckBoxClicked=4
   DCTL_CheckBox=1

   switch dlgmessage

       case MSG_Initialization  ; The Dialog Initialization call
          dialogprocoptions(dlghandle,MSG_CheckBoxClicked,@true)
          break

       case MSG_CheckBoxClicked
          switch dlgID

             case 001   ; ID of CheckBox to check, as in EXE001
                flag=askyesno("Example E","Do you really want to change the value of this checkbox?")
                if flag==@no
                   ;Set it back to what it was
                   cbval=dialogcontrolget(dlghandle,dlgID,DCTL_CheckBox)
                   dialogcontrolset(dlghandle,dlgID,DCTL_CheckBox,!cbval)
                   break
                endif
                break

          endswitch  ; of dlgID
          break

   endswitch  ; of dlgmessage

   return (-1) ; do default processing

#endfunction


EXEFormat=`WWWDLGED,6.1`

EXECaption=`Example E`
EXEX=-01
EXEY=-01
EXEWidth=068
EXEHeight=058
EXENumControls=003
EXEProcedure=`MyDialogCode`
EXEFont=`Microsoft Sans Serif|7373|70|34`
EXETextColor=`0|0|128`
EXEBackground=`DEFAULT,128|255|255`

EXE001=`004,004,056,011,CHECKBOX,MyCheckBox,"&Confirm Me",1,1,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
EXE002=`004,022,056,011,CHECKBOX,MyOtherCheckBox,"&But not me",1,2,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
EXE003=`015,039,032,011,PUSHBUTTON,DEFAULT,"&OK",1,3,DEFAULT,DEFAULT,DEFAULT,DEFAULT`

ButtonPushed=dialog("EXE")

message("CheckBox Values are",strcat("EXE001=",MyCheckBox,@crlf,"EXE002=",MyOtherCheckBox))

In this example we have added an additional checkbox and re-arranged the dialog slightly.
EXE001=`004,004,056,011,CHECKBOX,MyCheckBox,"&Confirm Me",1,1,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
EXE002=`004,022,056,011,CHECKBOX,MyOtherCheckBox,"&But not me",1,2,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
EXE003=`015,039,032,011,PUSHBUTTON,DEFAULT,"&OK",1,3,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Shows the three controls in the dialog. EXE001 and EXE002 are checkboxes, and EXE003 is the OK button.

In addition, not broken out here, the Message statement at the end has been modified to display the values of both of the checkboxes on exit.

Most importantly, though, are the changes to the MSG_CheckBoxClicked case in the main Dialog Procedure switch statement.


       case MSG_CheckBoxClicked
          switch dlgID

             case 001   ; ID of CheckBox to check, as in EXE001
                flag=askyesno("Example E","Do you really want to change the value of this checkbox?")
                if flag==@no
                   ;Set it back to what it was
                   cbval=dialogcontrolget(dlghandle,dlgID,DCTL_CheckBox)
                   dialogcontrolset(dlghandle,dlgID,DCTL_CheckBox,!cbval)
                   break
                endif
                break

          endswitch  ; of dlgID
          break
Note that an entirely new switch statement was added *inside* the case. The idea here is that you can have a separate sub-case for each different checkbox you are interested it - and easily ignore the other ones. Please note how the case 001 in the new switch statement relates to the EXE001 Check box control.




Exercise E

You should have this figured out by now. Grab the above code, dump it into WinBatch Studio, run it a few times. Change it. See what happens. Try changing the "case 001" to "case 002" and see what happens.







An Extra Credit Assignment

A different sort of Dynamic Dialog follows. Copy the code into WinBatch and try it a few times. See how it works. This one is for you to figure out.
#definefunction DoItToIt(MyDialogHandle,MyDialogMessage,MyDialogControlID,param4,param5)

   ; Define the handy constants
   MSG_InitDialog=0 
   MSG_ButtonPressed= 2 
   DCTL_SetEditText = 3

   ; The Heart and Soul Switch Statement
   switch MyDialogMessage

          case MSG_InitDialog   ; Init_Dialog  
               ; Enable buttonclicked messages
               dialogprocoptions(MyDialogHandle,MSG_ButtonPressed,@true) 
               break
   
          case MSG_ButtonPressed

              switch MyDialogControlID
                  
                  ;capture the BROWSE button, id 003.  Ignore other push buttons
                  case 003   ; the browse button
                     x=askfilename("Choose a FileName", "", "All Files|*.*", "*.*", 1 )
                     dialogcontrolset(MyDialogHandle,002,DCTL_SetEditText,x)
                     :cancel
                     return(-2)  ; don't exit

               endswitch   ;DC_ButtonPressed
               break
   endswitch ; MyDialogMessage

   return(-1) ; Do default processing
#endfunction


ExtraFormat=`WWWDLGED,6.1`

ExtraCaption=`Extra Credit Assignment`
ExtraX=-1
ExtraY=-1
ExtraWidth=254
ExtraHeight=082
ExtraNumControls=005
ExtraProcedure=`DoItToIt`
ExtraFont=`DEFAULT`
ExtraTextColor=`DEFAULT`
ExtraBackground=`DEFAULT,255|128|0`

Extra001=`009,006,043,009,STATICTEXT,DEFAULT,"FileName:",DEFAULT,1,DEFAULT,"Microsoft Sans Serif|7373|70|34","0|0|128",DEFAULT`
Extra002=`007,020,192,014,EDITBOX,MyFileName,"",DEFAULT,2,DEFAULT,"Microsoft Sans Serif|7373|70|34","0|0|128","255|128|0"`
Extra003=`209,020,035,014,PUSHBUTTON,DEFAULT,"Browse",2,3,DEFAULT,"Microsoft Sans Serif|7373|70|34","0|0|128","255|128|64"`
Extra004=`033,054,035,014,PUSHBUTTON,DEFAULT,"OK",1,4,DEFAULT,"Microsoft Sans Serif|7373|70|34","0|0|128","255|128|64"`
Extra005=`126,054,034,014,PUSHBUTTON,DEFAULT,"Cancel",0,5,DEFAULT,"Microsoft Sans Serif|7373|70|34","0|0|128","255|128|64"`

ButtonPushed=dialog("Extra")

message("Selected Filename is",MyFileName)

exit

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


So that's the end of this month's tech note. Dynamic Dialogs are lots of fun, and give a lot of extra power to your WinBatch dialogs.

WinBatch code COLORIZED into HTML courtesy of code from Detlev Dalitz





Article ID:   W15122
File Created: 2014:07:18:13:47:38
Last Updated: 2014:07:18:13:47:38