Page 1 of 1

AutoHotkey simple script doesn't work when compiled

Posted: 18 Oct 2018, 16:15
by needle
Hello guys,
I have a simple script that works perfectly in the interpreted version but it returns an error when ran the compiled version.

The script:

url = %1%
reservation = %2%
status = %3%
uid = %4%
ex_id = %5%

variables = {"id":"%reservation%", "status":"%status%", "uid":"%uid%", "ex_id":"%ex_id%"}

WebRequest := ComObjCreate("WinHttp.WinHttpRequest.5.1")
WebRequest.Open("PUT", url, false)
WebRequest.setRequestHeader("Content-Type", "application/json")

The error is 0x80072726 - An invalid argument was supplied.
Specifically: Send


Error Image:
Any help would be greatly appreciated because I'm stuck here.