Post by jeeswg » 25 Aug 2018, 22:36
Code: Select all
==================================================
for AHK v1: A_ variable names:
A_CParen [returns )]
A_EmptyString [an empty built-in variable function that returns a string]
A_OParen [returns (]
A_ReturnString [a built-in variable function that returns 'hello world']
A_SQ [returns ']
==================================================
[script.h]
BIV_DECL_R (BIV_CParen);
BIV_DECL_R (BIV_EmptyString);
BIV_DECL_R (BIV_OParen);
BIV_DECL_R (BIV_ReturnString);
BIV_DECL_R (BIV_SQ);
==================================================
[script.cpp]
A_(CParen),
A_(EmptyString),
A_(OParen),
A_(ReturnString),
A_(SQ),
==================================================
[script2.cpp]
VarSizeType BIV_CParen(LPTSTR aBuf, LPTSTR aVarName)
{
if (aBuf)
{
*aBuf++ = ')';
*aBuf = '\0';
}
return 1;
}
VarSizeType BIV_EmptyString(LPTSTR aBuf, LPTSTR aVarName)
{
//returns whatever the last string was
return 1;
}
VarSizeType BIV_OParen(LPTSTR aBuf, LPTSTR aVarName)
{
if (aBuf)
{
*aBuf++ = '(';
*aBuf = '\0';
}
return 1;
}
VarSizeType BIV_ReturnString(LPTSTR aBuf, LPTSTR aVarName)
{
if (aBuf)
_tcscpy(aBuf, _T("hello world"));
//return (VarSizeType)_tcslen(_T("hello world"));
return 11;
}
VarSizeType BIV_SQ(LPTSTR aBuf, LPTSTR aVarName)
{
if (aBuf)
{
*aBuf++ = '\'';
*aBuf = '\0';
}
return 1;
}
==================================================
[code=cpp]
==================================================
for AHK v1: A_ variable names:
A_CParen [returns )]
A_EmptyString [an empty built-in variable function that returns a string]
A_OParen [returns (]
A_ReturnString [a built-in variable function that returns 'hello world']
A_SQ [returns ']
==================================================
[script.h]
BIV_DECL_R (BIV_CParen);
BIV_DECL_R (BIV_EmptyString);
BIV_DECL_R (BIV_OParen);
BIV_DECL_R (BIV_ReturnString);
BIV_DECL_R (BIV_SQ);
==================================================
[script.cpp]
A_(CParen),
A_(EmptyString),
A_(OParen),
A_(ReturnString),
A_(SQ),
==================================================
[script2.cpp]
VarSizeType BIV_CParen(LPTSTR aBuf, LPTSTR aVarName)
{
if (aBuf)
{
*aBuf++ = ')';
*aBuf = '\0';
}
return 1;
}
VarSizeType BIV_EmptyString(LPTSTR aBuf, LPTSTR aVarName)
{
//returns whatever the last string was
return 1;
}
VarSizeType BIV_OParen(LPTSTR aBuf, LPTSTR aVarName)
{
if (aBuf)
{
*aBuf++ = '(';
*aBuf = '\0';
}
return 1;
}
VarSizeType BIV_ReturnString(LPTSTR aBuf, LPTSTR aVarName)
{
if (aBuf)
_tcscpy(aBuf, _T("hello world"));
//return (VarSizeType)_tcslen(_T("hello world"));
return 11;
}
VarSizeType BIV_SQ(LPTSTR aBuf, LPTSTR aVarName)
{
if (aBuf)
{
*aBuf++ = '\'';
*aBuf = '\0';
}
return 1;
}
==================================================
[/code]