Triggering Arduino Micro with ESP8266 using Micropython

Hi, does anyone know how to amend the following micropython code (run on an ESP 8266) to be activated by some VB script on another pc (on the same network) rather than having to be a button press on a webpage?

I appreciate that this isn’t strictly an Arduino question, I’m running a basic virtual keyboard library on the micro which currently works well when testing this stage of my project. At the moment when I short pin 9 to ground, a pageup is sent to a connected pc as if it was a keyboard.

The ESP is wired to the Arduino which should (with the amended code) allow the VB code to activate this instead.

The code I have so far is

wifi.setmode(wifi.STATION)
wifi.sta.config("SSID","WiFipassword")
print(wifi.sta.getip())
pin_out = 3
US_TO_MS = 1000
gpio.mode(pin_out, gpio.OUTPUT)
gpio.write(pin_out, gpio.HIGH)
srv=net.createServer(net.TCP)
srv:listen(80,function(conn)
    conn:on("receive", function(client,request)
        local buf = "";
        local _, _, method, path, vars = string.find(request, "([A-Z]+) (.+)?(.+) HTTP");
        if(method == nil)then
            _, _, method, path = string.find(request, "([A-Z]+) (.+) HTTP");
        end
        local _GET = {}
        if (vars ~= nil)then
            for k, v in string.gmatch(vars, "(%w+)=(%w+)&*") do
                _GET[k] = v
            end
        end
        buf = buf.."<h1> ESP8266 Web Server</h1>";
        buf = buf.."<p>GPIO0 <a href=\"?pin=SND\"><button>Send Key</button></a></p>";
        local _on,_off = "",""
        if(_GET.pin == "SND")then
              gpio.write(pin_out, gpio.HIGH);
              tmr.delay(200 * US_TO_MS);
              gpio.write(pin_out, gpio.LOW);
        end
        client:send(buf);
        client:close();
        collectgarbage();
    end)
end)

The code I am wishing to use to activate the code above (as amended) is

Dim webClient As New System.Net.WebClient
Dim result As String = webClient.DownloadString("http://IP-of-Ardduino/send-pageup-to-laptop")

Thanks

Alex