diff --git a/new/AutoItInterpreter/AssemblyInfo.cs b/new/AutoItInterpreter/AssemblyInfo.cs
index 32306ae..67da79e 100644
--- a/new/AutoItInterpreter/AssemblyInfo.cs
+++ b/new/AutoItInterpreter/AssemblyInfo.cs
@@ -1,15 +1,15 @@
//////////////////////////////////////////////////////////////////////////
-// Auto-generated 2021-03-22 21:57:49.484 //
+// Auto-generated 2021-03-22 22:54:08.537 //
// ANY CHANGES TO THIS DOCUMENT WILL BE LOST UPON RE-GENERATION //
//////////////////////////////////////////////////////////////////////////
using System.Reflection;
using System;
-[assembly: AssemblyVersion("0.8.1875.7557")]
-[assembly: AssemblyFileVersion("0.8.1875.7557")]
-[assembly: AssemblyInformationalVersion("v.0.8.1875.7557, commit: 0e0fea616d6b8fd25c4843431f552d6c04661d68")]
+[assembly: AssemblyVersion("0.8.1882.7557")]
+[assembly: AssemblyFileVersion("0.8.1882.7557")]
+[assembly: AssemblyInformationalVersion("v.0.8.1882.7557, commit: e6ce438d6474307aa98cb81ebfa7288c0394ac1a")]
[assembly: AssemblyCompany("Unknown6656")]
[assembly: AssemblyCopyright("Copyright © 2018 - 2021, Unknown6656")]
[assembly: AssemblyProduct("AutoIt-Interpreter by Unknown6656")]
@@ -35,11 +35,11 @@ public static class __module__
///
/// The interpreter's current version.
///
- public static Version? InterpreterVersion { get; } = Version.Parse("0.8.1875.7557");
+ public static Version? InterpreterVersion { get; } = Version.Parse("0.8.1882.7557");
///
/// The Git hash associated with the current build.
///
- public const string GitHash = "0e0fea616d6b8fd25c4843431f552d6c04661d68";
+ public const string GitHash = "e6ce438d6474307aa98cb81ebfa7288c0394ac1a";
///
/// The name of the GitHub repository associated with .
///
@@ -49,7 +49,7 @@ public static class __module__
///
public const string RepositoryURL = "https://github.com/Unknown6656/AutoIt-Interpreter";
///
- /// The date and time of the current build (2021-03-22 21:57:49.484).
+ /// The date and time of the current build (2021-03-22 22:54:08.537).
///
- public static DateTime DateBuilt { get; } = DateTime.FromFileTimeUtc(0x01d71f5e0492eee9L);
+ public static DateTime DateBuilt { get; } = DateTime.FromFileTimeUtc(0x01d71f65e2a58a60L);
}
diff --git a/new/AutoItInterpreter/Extensibility/Plugins.Au3Framework.Functions.cs b/new/AutoItInterpreter/Extensibility/Plugins.Au3Framework.Functions.cs
index c65cfe4..f01722e 100644
--- a/new/AutoItInterpreter/Extensibility/Plugins.Au3Framework.Functions.cs
+++ b/new/AutoItInterpreter/Extensibility/Plugins.Au3Framework.Functions.cs
@@ -208,7 +208,7 @@ public FrameworkFunctions(Interpreter interpreter)
RegisterFunction(nameof(ShellExecute), 1, 5, ShellExecute, Variant.EmptyString, Variant.EmptyString, Variant.Default, Variant.Default);
RegisterFunction(nameof(ShellExecuteWait), 1, 5, ShellExecuteWait, Variant.EmptyString, Variant.EmptyString, Variant.Default, Variant.Default);
RegisterFunction(nameof(SoundPlay), 1, 2, SoundPlay, Variant.Zero);
- RegisterFunction(nameof(SoundSetWaveVolume), 1, SoundSetWaveVolume);
+ // RegisterFunction(nameof(SoundSetWaveVolume), 1, SoundSetWaveVolume);
RegisterFunction(nameof(StringAddCR), 1, StringAddCR);
RegisterFunction(nameof(StringCompare), 2, 3, StringCompare, Variant.Zero);
RegisterFunction(nameof(StringFormat), 1, 33, StringFormat);
@@ -529,10 +529,14 @@ internal static FunctionReturnValue ConsoleRead(CallFrame frame, Variant[] args)
{
bool peek = args[0].ToBoolean();
bool binary = args[1].ToBoolean();
+ int input = peek ? Console.In.Peek() : Console.In.Read();
- // TODO
-
- throw new NotImplementedException();
+ if (input < 0)
+ return FunctionReturnValue.Error(1);
+ else if (binary)
+ return Variant.FromBinary(new[] { (byte)(input & 0xff) });
+ else
+ return Variant.FromString(new string(new[] { (char)input }));
});
internal static FunctionReturnValue Cos(CallFrame frame, Variant[] args) => (Variant)Math.Cos((double)args[0].ToNumber());
@@ -2774,7 +2778,7 @@ internal FunctionReturnValue SoundPlay(CallFrame frame, Variant[] args)
bool wait = args[1].ToBoolean();
ProcessStartInfo pfi = new(path)
{
- Arguments = Path.GetFileName(path) + " --play-and-exit",
+ Arguments = $"-I null --play-and-exit --qt-start-minimized \"{path}\"",
UseShellExecute = true,
WorkingDirectory = Path.GetDirectoryName(path)!,
FileName = NativeInterop.DoPlatformDependent("vlc.exe", "cvlc"),
diff --git a/new/AutoItInterpreter/version.txt b/new/AutoItInterpreter/version.txt
index bc061d9..0d52200 100644
--- a/new/AutoItInterpreter/version.txt
+++ b/new/AutoItInterpreter/version.txt
@@ -1,2 +1,2 @@
-0.8.1875.7557
-0e0fea616d6b8fd25c4843431f552d6c04661d68
\ No newline at end of file
+0.8.1882.7557
+e6ce438d6474307aa98cb81ebfa7288c0394ac1a
\ No newline at end of file
diff --git a/new/test/test.au3 b/new/test/test.au3
index ac49d41..e08e9ed 100644
--- a/new/test/test.au3
+++ b/new/test/test.au3
@@ -1,3 +1,14 @@
+ $sOutput = ""
+ While True
+ $sOutput &= ConsoleRead()
+ If @error or StringLen($soutput) > 20 Then ExitLoop
+ Sleep(25)
+ WEnd
+ ConsoleWrite(@CRLF&@crlf&$sOutput)
+ exit
+
+
+
func my_func()
ConsoleWriteLine("A")
endfunc