Windows has its own game-time Solitaire, in which the No. 617 inning is more difficult to solve, the number of times to try more, and often forget the solution and steps.
I had hoped to use a autoit or AutoHotkey, Aauto type of tool to write an automated script to quickly resolve this inning, but these tools need to be installed and easily treated as viruses. By using VBA in office to invoke the Windows API, you can quickly demonstrate the solution by sending key messages to the game window.
Declare Function FindWindow Lib "User32" Alias _
"Findwindowa" (ByVal lpclassname as String, ByVal Lpwindowname as Str ing) as long
Declare Function sendmessage Lib "User32" Alias _
"SendMessageA" (ByVal hwnd as Long, ByVal wmsg as L Ong, ByVal WParam as Long, ByVal LParam as Long) as long
Const WM_CHAR = &h102
Sub f ()
s = "83 80 83 81 80 "& _" "A" & _ "" 14 "," & _ "M-I-M ("
& _ ")
10 004 10 & _
"002" & _ "the same as"
& _
"All-by-and-a-June" ;
"
FindWindow" ("Freewclass", "Gap Solitaire Game #617") for
i = 1 to Len (s)
C = Mid (s), I, 1)
m = 0.1
If c >= "0" and C <= "9" Then
a = SendMessage (h, WM_CHAR, ASC (c), 0)
Else
m = 0.3 End
If
m = m + timer:do while Timer < M:doevents:loop
Next end
Sub