Popular Post TheSaint Posted July 14, 2023 Popular Post Share Posted July 14, 2023 (edited) I've been using AutoIt for a couple of decades now, and created hundreds of programs, and my knowledge of C and derivatives could be written on a Napkin, and in all reality has never served me in my use of AutoIt. That said, I have of course benefited from the understanding of C etc by those who have developed and maintain AutoIt. I mostly came to AutoIt via VB 4, 5 & 6, especially VBA, where I would have created (and still do) lots of VBA macros. I'd dabbled with some C variants etc, but was quite turned off by them, they not matching how my mind works or wants to work. I'd class AutoIt as a bit like VB, but with a lot of the nonsense missing. To this day, despite how experienced I am with VBA, it still regularly gives me grief ... that rarely occurs with AutoIt ... all to do, in my view, with the mentality behind them. But then I am totally self taught, in the monkey-see monkey-do style of coding, with the ability to analyze enough. I am not well versed on theory and concepts, other than what I have picked up on-the-fly. Jon & the AutoIt Team, past & present, have liberated many folk like myself, for which I will eternally be grateful. In my view, AutoIt is the best language for the average person on the street to use, bar none. It is simple enough and plain speaking enough, with a superb Help file, to introduce many to programming, without the requirement to be nerdy etc. Many of course then move onto other languages, but often retain AutoIt in their toolbox. Edited July 14, 2023 by TheSaint Musashi, funkey, pixelsearch and 3 others 6 Make sure brain is in gear before opening mouth! Remember, what is not said, can be just as important as what is said. Spoiler What is the Secret Key? Life is like a Donut If I put effort into communication, I expect you to read properly & fully, or just not comment. Ignoring those who try to divert conversation with irrelevancies. If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it. I'm only big and bad, to those who have an over-active imagination. I may have the Artistic Liesense to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage) Link to comment Share on other sites More sharing options...
TheDcoder Posted July 14, 2023 Share Posted July 14, 2023 1 hour ago, jchd said: Ahem! The very first versions of C++ were just a C pre-processor ! Implementation detail 59 minutes ago, TheSaint said: I'd dabbled with some C variants etc, but was quite turned off by them, they not matching how my mind works or wants to work. Time to try Rust EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion Link to comment Share on other sites More sharing options...
TheSaint Posted July 14, 2023 Share Posted July 14, 2023 4 hours ago, TheDcoder said: Time to try Rust Yeah yeah. I do seem to recall having a quick look at it a while back, like I usually do with new languages ... just to see if anyone is as smart as Jon ... not found any yet ... plenty of clever folk though ... nerdies. TheDcoder 1 Make sure brain is in gear before opening mouth! Remember, what is not said, can be just as important as what is said. Spoiler What is the Secret Key? Life is like a Donut If I put effort into communication, I expect you to read properly & fully, or just not comment. Ignoring those who try to divert conversation with irrelevancies. If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it. I'm only big and bad, to those who have an over-active imagination. I may have the Artistic Liesense to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage) Link to comment Share on other sites More sharing options...
Andreik Posted July 14, 2023 Share Posted July 14, 2023 11 hours ago, argumentum said: Goodness !, ... different languages, cultures and thought patterns !. All he is saying, ( not very well in English I must say ), is that even a default "Hello world" ( in C, C++, AutoIt, MyOwnLanguage ), gets a "no go" from the virus detectors. That's that in regards to viruses. The C++ is in regards to structs, pointers and DLL handling. And that is that in regards to the "C++" thing. Good chat But that's not true as well. I compiled a simple app in C++ and all reports has been ok except a no name AV software, which I had to google to get some info about and it was some shitty AI probably in training. So it's not just a language barrier, his claims are wrong. TheDcoder 1 When the words fail... music speaks. Link to comment Share on other sites More sharing options...
argumentum Posted July 14, 2023 Share Posted July 14, 2023 1 hour ago, Andreik said: I compiled a simple app in C++ and all reports has been ok .... So it's not just a language barrier, his claims are wrong. "I married 3 times, divorced 3 times, marriage is doom to failure." Well, that is 1 experience. Go figure what made the marriages fail ( it was me ), I have no clue, I'm the best there is. If he has a claim, he has a claim. In his view is true and ... that's his experience. Let's do something about it. Zip up your code, give it to him, he'd translate it to his native langue and/or use his compiler and see if the resultant binary is better accepted by the AVs, or not. Lets debug it via a scientific method. Replication TheDcoder and Andreik 2 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
Andreik Posted July 14, 2023 Share Posted July 14, 2023 (edited) Nah, my default code is better than his default code. I won't give him mine. I'm not sure what he is doing wrong and why all red flags are on, I just hope his window name doesn't have a title such as "My Default Trojan - It's just a test bro" or something like that. PS: @argumentum with such experience, I should hire you to translate me all strange requests from this forum Edited July 14, 2023 by Andreik TheSaint, TheDcoder and argumentum 3 When the words fail... music speaks. Link to comment Share on other sites More sharing options...
Gianni Posted July 16, 2023 Share Posted July 16, 2023 (edited) On 7/13/2023 at 9:24 PM, wolf9228 said: In this topic, I discuss the requirement for knowledge of the C++ language and by those who practice writing scripts and on various programming languages such as Autoit, BASIC, or other languages. Why should a programmer have knowledge, even if it is simple, of C++, because references to Windows functions Written in C++ on the MSDN website... Most of the basic references are written in C++, and most of the programming examples are written on the MSDN website in C++... Likewise, I encountered here in the Autoit forum those who denounce A topic I raised in the forum has to do with the C++ language. The C++ language can be discussed and raised here, to some extent, and in all programming forums, because it is the basic Windows reference language... Other than that, there are general topics in Windows system programming that can be raised here in the Autoit forum. Or in other Windows programming forums... For example, the false reports of protection programs about executable files and the various integrated development environments that work on the Windows system... Thank you... Greetings. I fully agree with you, knowing c++ is definitely an added value to be able to master the interaction between autoit and controls/objects available in windows. (I don't understand the criticisms I've read in previous posts) As you said in your original post, the documentation and control references on Microsoft's site assume you are an experienced C++ programmer. (...unfortunately for me it is not my case) For example, if you want to use the AutoIt functions ObjCreateInterface() or ObjectFromTag() to use COM controls/objects, you need to "translate" the declarations of classes, interface members and also variable types contained in its C/C++ header file and adapt them to AutoIt .... not a simple task if you don't know C/C++ In this regard, check out <this topic> by @LarsJ. It is not essential to know C/C++ for a basic use of AutoIt, but if you want to make more "hard" use of it, also taking advantage of the controls made available by Windows, then knowing C/C++ will be essential, otherwise you will be forced to preclude those possibilities. Looking back on your previous topics, I see you have a good understanding of using COM objects from AutoIt. If you agree, I would like to ask for your opinion; Do you think it's possible to write a tool like TLIBIMP.EXE but for AutoIt? This tool should convert type definitions found within a COM type library file (or better within the header file since it is plain text) into equivalent definitions/description tags ready to be used by ObjCreateInterface() and ObjectFromTag() commands?? It really would be a wonderful tool! Thank you Edited July 16, 2023 by Gianni Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... Link to comment Share on other sites More sharing options...
argumentum Posted July 17, 2023 Share Posted July 17, 2023 (edited) 17 hours ago, Gianni said: ... In this regard, check out <this topic> ... so I followed the rabbit hole, ..found the WebView2 posting ... and I'm like "hmm, what about a JSON/HTTP/AutoIt with what we already have ?", and rehashed this code from a http server to open as "--app" in chrome. Spoiler expandcollapse popup#AutoIt3Wrapper_Au3Check_Parameters=-q -d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7 #include <MsgBoxConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <Debug.au3> #include <SQLite.au3> ;~ #include <ZLIB.au3> ; https://www.autoitscript.com/forum/topic/128962-zlib-deflateinflategzip-udf/?Do=findComment&comment=1312432 ;~ #include <Crypt.au3> ; for "Content-MD5:" Global $tcp_Home = "home/" ; change this home page as needed, if this default bothers your testing. Global $tcp_Port = 81 ; if 80 is in use, try 81, as in http://127.0.0.1:81/home/ Global $tcp_ListenSocket = 0, $tcp_aForm[] = [755, 400, 0, 0, 0, 0, 4, 0, 4, 0, 0, 0, "", 1] TCPStartup() ; Start the TCP service. OnAutoItExitRegister("OnAutoItExit") ; Register OnAutoItExit to be called when the script is closed. mainloop() ; tha MAIN loop Func mainloop() Opt("TCPTimeout", 10) Opt("TrayAutoPause", 0) ; ..I coded this with Opt("GUIOnEventMode", 0), wrong choice, so, lets TCPTimeout faster :/ ; Do change the timeout if you get connection problems. mainGui() ; if you do away with this debugging GUI, the stress on the script is less. Local $iCountTryCloseSocket, $iTestSocketCount = 0, $iError = 0, $buffer, $bReceived ; Assign a variable the socket and bind to the IP Address and Port specified with a maximum of 100 pending connexions. $tcp_ListenSocket = TCPListen("0.0.0.0", $tcp_Port, 100) If @error Then $iError = @error ; Someone is probably already listening on this IP Address and Port (script already running?). MsgBox(BitOR($MB_SYSTEMMODAL, $MB_ICONHAND), "", "Server:" & @CRLF & "Could not listen, Error code: " & $iError, 60, $tcp_aForm[3]) Return False EndIf Local $sDueToTimeout, $sTimer, $hTimerResponse, $hTimerReqRcvd, $errTCPRecv, $extTCPRecv, $myHRseparator = @CRLF & "<hr>" & @CRLF & @CRLF Local $sTime, $urlReq, $method, $ContentLength, $ContentBody, $ContentType, $Referer, $AcceptEncoding, $Header_Expect, $iSocket = -1 ; Assign a Local variable to be used by the Client socket. If $tcp_aForm[3] Then GUICtrlSetData($tcp_aForm[4], "do search" & @CRLF & @CRLF & _ "https://www.google.com/search?q=http+protocol" & @CRLF & _ "https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol" & @CRLF & @CRLF & _ "to get acquainted with the protocol if you need to.") Local $sNiceLineBottom = Chr(0xAF) Local $sNiceLineTop = "_" For $n = 1 To 6 $sNiceLineBottom &= $sNiceLineBottom $sNiceLineTop &= $sNiceLineTop Next Local $aQueryData[1][5] = [[0]] If Not FileGetSize(@ScriptDir & "\jquery-latest.min.js") Then InetGet("http://code.jquery.com/jquery-latest.min.js", @ScriptDir & "\jquery-latest.min.js") Local $s_jquery_latest_min_js = FileRead(@ScriptDir & "\jquery-latest.min.js") ; better to server all from script. User may not have internet. Local $i_jquery_latest_min_js = @extended ; if not zero, load from local source Local $bMyFaviconFile = MyFaviconFile() ; ..it looks nicer with a favicon If FileGetSize(@ScriptDir & "\favicon.ico") Then $bMyFaviconFile = FileRead(@ScriptDir & "\favicon.ico") If Not $tcp_aForm[3] Then f_LoadTheGuiSite() ; no button to load via GUI, so lets load it ( you'd code something to check if WinExists ) While 1 If $iSocket = -1 Then $iSocket = TCPAccept($tcp_ListenSocket) ; here it will wait the declared "Opt('TCPTimeout', 20)" If @error Then ; If an error occurred display the error code and return False. $iError = @error MsgBox(BitOR($MB_SYSTEMMODAL, $MB_ICONHAND), "", "Server:" & @CRLF & "Could not accept the incoming connection, Error code: " & $iError) Return False EndIf If $iSocket <> -1 Then ; SideNote: I would fork the socket right here but this is just an example $hTimerReqRcvd = TimerInit() ; so is better to not over complicate it. $iTestSocketCount += 1 ContinueLoop ; As there is a socket, lets attend to it ASAP. EndIf Else $buffer = StringToBinary("") Do $sDueToTimeout = "" $bReceived = TCPRecv($iSocket, 4096, 1) ; $TCP_DATA_BINARY (1) - return binary data $errTCPRecv = @error $extTCPRecv = @extended $buffer &= $bReceived If DiscernData(BinaryToString($buffer), $urlReq, $method, $ContentLength, $ContentBody, $ContentType, $Referer, $aQueryData, $AcceptEncoding, $Header_Expect) Then ExitLoop $sDueToTimeout = " due to timeout" ; tho, if there is no DiscernData(), it could just be skipped Until $extTCPRecv Or $bReceived = "" ; but since this is an example, it shows that there was a connection ( good for debugging ) If $bReceived = "" Then $sDueToTimeout = " ( no data )" $hTimerReqRcvd = Round(TimerDiff($hTimerReqRcvd), 2) $hTimerResponse = TimerInit() $buffer = BinaryToString($buffer) If $errTCPRecv Then TCPCloseSocket($iSocket) ; Close the socket. $iSocket = -1 If $tcp_aForm[3] Then GUICtrlSetData($tcp_aForm[4], @CRLF & @TAB & "# " & $iTestSocketCount & " @error,@extended = " & $errTCPRecv & "," & $extTCPRecv & @CRLF & @CRLF & GUICtrlRead($tcp_aForm[4])) ElseIf $buffer = "" And $tcp_aForm[6] = 1 Then TCPCloseSocket($iSocket) ; Close the socket. $iSocket = -1 Else $sTime = @HOUR & ":" & @MIN & ":" & @SEC & "." & @MSEC If $Header_Expect = 100 Then HttpSender($iSocket, $AcceptEncoding, "", "text/html", "100 Continue") If $tcp_aForm[3] Then GUICtrlSetData($tcp_aForm[4], "=== start of # " & $iTestSocketCount & "(TBC) ===>" & $buffer & "<=== end of # " & $iTestSocketCount & _ "(TBC) ===" & @CRLF & @TAB & "# " & $iTestSocketCount & " loaded at " & $sTime & $sTimer & $sDueToTimeout & @CRLF & @CRLF & GUICtrlRead($tcp_aForm[4])) Sleep(200) ; give it some time... try more if needed for this hack. $hTimerReqRcvd = TimerInit() ContinueLoop ; ..skip the TCPCloseSocket() this once. ; https://httpstatusdogs.com/100-continue ; https://evertpot.com/http/100-continue/ ; tested with: ; >curl -v -i -H "Expect: 100-continue" -H "Content-Type: application/json" -d "{\"Firstname\":\"Mickey\",\"Lastname\":\"Mouse\"}" http://127.0.0.1:80/< ; >curl -v -i -H "Expect: 100-continue" -H "Content-Type: text/plain" -d "firstname=Mickey&lastname=Mouse" http://127.0.0.1:80/< ElseIf $method = "GET" And $urlReq = "/" & $tcp_Home Then ; show the "index.html" HttpSender($iSocket, $AcceptEncoding, f_IndexHtml($myHRseparator, $sTime, $i_jquery_latest_min_js)) ; ... you'll have to read a lot to get why =( ElseIf $method = "GET" And $urlReq = "/favicon.ico" Then ; send the favicon.ico file HttpSender($iSocket, $AcceptEncoding, $bMyFaviconFile, "application/octet-stream") ElseIf $method = "GET" And $urlReq = "/jquery-latest.min.js" Then ; send the favicon.ico file HttpSender($iSocket, $AcceptEncoding, $s_jquery_latest_min_js, "application/octet-stream") ; this is just for this example of PUT JSON ElseIf $method = "PUT" And StringInStr($ContentType, "application/json") And StringInStr($Referer, "/" & $tcp_Home) Then $ContentBody = StringReplace($ContentBody, '"Firstname"', '"From":"AutoIt v. ' & @AutoItVersion & '","Firstname"') ; ..changed something above, just for fun ;) TCPSend($iSocket, "HTTP/1.1 201 Created" & @CRLF & _ ; ..could have used HttpSender(), but is all the same. This is a learning script :) "Content-Length: " & StringLen($ContentBody) & @CRLF & _ "Content-Type: " & $ContentType & @CRLF & @CRLF & _ $ContentBody) ; meh, just returning someting to parse. You may need '{"status":"OK"}' or what not ; ; but in this example, it expects this data, else you may see in the browser's ConsoleLog() an error. Else ; below is sending this, as is pertinent to this "index.html" and of no concecuence overall BUT should be otherwise properly handled. TCPSend($iSocket, "HTTP/1.0 200 OK" & @CRLF & _ "Content-Type: text/html" & @CRLF & @CRLF & _ "<!DOCTYPE html><html><body bgcolor=""#CCCCCC""><script> function goBack() { window.history.back(); } </script>" & _ "<button onclick=""goBack()""> The browser is waiting for a response, so, here is a button to go back to the prior page </button><br><br>" & _ "( Loaded at " & $sTime & " )</body></html>") EndIf $sTimer = " - Socket: " & $iSocket & " - Received in " & $hTimerReqRcvd & " ms. - Responded in " & Round(TimerDiff($hTimerResponse), 2) & " ms. " $iCountTryCloseSocket = 0 Do If $iCountTryCloseSocket Then Sleep(10) $iCountTryCloseSocket += 1 If $iCountTryCloseSocket > 5 Then ExitLoop Until TCPCloseSocket($iSocket) $iSocket = -1 $Header_Expect = 0 ; ..this here is just in case, the 100-continue timed out. If Not ($method = "GET" And $urlReq = "/favicon.ico" And $tcp_aForm[8] = 1) Then ; skip showing the favicon.ico request If $tcp_aForm[3] Then GUICtrlSetData($tcp_aForm[4], "=== start of # " & $iTestSocketCount & " ===>" & $buffer & "<=== end of # " & $iTestSocketCount & _ " ===" & @CRLF & @TAB & "# " & $iTestSocketCount & " loaded at " & $sTime & $sTimer & $sDueToTimeout & @CRLF & @CRLF & GUICtrlRead($tcp_aForm[4])) EndIf ;~ If $aQueryData[0][0] Then _DebugArrayDisplay($aQueryData, $method) ; ..if you want to see the array ( but this will block the script ) If $aQueryData[0][0] Then If $tcp_aForm[3] Then GUICtrlSetData($tcp_aForm[4], Display2DResult($method, $aQueryData, $sNiceLineTop, $sNiceLineBottom) & GUICtrlRead($tcp_aForm[4])) EndIf Dim $aQueryData[1][5] = [[0]] ; lets reset the query array, etc., $method = "" ; as we don't want to have the data lingering. $urlReq = "" $ContentLength = 0 $ContentBody = "" $ContentType = "" $Referer = "" $AcceptEncoding = "" $Header_Expect = "" EndIf EndIf If TimerDiff($hTimerResponse) < 500 Then ContinueLoop ; as there may be "100 pending connexions", this would make it more responsive, in theory. If $tcp_aForm[3] Then Switch GUIGetMsg() ; ..I should have code it OnEvent :( Case $GUI_EVENT_CLOSE GUIDelete() ExitLoop Case $tcp_aForm[9] f_LoadTheGuiSite() GUICtrlSetState($tcp_aForm[4], $GUI_FOCUS) Case $tcp_aForm[10] GUICtrlSetData($tcp_aForm[4], "") GUICtrlSetState($tcp_aForm[4], $GUI_FOCUS) Case $tcp_aForm[5] $tcp_aForm[6] = GUICtrlRead($tcp_aForm[5]) GUICtrlSetState($tcp_aForm[4], $GUI_FOCUS) Case $tcp_aForm[7] $tcp_aForm[8] = GUICtrlRead($tcp_aForm[7]) GUICtrlSetState($tcp_aForm[4], $GUI_FOCUS) Case $tcp_aForm[12] If GUICtrlRead($tcp_aForm[12]) = 1 Then WinSetOnTop($tcp_aForm[3], "", 1) Else WinSetOnTop($tcp_aForm[3], "", 0) EndIf EndSwitch EndIf WEnd EndFunc ;==>mainloop Func Display2DResult(ByRef $method, ByRef $aQueryData, ByRef $sNiceLineTop, ByRef $sNiceLineBottom) Local $sTop = $method & " query2array: " $sTop &= StringTrimLeft($sNiceLineTop, StringLen($sTop)) Return @CRLF & $sTop & @CRLF & _SQLite_Display2DResult($aQueryData, 0, True) & $sNiceLineBottom & @CRLF EndFunc ;==>Display2DResult Func f_LoadTheGuiSite() ;~ ShellExecute("http://127.0.0.1:" & $tcp_Port & "/" & $tcp_Home) ;~ Run(@ComSpec & " /c start chrome " & _ ; to use user's everything ;~ "--app=""data:text/html,<html><body><script>window.resizeTo(900,600);" & _ ;~ "window.moveTo(" & (@DesktopWidth / 2) - 450 & "," & (@DesktopHeight / 2 ) - 300 & ");" & _ ;~ "window.location='http://127.0.0.1:" & $tcp_Port & "/" & $tcp_Home & "';</script></body></html>""") Run(@ComSpec & " /c start chrome " & _ ; to not mix this with user's everything else ' --user-data-dir="' & @ScriptDir & '\UserDataForMyScript"' & _ ; "https://portableapps.com/apps/internet/google_chrome_portable" can be used too ' --window-size=900,400' & _ ' --window-position=' & (@DesktopWidth / 2) - 450 & ',' & (@DesktopHeight / 2) - 200 & _ ' --app="http://127.0.0.1:' & $tcp_Port & "/" & $tcp_Home & '"') EndFunc ;==>f_LoadTheGuiSite Func f_IndexHtml($myHRseparator, $sTime, $i_jquery_latest_min_js) Local Static $sIndexHtml = "" If $sIndexHtml = "" Then $sIndexHtml &= '<!DOCTYPE html><html><head><Title>AutoIt driven GUI of sorts</Title>' & @CRLF If Not $i_jquery_latest_min_js Then $sIndexHtml &= '<script src="http://code.jquery.com/jquery-latest.min.js"></script>' & @CRLF Else $sIndexHtml &= '<script src="http://127.0.0.1:' & $tcp_Port & '/jquery-latest.min.js"></script>' & @CRLF EndIf $sIndexHtml &= '</head>' & @CRLF & '<body bgcolor="#CCCCCC">' & @CRLF $sIndexHtml &= forumLink() & $myHRseparator $sIndexHtml &= '<a name="t1"></a>' & formPut() & $myHRseparator ;~ $sIndexHtml &= '<a name="t2"></a>' & formSample('POST') & $myHRseparator ; is better removed for this example, as the idea is ;~ $sIndexHtml &= '<a name="t3"></a>' & formSample('GET') & $myHRseparator ; to have an IPC of sorts with the JSON/AJAX thing. ;~ $sIndexHtml &= '<a name="t4"></a>' & formSample('PUT', 'enctype="application/json"') & $myHRseparator ; https://darobin.github.io/formic/specs/json/ but the browser does not do as expected by the page creator $sIndexHtml &= '<div align="right">( Loaded at ' & $sTime & ' )</div></body>' & @CRLF & '</html>' & @CRLF EndIf Return $sIndexHtml EndFunc ;==>f_IndexHtml ; example of a "more proper" way to send back a response Func HttpSender(ByRef $iSocket, ByRef $AcceptEncoding, $sHtmlText, $ContentType = "text/html", $ResponseStatusCode = "200 OK") #forceref $AcceptEncoding Local $bHtmlText = Binary($sHtmlText) Local $_Head = "HTTP/1.1 " & $ResponseStatusCode & @CRLF ; https://en.wikipedia.org/wiki/List_of_HTTP_status_codes $_Head &= "Content-Type: " & $ContentType & @CRLF ; ..so the client knows what is getting. $_Head &= "Connection: close" & @CRLF ; SideNote: ..an interaction takes 10 ms., is there a need for "muti-concurrent" code ? ;) ;~ If StringInStr($AcceptEncoding, "gzip") Then ; If you "#include <ZLIB.au3>" then you can compress the data. ;~ $bHtmlText = _ZLIB_GZCompress($bHtmlText, 5) ; It takes longer ( say 5 ms. ) to compress but on a slow connection, delivery is faster. ;~ $_Head &= "Content-Encoding: gzip" & @CRLF ; ..tho, if sending a compressed file, say a ZIP file, this is not to be used. ;~ EndIf $_Head &= "Content-Lenght: " & BinaryLen($bHtmlText) & @CRLF ; this is a must for binary file send. Might as well use it for everything. ;~ $_Head &= "Content-MD5: " & _Base64Encode(_Crypt_HashData($bHtmlText, $CALG_MD5)) & @CRLF ; https://tools.ietf.org/html/rfc1864 ; obsolete, https://stackoverflow.com/questions/8300471/is-content-md5-field-in-the-http-response-universal $_Head &= @CRLF ; end of header marker $_Head = Binary($_Head) TCPSendBinary($iSocket, $_Head) ; Send the head TCPSendBinary($iSocket, $bHtmlText) ; Send the body ( html or file, as delimited by the header ) EndFunc ;==>HttpSender Func TCPSendBinary(ByRef $hSocket, ByRef $bData) Local $iBytesSent, $iBytesTotalSent = 0, $iBytesTotal = BinaryLen($bData) Do $iBytesSent = TCPSend($hSocket, $bData) If @error Then ExitLoop $iBytesTotalSent += $iBytesSent $bData = BinaryMid($bData, $iBytesSent + 1, BinaryLen($bData) - $iBytesSent) Until 0 = BinaryLen($bData) Return SetError(0, Int($iBytesTotalSent <> $iBytesTotal), $iBytesTotalSent) EndFunc ;==>TCPSendBinary Func DiscernData($buffer, ByRef $urlReq, ByRef $method, ByRef $ContentLength, ByRef $ContentBody, ByRef $ContentType, ByRef $Referer, ByRef $aQueryData, ByRef $AcceptEncoding, ByRef $Header_Expect) If $Header_Expect = 100 Then ; we were waiting for the body ( $ContentLength ) $Header_Expect = 0 ; as we are not waiting anymore. $aQueryData = DiscernQuery2array($urlReq, $buffer, $ContentType) ; data is the $buffer. $urlReq and $ContentType should be the same as it hasn't changed. Return $ContentLength = StringLen($buffer) ; ..to flag that is all good. EndIf $urlReq = "" ; $aQueryData holds the query as an array but a JSON string will need extra coding. $method = "" ; If the $aQueryData[1][1] = "" then is likely a JSON string $Header_Expect = 0 $ContentLength = 0 ; In this example, at first, all I wanted, is to know that the data sent is full $ContentBody = "" ; and complete, to speed up the loop ( and save about 100 ms. of timeout ) Local $_Head = StringLeft($buffer, StringInStr($buffer, @CRLF & @CRLF) - 1) $ContentBody = StringTrimLeft($buffer, StringLen($_Head) + 4) Local $_BodyLen = StringLen($ContentBody) Local $aCRLF = StringSplit($_Head, @CRLF, 1) If UBound($aCRLF) < 2 Then Return Local $aSpaceSplit = StringSplit($aCRLF[1], " ") If UBound($aSpaceSplit) < 3 Then Return $method = $aSpaceSplit[1] $urlReq = $aSpaceSplit[2] For $n = 2 To $aCRLF[0] $aSpaceSplit = StringSplitHeader($aCRLF[$n]) If UBound($aSpaceSplit) < 3 Then ContinueLoop If $aSpaceSplit[1] = "Content-Length" Then $ContentLength = Int($aSpaceSplit[2]) ; tis should be equal to StringLen($ContentBody) If $aSpaceSplit[1] = "Content-Type" Then $ContentType = $aSpaceSplit[2] ; Discern if is JSON, when needed If $aSpaceSplit[1] = "Referer" Then $Referer = $aSpaceSplit[2] ; Discern if is from "/home/" If $aSpaceSplit[1] = "Accept-Encoding" Then $AcceptEncoding = $aSpaceSplit[2] ; Discern if to use GZIP If $aSpaceSplit[1] = "Expect" Then $Header_Expect = Int($aSpaceSplit[2]) ; Discern if Expect: 100-continue ;~ ; https://www.ietf.org/rfc/rfc1864.txt ; https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html ;~ If $aSpaceSplit[1] = "Content-MD5" Then $Header_Content_MD5 = _Base64Decode($aSpaceSplit[2]) ; Content-MD5: Q2hlY2sgSW50ZWdyaXR5IQ== Next If $Header_Expect = 100 Then Return 1 ; ..there is no data at this point, just header. Switch $method Case "GET" $aQueryData = DiscernQuery2array($urlReq, Default, $ContentType) ; data is part of the URL Case Else $aQueryData = DiscernQuery2array($urlReq, $ContentBody, $ContentType) ; data is part of the body EndSwitch Return $ContentLength = $_BodyLen And StringLen($method) EndFunc ;==>DiscernData Func StringSplitHeader($sStr) Local $i = StringInStr($sStr, ":") If Not $i Then Return SetError(0, 2, "") ; the https://tools.ietf.org/html/rfc2616 talks about the ":" Local $a[3] = [2, "", ""] ; but not the space next to it as a delimiter of the field. $a[1] = StringLeft($sStr, $i - 1) ; To avoid mishaps, this function takes care of it. $a[2] = StringStripWS(StringTrimLeft($sStr, $i), 3) Return SetError(0, ($a[2] = "" ? 1 : 0), $a) EndFunc ;==>StringSplitHeader Func DiscernGetFragment($urlReq) Local $a = StringSplit($urlReq, "#") If UBound($a) < 3 Then Return "" Return $a[$a[0]] EndFunc ;==>DiscernGetFragment Func DiscernQuery2array(ByRef $urlReq, $ContentBody = Default, $ContentType = Default) Local $sContentPath, $sContentQuery Local $sFragment = DiscernGetFragment($urlReq) If $ContentBody = Default Then Local $aQueryData[1][5] = [[0, "", $sFragment, $ContentType, ""]] Local $i = StringInStr($urlReq, "?") If Not $i Then Return $aQueryData $sContentPath = StringLeft($urlReq, $i - 1) $sContentQuery = StringTrimLeft($urlReq, $i) ElseIf StringInStr($ContentType, "application/json") Then Local $aQuery[2][5] = [[1, $urlReq, $sFragment, $ContentType, ""], [$ContentBody, "", "", "", ""]] Return $aQuery ; is a json string, so better not StringSplit() it. Else $sContentPath = $urlReq $sContentQuery = $ContentBody EndIf Local $b, $n, $a = StringSplit($sContentQuery, "&") $i = 0 Local $aQuery[UBound($a) + 1][5] $aQuery[0][3] = $ContentType ; for debug For $n = 1 To UBound($a) - 1 $b = StringSplit($a[$n], "=") $i += 1 If $b[0] > 0 Then $aQuery[$i][0] = $b[1] ; name If $b[0] > 1 Then $aQuery[$i][1] = $b[2] ; value Next $aQuery[0][0] = $i ; this holds the name=value count $aQuery[0][1] = $sContentPath ; this holds the path ( minus the query if is a GET mathod ) $aQuery[0][2] = $sFragment ; this would hold the fragment ( https://en.wikipedia.org/wiki/Fragment_identifier ) ReDim $aQuery[$i + 1][5] Return $aQuery EndFunc ;==>DiscernQuery2array Func formSample($method = 'POST', $enctype = "") ; method an be GET or POST ; example from https://www.w3schools.com/html/html_forms.asp Local $sForm = '<h2>HTML Form ' & $method & '</h2>' & @CRLF $sForm &= '<p>This form will be submitted using the ' & $method & ' method:</p>' & @CRLF $sForm &= '<form ' & $enctype & ' action="/action_page_' & $method & '/" method="' & $method & '">' & @CRLF $sForm &= ' First name:<br>' & @CRLF $sForm &= ' <input type="text" name="firstname" value="Mickey">' & @CRLF $sForm &= ' <br>' & @CRLF $sForm &= ' Last name:<br>' & @CRLF $sForm &= ' <input type="text" name="lastname" value="Mouse">' & @CRLF $sForm &= ' <br><br>' & @CRLF $sForm &= ' <input type="submit" value="Submit">' & @CRLF $sForm &= '</form> ' & @CRLF $sForm &= '<p>If you click the "Submit" button, the form-data will be sent to a page called "/action_page_' & $method & '/".</p>' & @CRLF Return $sForm EndFunc ;==>formSample Func formPut() Local $sForm = '<!-- excerpt from http://exceptionallyexceptionalexceptions.blogspot.com/2011/12/convert-html-form-to-json.html -->' & @CRLF $sForm &= ' <h2>Create a JSON object that is nested/structured from a form and PUT via AJAX</h2>' & @CRLF $sForm &= '' & @CRLF $sForm &= ' <form id="form">' & @CRLF $sForm &= ' First name:<br>' & @CRLF $sForm &= ' <input id="meh.Firstname" type="text" name="meh.Firstname" placeholder="meh Mickey..." value="Mickey"><br>' & @CRLF $sForm &= ' Last name:<br>' & @CRLF $sForm &= ' <input id="meh.Lastname" type="text" name="meh.Lastname" placeholder="meh Mouse..." value="Mouse"><br><br>' & @CRLF $sForm &= ' <input id="input" type="submit" name="submit" value="Submit">' & @CRLF $sForm &= ' </form>' & @CRLF $sForm &= '<p>If you click the "Submit" button, the form-data will be sent in the background to a page called "/action_page_PUTviaAJAX/".</p>' & @CRLF $sForm &= '' & @CRLF $sForm &= ' <script>' & @CRLF $sForm &= ' $.fn.formToJSON = function() {' & @CRLF $sForm &= ' var objectGraph = {};' & @CRLF $sForm &= '' & @CRLF $sForm &= ' function add(objectGraph, name, value) {' & @CRLF $sForm &= ' if(name.length == 1) {' & @CRLF $sForm &= ' //if the array is now one element long, we''re done' & @CRLF $sForm &= ' objectGraph[name[0]] = value;' & @CRLF $sForm &= ' }' & @CRLF $sForm &= ' else {' & @CRLF $sForm &= ' //else we''ve still got more than a single element of depth' & @CRLF $sForm &= ' if(objectGraph[name[0]] == null) {' & @CRLF $sForm &= ' //create the node if it doesn''t yet exist' & @CRLF $sForm &= ' objectGraph[name[0]] = {};' & @CRLF $sForm &= ' }' & @CRLF $sForm &= ' //recurse, chopping off the first array element' & @CRLF $sForm &= ' add(objectGraph[name[0]], name.slice(1), value);' & @CRLF $sForm &= ' }' & @CRLF $sForm &= ' };' & @CRLF $sForm &= ' //loop through all of the input/textarea elements of the form' & @CRLF $sForm &= ' //this.find(''input, textarea'').each(function() {' & @CRLF $sForm &= ' $(this).children(''input, textarea'').each(function() {' & @CRLF $sForm &= ' //ignore the submit button' & @CRLF $sForm &= ' if($(this).attr(''name'') != ''submit'') {' & @CRLF $sForm &= ' //split the dot notated names into arrays and pass along with the value' & @CRLF $sForm &= ' add(objectGraph, $(this).attr(''name'').split(''.''), $(this).val());' & @CRLF $sForm &= ' }' & @CRLF $sForm &= ' });' & @CRLF $sForm &= ' return JSON.stringify(objectGraph);' & @CRLF $sForm &= ' };' & @CRLF $sForm &= '' & @CRLF $sForm &= ' $.ajaxSetup({' & @CRLF $sForm &= ' contentType: "application/json; charset=utf-8",' & @CRLF $sForm &= ' dataType: "json"' & @CRLF $sForm &= ' });' & @CRLF $sForm &= '' & @CRLF $sForm &= ' $(document).ready(function(){' & @CRLF $sForm &= ' $(''#input'').click(function() {' & @CRLF $sForm &= ' var send = $("#form").formToJSON();' & @CRLF $sForm &= ' $.ajax({' & @CRLF $sForm &= ' url: "/action_page_PUTviaAJAX/",' & @CRLF $sForm &= ' type: "PUT",' & @CRLF $sForm &= ' data: send,' & @CRLF $sForm &= ' error: function(xhr, error) {' & @CRLF $sForm &= ' alert(''Error!\n Status = '' + xhr.status + ''\n Message = '' + error);' & @CRLF $sForm &= ' },' & @CRLF $sForm &= ' success: function(data) {' & @CRLF ; if the msgBox in the browser bugs you, you can remove these lines $sForm &= ' alert(''Firstname = '' + data.meh.Firstname + ''\nLastname = '' + data.meh.Lastname + ''\nFrom = '' + data.meh.From );' & @CRLF $sForm &= ' }' & @CRLF $sForm &= ' });' & @CRLF $sForm &= ' return false;' & @CRLF $sForm &= ' });' & @CRLF $sForm &= ' });' & @CRLF $sForm &= ' </script>' & @CRLF Return $sForm EndFunc ;==>formPut Func forumLink() Local Static $sHtmlText = "" If $sHtmlText = "" Then $sHtmlText &= @CRLF & @CRLF & '..this is from the <a href="https://www.autoitscript.com/forum/topic/' $sHtmlText &= '210547-knowledge-of-c-language-is-necessary/?do=findComment&comment=1521177" target="_blank">AutoIt forum</a> ( Test: ' $sHtmlText &= ' <a href="#t1">JSON</a>' ;~ $sHtmlText &= ' <a href="#t2">POST</a>,' ; is better removed for this example, as the idea is ;~ $sHtmlText &= ' <a href="#t3">GET</a>,' ; to have an IPC of sorts with the JSON/AJAX thing. ;~ $sHtmlText &= ' <a href="#t4">PUT</a>' $sHtmlText &= ' )' $sHtmlText &= @CRLF EndIf Return $sHtmlText EndFunc ;==>forumLink Func MyFaviconFile() ; "https://stackoverflow.com/questions/2268204/favicon-dimensions/48646940" for more info. Return BinaryToString("0x00000100010010101000010004002801000016000000280000001000000020000000010004000000000080000000000000000000000010000000000000000000000000F4FF0000D6E0000000000000" & _ "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111111111000110020020020110010200200200201001002002002002100120" & _ "0200200200100102002002002010010020020020021001200200200200100102002002002010010020020020021001200200200200100102002002002010011020020020011000111111111111000000000000000000C00300" & _ "008001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080010000C0030000") EndFunc ;==>MyFaviconFile Func OnAutoItExit() ; Close the Listening socket to allow afterward binds. If $tcp_ListenSocket > 0 Then TCPCloseSocket($tcp_ListenSocket) TCPShutdown() ; Close the TCP service. EndFunc ;==>OnAutoItExit Func mainGui() #Region ### START Koda GUI section ### Form= $tcp_aForm[11] = Chr(160) & 'Example of a simple http deamon on "0.0.0.0" port ' & $tcp_Port $tcp_aForm[3] = GUICreate($tcp_aForm[11], $tcp_aForm[0], $tcp_aForm[1], @DesktopWidth - $tcp_aForm[0] - 20, @DesktopHeight - $tcp_aForm[1] - 80, BitOR($GUI_SS_DEFAULT_GUI, $WS_MAXIMIZEBOX, $WS_SIZEBOX, $WS_THICKFRAME, $WS_TABSTOP), BitOR($WS_EX_TOPMOST, $WS_EX_WINDOWEDGE)) GUISetFont(10, 400, 0, "Courier New") If Not @Compiled Then SetExplicitAppUserModelID() $tcp_aForm[4] = GUICtrlCreateEdit("", 0, 35, $tcp_aForm[0], $tcp_aForm[1] - 35) GUICtrlSetLimit(-1, 0, 0) GUICtrlSetResizing(-1, $GUI_DOCKLEFT + $GUI_DOCKRIGHT + $GUI_DOCKTOP + $GUI_DOCKBOTTOM) $tcp_aForm[12] = GUICtrlCreateCheckbox("set TOPMOST", $tcp_aForm[0] - 750, 6, 145, 23, -1, $WS_EX_CLIENTEDGE) GUICtrlSetResizing(-1, $GUI_DOCKRIGHT + $GUI_DOCKTOP + $GUI_DOCKWIDTH + $GUI_DOCKHEIGHT) GUICtrlSetState(-1, $GUI_CHECKED) $tcp_aForm[5] = GUICtrlCreateCheckbox("Skip timeout", $tcp_aForm[0] - 600, 6, 145, 23, -1, $WS_EX_CLIENTEDGE) GUICtrlSetResizing(-1, $GUI_DOCKRIGHT + $GUI_DOCKTOP + $GUI_DOCKWIDTH + $GUI_DOCKHEIGHT) GUICtrlSetTip(-1, "skip showing TCPRecv()" & @CR & " timeout waiting for data.") $tcp_aForm[7] = GUICtrlCreateCheckbox("Skip /favicon", $tcp_aForm[0] - 450, 6, 145, 23, -1, $WS_EX_CLIENTEDGE) GUICtrlSetResizing(-1, $GUI_DOCKRIGHT + $GUI_DOCKTOP + $GUI_DOCKWIDTH + $GUI_DOCKHEIGHT) GUICtrlSetTip(-1, "skip showing /favicon.ico" & @CR & " GET requests.") $tcp_aForm[9] = GUICtrlCreateButton("go to GUI site", $tcp_aForm[0] - 300, 5, 145, 25) GUICtrlSetResizing(-1, $GUI_DOCKRIGHT + $GUI_DOCKTOP + $GUI_DOCKWIDTH + $GUI_DOCKHEIGHT) $tcp_aForm[10] = GUICtrlCreateButton("clear data", $tcp_aForm[0] - 150, 5, 145, 25) GUICtrlSetResizing(-1, $GUI_DOCKRIGHT + $GUI_DOCKTOP + $GUI_DOCKWIDTH + $GUI_DOCKHEIGHT) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### EndFunc ;==>mainGui Func SetExplicitAppUserModelID($sIconFilename = Default) DllCall('shell32.dll', 'long', 'SetCurrentProcessExplicitAppUserModelID', 'wstr', 'AutoIt3.' & @ScriptName) If $sIconFilename = Default Or $sIconFilename = "" Then $sIconFilename = StringLeft(@AutoItExe, StringInStr(@AutoItExe, "\", 0, -1)) & "Icons\MyAutoIt3_Red.ico" EndIf If Not FileGetSize($sIconFilename) Then Return GUISetIcon($sIconFilename) TraySetIcon($sIconFilename) EndFunc ;==>SetExplicitAppUserModelID Func _Base64Encode($input) ; https://www.autoitscript.com/forum/topic/81332-_base64encode-_base64decode/ $input = Binary($input) Local $struct = DllStructCreate("byte[" & BinaryLen($input) & "]") DllStructSetData($struct, 1, $input) Local $strc = DllStructCreate("int") Local $a_Call = DllCall("Crypt32.dll", "int", "CryptBinaryToString", _ "ptr", DllStructGetPtr($struct), _ "int", DllStructGetSize($struct), _ "int", 1, _ "ptr", 0, _ "ptr", DllStructGetPtr($strc)) If @error Or Not $a_Call[0] Then Return SetError(1, 0, "") ; error calculating the length of the buffer needed EndIf Local $a = DllStructCreate("char[" & DllStructGetData($strc, 1) & "]") $a_Call = DllCall("Crypt32.dll", "int", "CryptBinaryToString", _ "ptr", DllStructGetPtr($struct), _ "int", DllStructGetSize($struct), _ "int", 1, _ "ptr", DllStructGetPtr($a), _ "ptr", DllStructGetPtr($strc)) If @error Or Not $a_Call[0] Then Return SetError(2, 0, "") ; error encoding EndIf Return DllStructGetData($a, 1) EndFunc ;==>_Base64Encode Func _Base64Decode($input_string) Local $struct = DllStructCreate("int") Local $a_Call = DllCall("Crypt32.dll", "int", "CryptStringToBinary", _ "str", $input_string, _ "int", 0, _ "int", 1, _ "ptr", 0, _ "ptr", DllStructGetPtr($struct, 1), _ "ptr", 0, _ "ptr", 0) If @error Or Not $a_Call[0] Then Return SetError(1, 0, "") ; error calculating the length of the buffer needed EndIf Local $a = DllStructCreate("byte[" & DllStructGetData($struct, 1) & "]") $a_Call = DllCall("Crypt32.dll", "int", "CryptStringToBinary", _ "str", $input_string, _ "int", 0, _ "int", 1, _ "ptr", DllStructGetPtr($a), _ "ptr", DllStructGetPtr($struct, 1), _ "ptr", 0, _ "ptr", 0) If @error Or Not $a_Call[0] Then Return SetError(2, 0, "") ; error decoding EndIf Return DllStructGetData($a, 1) EndFunc ;==>_Base64Decode that other than the window itself, everything inside is HTML/CSS as a GUI, and IPC via JSON/AJAX to AutoIt. And yes, those default UDFs are DLL driven, ... WinAPI, ..but the regular AutoIt user need not know C++, just be ...creative ? ( my 2 cents, please don't hate me ) PS: I used jeasyui in PHP before but might as well serve the data from the above code. Edited July 17, 2023 by argumentum better code Gianni 1 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
TheSaint Posted July 17, 2023 Share Posted July 17, 2023 7 hours ago, Gianni said: otherwise you will be forced to preclude those possibilities. Unless someone else has done it already. I'm also not saying that C/C++ is not of benefit to an AutoIt coder, of course it can be. It just isn't mandatory unless something you are doing with AutoIt requires it and no-one has provided a solution for you in the examples or UDFs, such that you need to come up with one yourself. I have never had to do such myself, though I have on the rare occasion looked at VB for a solution, where I then had to translate it for AutoIt. That happened when I was whipping up something to read/play CDs. I have also had to dabble with issues in the odd UDF, but never gone directly to C/C++ for a solution. That said, while I consider myself pretty good at getting the best out of AutoIt for my needs and wants, I would in no way consider myself a master programmer ... just too much I don't really know or understand. The closest I have gotten to wanting to know more than AutoIt, was a brief period where I felt like developing something for my phone, but after looking into it I gave up on the idea and decided I could live without the torture to my brain. Gianni and TheDcoder 1 1 Make sure brain is in gear before opening mouth! Remember, what is not said, can be just as important as what is said. Spoiler What is the Secret Key? Life is like a Donut If I put effort into communication, I expect you to read properly & fully, or just not comment. Ignoring those who try to divert conversation with irrelevancies. If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it. I'm only big and bad, to those who have an over-active imagination. I may have the Artistic Liesense to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage) Link to comment Share on other sites More sharing options...
Gianni Posted July 17, 2023 Share Posted July 17, 2023 I think we all agree, even OP, that the more knowledge one has, the better. While it's not mandatory, the more knowledge you have, the more interesting things you can do and create on your own. Sure if someone else does it for you then it's easier, but it's not the same thing... "Knowledge makes you free" (Socrates) Xandy, TheSaint, Andreik and 1 other 4 Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... Link to comment Share on other sites More sharing options...
TheSaint Posted July 18, 2023 Share Posted July 18, 2023 (edited) 19 hours ago, Gianni said: "Knowledge makes you free" (Socrates) While I mostly agree, it can also make you dangerous ... especially if you don't have enough. It can also make you more acutely aware of your situation ... which might not make you happy, if you feel trapped in it etc. The moral of all that, is to not feel trapped using just AutoIt ... if indeed it could feel that way to you. Follow you heart, so they say .... perhaps your mind too. Edited July 18, 2023 by TheSaint TheDcoder 1 Make sure brain is in gear before opening mouth! Remember, what is not said, can be just as important as what is said. Spoiler What is the Secret Key? Life is like a Donut If I put effort into communication, I expect you to read properly & fully, or just not comment. Ignoring those who try to divert conversation with irrelevancies. If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it. I'm only big and bad, to those who have an over-active imagination. I may have the Artistic Liesense to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage) Link to comment Share on other sites More sharing options...
UEZ Posted August 10, 2023 Share Posted August 10, 2023 I agree with @wolf9228. In the meantime, I've been able to acquire a little C/C++ knowledge that now makes reading source code on MSDN sites and the like a little easier. It's not essential for Autoit, but it's helpful when browsing pages where the source code is written in C/C++. For beginners Autoit is extremely suitable, since one hardly needs WinAPI knowledge and programming with the WinAPI simplifies very much. If you want to look under the hood, then you must inevitably deal with the WinAPI and there is no way around MSDN... argumentum 1 Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
Andreik Posted August 10, 2023 Share Posted August 10, 2023 You can look even more under the hood and learn assembly, but wait you can look even more under the hood and write binary code. So the conclusion might be that everything it's a must know. It's definitely good to know as much as you can but what you really need depends very much of what do you try to achieve. Most people will be perfectly happy with what native AutoIt provides. argumentum and TheDcoder 1 1 When the words fail... music speaks. Link to comment Share on other sites More sharing options...
UEZ Posted August 10, 2023 Share Posted August 10, 2023 4 minutes ago, Andreik said: You can look even more under the hood and learn assembly, but wait you can look even more under the hood and write binary code. So the conclusion might be that everything it's a must know. It's definitely good to know as much as you can but what you really need depends very much of what do you try to achieve. Most people will be perfectly happy with what native AutoIt provides. Keep it real. Most compilers are so good that you only need assembler in special situations and C/C++ is not everything. 😉 Agreed, those who do not want to expand their horizons will be fine with the Autoit functions. Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
argumentum Posted August 10, 2023 Share Posted August 10, 2023 ...do I have to moderate ?, no ?, ok, I will, but I rather not. In any case..., all of you are right in your statements. The title say "Knowledge of C++ language is necessary" and the answer is no. Is it beneficial ?, yes. Is it needed ?, no. Should you learn it, yes. Must you ?, no. Good chat, carry on. PS: if anyone can show me links to how to have GUIs as easy as with AutoIt ( with "add your own code if you feel like to" and not be locked in a "drag and drop builder" only mode ), I'll try that language. Thanks TheDcoder, UEZ and Andreik 3 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
Andreik Posted August 11, 2023 Share Posted August 11, 2023 5 hours ago, UEZ said: Keep it real. Most compilers are so good that you only need assembler in special situations and C/C++ is not everything. 😉 Agreed, those who do not want to expand their horizons will be fine with the Autoit functions. I can agree on the part that most compilers are very nice optimized and with intrinsics you can even have access to instructions without writing assembly code but you can't really say that assembly it's useful in few special situations because we have such good compilers. I'm not saying that it's better because it depends on what are you working but it's way more useful than in special situations. When the words fail... music speaks. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now