// Naveen: v1. ahkgetvar() EXPORT LPTSTR ahkgetvar(LPTSTR name,unsigned int getVar) { Var *ahkvar = g_script.FindOrAddVar(name); if (getVar != NULL) { if (ahkvar->mType == VAR_BUILTIN) return _T(""); result_to_return_dll = (LPTSTR )realloc((LPTSTR )result_to_return_dll,MAX_INTEGER_LENGTH); return ITOA64((int)ahkvar,result_to_return_dll); } if (!ahkvar->HasContents() && ahkvar->mType != VAR_BUILTIN ) return _T(""); if (*ahkvar->mCharContents == '\0') { result_to_return_dll = (LPTSTR )realloc((LPTSTR )result_to_return_dll,(ahkvar->mByteCapacity ? ahkvar->mByteCapacity : ahkvar->mByteLength) + MAX_NUMBER_LENGTH + 1); if ( ahkvar->mType == VAR_BUILTIN ) ahkvar->mBIV(result_to_return_dll,name); //Hotkeyit else if ( ahkvar->mType == VAR_ALIAS ) ITOA64(ahkvar->mAliasFor->mContentsInt64,result_to_return_dll); else if ( ahkvar->mType == VAR_NORMAL ) ITOA64(ahkvar->mContentsInt64,result_to_return_dll);//Hotkeyit } else { result_to_return_dll = (LPTSTR )realloc((LPTSTR )result_to_return_dll,ahkvar->mByteLength+1); if ( ahkvar->mType == VAR_ALIAS ) ahkvar->mAliasFor->Get(result_to_return_dll); //Hotkeyit removed ebiv.cpp and made ahkgetvar return all vars else if ( ahkvar->mType == VAR_NORMAL ) ahkvar->Get(result_to_return_dll); // var.getText() added in V1. else if ( ahkvar->mType == VAR_BUILTIN ) ahkvar->mBIV(result_to_return_dll,name); //Hotkeyit } return result_to_return_dll; }