Hello im new here and i dont have experience on autoit can somebody help me? So the problem is :
The Script
Line 18 $sGuid = $sGuid[0] $sGuid = ERROR
AutoIt
#include "WinHttp.au3" #include <String.au3> Opt("MustDeclareVars", 1) Local $hOpen = _WinHttpOpen() Local $hConnect = _WinHttpConnect($hOpen, "[url=http://www.guidgenerator.com/]http://www.guidgenerator.com/[/url]") Local $hRequest = _WinHttpOpenRequest($hConnect, "POST", "online-guid-generator.aspx") Local $data = "txtCount=1&chkHypens=On&Button1=Generate" Local $data1 = "__VIEWSTATE=%2FwEPDwUJMTk1MDgwNTkxZBgBBR5fX0NvbnRyb2xzUmVxdWlyZVBvc3RCYWNrS2V5X18WAwUMY2hrVXBwZXJjYXNlBQtjaGtCcmFja2V0cwUJY2hrSHlwZW5zEP0U%2BOIYUuW3bpG4bQtW980Sr%2Fg%3D&__VIEWSTATEGENERATOR=247C709F&__EVENTVALIDATION=%2FwEWBwKJo9mYBgLJkuW4AwKyzJeLDALcw7KJAgKm%2FOiABwKM54rGBgL6g7v1A9pSCUBhX%2BccVPc3JQBvo3RVU1Zu&txtCount=1&chkHypens=on&Button1=Generate+some+GUIDs%21&txtResults=" Local $sHeader = "Content-Type: application/x-www-form-urlencoded" & @CRLF _WinHttpSendRequest($hRequest, $sHeader, $WINHTTP_NO_REQUEST_DATA, StringLen($data1), 0) _WinHttpWriteData($hRequest, $data1) _WinHttpReceiveResponse($hRequest) Local $response = _WinHttpReadData($hRequest) Local $sGuide = _StringBetween($response, 'id="txtResults">', "") $sGuid = $sGuid[0] ;convert from array to string RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography", "MachineGuid", "REG_SZ", $sGuid) TrayTip("MachineGUID:", "Changed to: " & $sGuid, 1000) Sleep(2000) _WinHttpCloseHandle($hOpen) _WinHttpCloseHandle($hConnect) _WinHttpCloseHandle($hRequest)