From 61d266385ab372b3106d49e382015a1b1d1cdcef Mon Sep 17 00:00:00 2001 From: Spencer Phillip Young Date: Fri, 19 Apr 2024 10:38:12 -0700 Subject: [PATCH] GH-289 fix message box in AHKv2 --- ahk/_async/engine.py | 3 +++ ahk/_sync/engine.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/ahk/_async/engine.py b/ahk/_async/engine.py index 8918633..9232fa4 100644 --- a/ahk/_async/engine.py +++ b/ahk/_async/engine.py @@ -3756,6 +3756,9 @@ async def msg_box( args = [str(options), title, text] if timeout is not None: args.append(str(timeout)) + else: + args.append('') + return await self._transport.function_call('AHKMsgBox', args, blocking=blocking) # fmt: off diff --git a/ahk/_sync/engine.py b/ahk/_sync/engine.py index afbba1e..fa98fd6 100644 --- a/ahk/_sync/engine.py +++ b/ahk/_sync/engine.py @@ -3744,6 +3744,9 @@ def msg_box( args = [str(options), title, text] if timeout is not None: args.append(str(timeout)) + else: + args.append('') + return self._transport.function_call('AHKMsgBox', args, blocking=blocking) # fmt: off