Recently Browsing 0 members
No registered users viewing this page.
goodmorning autoit team
today am comming with some winhttp problems, i hope that you can help me to solve them.
the first problem
is when opening a request
my forums api allow me to delete any post using the api key
all functions work, i mean post / get
but when i tried to use the delete verb it's gave me an html 404 error
here is what am tried
#include "WinHttp.au3" ; Open needed handles Global $hOpen = _WinHttpOpen() Global $hConnect = _WinHttpConnect($hOpen, "xxxxxxxx.com") ; Specify the reguest: Global $hRequest = _WinHttpOpenRequest($hConnect, "Delete", "/vb/Api/posts/10447/?hard_delete=true", default, default) _WinHttpAddRequestHeaders($hRequest, "XF-Api-Key:xxxxx") _WinHttpAddRequestHeaders($hRequest, "XF-Api-User:xxxxx") ; Send request _WinHttpSendRequest($hRequest) ; Wait for the response _WinHttpReceiveResponse($hRequest) Global $sHeader = 0, $sReturned = 0 ; If there is data available... If _WinHttpQueryDataAvailable($hRequest) Then $sHeader = _WinHttpQueryHeaders($hRequest, $WINHTTP_QUERY_CONTENT_DISPOSITION) ;Or maybe: ; $sHeader = _WinHttpQueryHeaders($hRequest, BitOR($WINHTTP_QUERY_RAW_HEADERS_CRLF, $WINHTTP_QUERY_CUSTOM), "Content-Disposition") Do $sReturned &= _WinHttpReadData($hRequest) Until @error msgBox(64, "", $sReturned) endIf ; Close handles _WinHttpCloseHandle($hRequest) _WinHttpCloseHandle($hConnect) _WinHttpCloseHandle($hOpen)
and here is the error message
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>403 Forbidden</title> </head><body> <h1>Forbidden</h1> <p>You don't have permission to access /vb/Api/posts/10447/ on this server.<br /> </p> </body></html>
i hope you can help me
thanks in advance
I have a string like this :
Global $Msga = "urrent directory is /send. (Submission of file with log number 29381077284 is confirmed)";
I want to extract the number 29381077284 from the string. I did StringSplit to split based on "(" and then use space to reach there, But it's not a good choice.
Can anyone help me with regular expression to find the number from String using AutoIT. TIA
I have this example string:
2020-06-08 09:23:33 : abcdefghifjklm How to trim just the right part? Or how to trim this text right to left?
I want to trim this string right to left until ' : '.
In ohter words: I need the 'abcdefghifklm' text.
I have tried StringTrimRight, but that requires
The number of characters to trim. Unfortunately StringSplit trims the left part of the strings.
This is my take on string triggers, triggers on specific strings.
Able to simple text pasting,
opening links (as long as there's a www. http:\\ or https:\\ at the beggining)
and is able to open applications, if there is a parameter in the parameter field, it uses it.
Shows your external, lan, and gateway ip's.
Able to change system volume by a set percentage, reading from the inputbox the number the user sets, if 0 or empty uses system default.
I made this because the existing string trigger applications didn't do it for me.
I did this for me, but if someone finds it useful, all the better.