FindLabel
Finds a label in currently executed script and returns a pointer to it.
OutputVar := FindLabel(LabelName)
Function Example: MyLabelPtr := FindLabel("MyLabel")
Parameters
- OutputVar
-
The name of the variable to store the label pointer in or 0 if the label was not found.
- LabelName
-
The name of the label to find.
Examples
; AHK Structures global _AHKDerefType := "LPTSTR marker,{_AHKVar *var,_AHKFunc *func,_AHKDerefType *next,UInt symbol},BYTE type,param_count,WORD length" global _AHKExprTokenType := "{__int64 value_int64,double value_double,struct{{PTR *object,_AHKDerefType *deref,_AHKVar *var,LPTSTR marker},{LPTSTR buf,size_t marker_length}}},UINT symbol,{_AHKExprTokenType *circuit_token,LPTSTR mem_to_free}" global _AHKArgStruct := "BYTE type,bool is_expression,WORD length,LPTSTR text,_AHKDerefType *deref,_AHKExprTokenType *postfix" global _AHKBreakPoint := "INT id,BYTE type,BYTE state,bool temporary" global _AHKLine := "BYTE mActionType,mArgc,WORD mFileIndex,UINT mLineNumber,_AHKArgStruct *mArg,PTR *mAttribute,_AHKLine *mPrevLine,*mNextLine,*mRelatedLine,*mParentLine,_AHKBreakPoint *mBreakPoint" global _AHKLabel := "PTR vTable,LPTSTR mName,_AHKLine *mJumpToLine,_AHKLabel *mPrevLabel,*mNextLabel" MyLabel:=Struct(_AHKLabel,FindLabel("MyLabel")) MsgBox % "Name:`t" MyLabel.mName "`nLine:`t" MyLabel.mJumpToLine.mLineNumber MyLabel: Return