| 4D v13WR EXECUTE COMMAND | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|  | 
    4D Write v13
 WR EXECUTE COMMAND 
         | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| WR EXECUTE COMMAND ( area ; cmdNumber ) | ||||||||
| Parameter | Type | Description | ||||||
| area | Longint |   | 4D Write area | |||||
| cmdNumber | Longint |   | Number of the command to execute | |||||
The WR EXECUTE COMMAND command causes the action associated with a 4D Write menu command or toolbar button to be executed. The most common use for this command is to execute a command after the user has chosen that command and your code has intercepted the user's choice through the WR ON COMMAND command.
Note: The list of commands and their values are available in the “WR Commands” constants theme. You can either pass a constant name or its value.
You want to be able to access certain word-processing functions via buttons. To do so, you can write:
Object method of bNew button.
 WR EXECUTE COMMAND(theArea;wr cmd new)
  `Execution of New commandObject method of bOpen button.
 WR EXECUTE COMMAND(theArea;wr cmd open)
  `Execution of Open command
	Product:  4D
	Theme:  WR Area Control
	Number:  
        89490
        
        
        
	
	Created:  4D Write 6.5
Appendix B: Menu Item Numbers
WR GET COMMAND INFO
WR ON COMMAND