Esempio n. 1
0
 /// <summary>
 /// Gets the value for a varible or an empty string if the variable does not exist.
 /// </summary>
 /// <param name="variableName">Name of the variable.</param>
 /// <returns>Returns the value of the variable, or an empty string if the variable does not exist.</returns>
 public string GetVar(string variableName)
 {
     using (new CurrentDirectorySaver()) {
         var p = AutoHotkeyDll.ahkgetvar(variableName, 0);
         return(Marshal.PtrToStringUni(p));
     }
 }
        /// <summary>
        /// Gets the value for a varible or an empty string if the variable does not exist.
        /// </summary>
        /// <param name="variableName">Name of the variable.</param>
        /// <returns>Returns the value of the variable, or an empty string if the variable does not exist.</returns>
        public string GetVar(string variableName)
        {
            var p = AutoHotkeyDll.ahkgetvar(variableName, 0);

            return(Marshal.PtrToStringUni(p));
        }