[ Pobierz całość w formacie PDF ]
.The error can be a syntaxerror, an evaluation error, or a runtime error.Declaration Sub SaxBasicPro_ ErrorAlert ( )Remarks You can use the ErrorFile, ErrorLine, and ErrorText properties todetermine the nature of the error.If the ErrorText$ property is not a nullstring, then you can use it as a warning message to the user.See also ErrorText (property)Help Professional Edition onlyDescription This event is triggered if the F1 (Help) key has been pressed while theuser is inside the IDE of the Professional Edition.The Help event enablesthe application to display context-sensitive help for macro-languagekeywords.Declaration Sub SaxBasicPro_ Help (Text As String)Remarks The single parameter Text$, which is passed to the Help event, is part ofthe macro language s extended syntax.If this keyword is one of yourextensions, you should show Help for it here.Set Text$ to to preventthe standard Help file from being searched.Pause Professional Edition onlyDescription Indicates that macro execution has been paused.Declaration Sub SaxBasicPro_Pause ( )Remarks When this event is triggered, both the Pause and the Run properties willbe True.See also Begin, End, Pause (property)Overview of Sax Basic Engine Events / 145Resume Professional Edition onlyDescription Indicates that macro execution has resumed.Declaration Sub SaxBasicPro_Resume ( )Remarks When this event is triggered, the Pause property will be False and theRun property will be True.See also Begin, End, Pause146 / Chapter 7Sax Basic EngineLanguageReferenceAbs FunctionSyntax Abs(Num)Group Numeric FunctionsDescription Returns the absolute value.Parameter DescriptionNum Returns the absolute value of this number value.Example Sub MainDebug.Print Abs(9) 9Debug.Print Abs(0) 0Debug.Print Abs(-9) 9End SubAppActivate InstructionSyntax AppActivate Title$Group MiscSax Basic Engine Language Reference / 147Description Activates the application s top-level window, Title$.If no window bythis title exists, the first window with a title that begins with Title$ isactivated.If no window matches, an error occurs.Parameter DescriptionTitle$ The name shown in the title bar of the window.See Also SendKeys, Shell( )Example Sub Main make ProgMan the active applicationAppActivate Program ManagerEnd SubArray FunctionSyntax Array(exprlist)Group Variables/ExpressionsDescription Returns a variant value array containing exprlist.Example: Sub MainX = Array(1,4,9)Debug.Print X(2) 4End SubAsc FunctionSyntax Asc(S$)Group String FunctionsDescription Returns the ASCII value.Parameter DescriptionS$ Returns the ASCII value of the first char in this string value.See Also Chr$( )148 / Chapter 8Example: Sub MainDebug.Print Asc( A ) 65End SubAtn FunctionSyntax Atn(Num)Group Numeric FunctionsDescription Returns the arc tangent.Parameter DescriptionNum Returns the arc tangent of this number value, which is thenumber of radians.There are Pi radians in a full circle.Example Sub MainDebug.Print Atn(1)*4 3.1415926535898End SubBeep InstructionSyntax BeepGroup User DialogsDescription Sounds the bell.Example Sub MainBeep beep the bellEnd SubBegin DialogSyntax BeginDialog UserDialogGroup UserDialogsDescription Used to define a user-dialog box.Sax Basic Engine Language Reference / 149See Also Begin Dialog, UserDialog, Dim As UserDialogExample Sub MainBegin Dialog UserDialog 200,120Text 10,10,180,15,"Please push the OK button"CheckBox 10,25,180,15,"&Check box",.CheckOKButton 80,90,40,20End DialogDim dlg As UserDialogdlg.Check = 1Dialog dlg show dialog (wait for OK)Debug.Print dlg.CheckEnd SubCall InstructionSyntax Call name[(exprlist)]-or-name[exprlist]Group Flow ControlDescription Evaluates the exprlist and calls Sub name using those values.If Call isomitted, the exprlist is not enclosed in parens.Subroutine name must bepreviously defined by either a Sub, Function, or Property definition.See Also Declare, SubExample Sub Show(Title$,Value)Debug.Print Title$;"=";ValueEnd SubSub MainCall Show( 2000/9",2000/9) 222.2222222222Show 1 [ Pobierz całość w formacie PDF ]
zanotowane.pl doc.pisz.pl pdf.pisz.pl odbijak.htw.pl
.The error can be a syntaxerror, an evaluation error, or a runtime error.Declaration Sub SaxBasicPro_ ErrorAlert ( )Remarks You can use the ErrorFile, ErrorLine, and ErrorText properties todetermine the nature of the error.If the ErrorText$ property is not a nullstring, then you can use it as a warning message to the user.See also ErrorText (property)Help Professional Edition onlyDescription This event is triggered if the F1 (Help) key has been pressed while theuser is inside the IDE of the Professional Edition.The Help event enablesthe application to display context-sensitive help for macro-languagekeywords.Declaration Sub SaxBasicPro_ Help (Text As String)Remarks The single parameter Text$, which is passed to the Help event, is part ofthe macro language s extended syntax.If this keyword is one of yourextensions, you should show Help for it here.Set Text$ to to preventthe standard Help file from being searched.Pause Professional Edition onlyDescription Indicates that macro execution has been paused.Declaration Sub SaxBasicPro_Pause ( )Remarks When this event is triggered, both the Pause and the Run properties willbe True.See also Begin, End, Pause (property)Overview of Sax Basic Engine Events / 145Resume Professional Edition onlyDescription Indicates that macro execution has resumed.Declaration Sub SaxBasicPro_Resume ( )Remarks When this event is triggered, the Pause property will be False and theRun property will be True.See also Begin, End, Pause146 / Chapter 7Sax Basic EngineLanguageReferenceAbs FunctionSyntax Abs(Num)Group Numeric FunctionsDescription Returns the absolute value.Parameter DescriptionNum Returns the absolute value of this number value.Example Sub MainDebug.Print Abs(9) 9Debug.Print Abs(0) 0Debug.Print Abs(-9) 9End SubAppActivate InstructionSyntax AppActivate Title$Group MiscSax Basic Engine Language Reference / 147Description Activates the application s top-level window, Title$.If no window bythis title exists, the first window with a title that begins with Title$ isactivated.If no window matches, an error occurs.Parameter DescriptionTitle$ The name shown in the title bar of the window.See Also SendKeys, Shell( )Example Sub Main make ProgMan the active applicationAppActivate Program ManagerEnd SubArray FunctionSyntax Array(exprlist)Group Variables/ExpressionsDescription Returns a variant value array containing exprlist.Example: Sub MainX = Array(1,4,9)Debug.Print X(2) 4End SubAsc FunctionSyntax Asc(S$)Group String FunctionsDescription Returns the ASCII value.Parameter DescriptionS$ Returns the ASCII value of the first char in this string value.See Also Chr$( )148 / Chapter 8Example: Sub MainDebug.Print Asc( A ) 65End SubAtn FunctionSyntax Atn(Num)Group Numeric FunctionsDescription Returns the arc tangent.Parameter DescriptionNum Returns the arc tangent of this number value, which is thenumber of radians.There are Pi radians in a full circle.Example Sub MainDebug.Print Atn(1)*4 3.1415926535898End SubBeep InstructionSyntax BeepGroup User DialogsDescription Sounds the bell.Example Sub MainBeep beep the bellEnd SubBegin DialogSyntax BeginDialog UserDialogGroup UserDialogsDescription Used to define a user-dialog box.Sax Basic Engine Language Reference / 149See Also Begin Dialog, UserDialog, Dim As UserDialogExample Sub MainBegin Dialog UserDialog 200,120Text 10,10,180,15,"Please push the OK button"CheckBox 10,25,180,15,"&Check box",.CheckOKButton 80,90,40,20End DialogDim dlg As UserDialogdlg.Check = 1Dialog dlg show dialog (wait for OK)Debug.Print dlg.CheckEnd SubCall InstructionSyntax Call name[(exprlist)]-or-name[exprlist]Group Flow ControlDescription Evaluates the exprlist and calls Sub name using those values.If Call isomitted, the exprlist is not enclosed in parens.Subroutine name must bepreviously defined by either a Sub, Function, or Property definition.See Also Declare, SubExample Sub Show(Title$,Value)Debug.Print Title$;"=";ValueEnd SubSub MainCall Show( 2000/9",2000/9) 222.2222222222Show 1 [ Pobierz całość w formacie PDF ]