Leaderboard
Popular Content
Showing content with the highest reputation on 02/28/2022 in all areas
-
If this version is stable then I'd be looking to release it this week. Just want to get something out there as there are loadsa fixes in it. Can worry about "improvements" at another time.5 points
-
AutoIt v3.3.15.5 Beta View File 3.3.15.5 (27th February, 2022) (Beta) AutoIt: - Added #3826: GUI "On event" While loop precision. - Added: Doc Symbolic constants for MouseGetCursor(), GUISetCursor() $MCID_*. - Added #3849: @OSVersion for Windows 11 and Server 2022. - Fixed #3836: FileExits trailing quotation mark. - Fixed #3844: Right bracket does not register as a hotkey. - Fixed #3830: GUICtrlSetResizing $GUI_DOCKBOTTOM fullscreen. - Fixed #3831: GUICtrlSetPos $GUI_DOCKHCENTER. - Fixed #2696: StringRegExp non-participating groups. - Fixed #2866: Regread x64 remote from x86. - Fixed #3667: empty continuation line. - Fixed #3760: oversized Number conversion. - Fixed #3215: GUICtrlCreateUpdown Show-Hide. UDFs: - Added: $ARRAYDISPLAY_NUMERICSORT for selected column for _ArrayDisplay() and _DebugArrayDisplay(). - Added: _GUICtrlEdit_SetPadding(). - Added: _WinAPI_ShellExecuteEx() Doc example. - Fixed #3828: SetError(), SetExtended() broken doc links. - Fixed #3827: _GUICtrlListView_ClickItem() outside listview area. - Fixed #3835: Magic numbers in GDIPlus doc. - Fixed #3833: _WinAPI_RegisterRawInputDevices() $iCount. - Fixed #3842: -StringToArray() default parameter doc precision. - Fixed #3846: missing $LVKF_* constants definition. - Fixed #3847: _GUICtrlEdit_ShowBalloonTip() crash in _WinAPI_MultiByteToWideChar(). - Fixed #3848: _GUICtrlListView_GetItemTextArray() no error detection in multicolumn. - Fixed #3850: _WinAPI_GetDriveNumber() does return - 1 as partition number. - Fixed #3852: _ArrayToString() speed optimization. - Fixed: Constants for _WinAPI_GetCursorInfo(). - Fixed: Debug.au3 when stripping. - Fixed #3861: RunAs() doc remark. Submitter Jon Submitted 02/27/2022 Category Beta2 points
-
[Auto Answers] Could use some help with script
barkeeper and one other reacted to SOLVE-SMART for a topic
Hi folks, I finished the first design mockup for the answer tool, called Au3AnswerByTag. The backend code is still in progress, but I achieved the functional breakthrough 🤞 . I am already in contact with @barkeeper by private message, but I will you inform about the progress. In case your offer still exist, I will let you know when you can test the application @Nine 😀 . Image: Program opened Image: Answer displayed by chosen tag Best regards Sven ________________ Stay innovative!2 points -
After seeing a number of threads talking about how to exchange efficiently messages between processes (Inter Process Communication), I decided to create a framework using Windows Messages WM_COPYDATA. What is new with this UDF you ask ? Well it will depends how familiar you are with IPC. One thing is sure, the simplicity of use and the fabulous speed are amazing. This is based on a Clients-Server approach. You can have an unlimited number of clients talking with a single server. You will have to define the protocol of communication between them, but the code you have to create is incredibly low. The UDF proposes 2 simple message properties of communication. The first (called data) is based on a number. You can decide what value 1,2,3, etc. means between your client and server. Server will react upon the value of the data field. Second, there is a string field where you can inscribe additional information on request, and where the server will respond to client request (if necessary). Here are the functions that I have wrapped around this : Func _WCD_CreateServer Func _WCD_CreateClient Func _WCD_GetServerHandle Func _WCD_IsServerAvailable Func _WCD_Send Func _WCD_WM_COPYDATA_CLIENT_HANDLER Func _WCD_Client_GetResponse Func _WCD_WM_COPYDATA_SERVER_HANDLER Func _WCD_Server_PeekRequest Func _WCD_Server_GetRequest Func _WCD_Server_IsRequestAvail Here an example of the server : #include <Constants.au3> #include <GUIConstants.au3> #include "WCD_IPC.au3" Opt ("MustDeclareVars", 1) $_WCD_Verbose = False ; make it True if you want to follow the convos. False is by default. Local $hServer = _WCD_CreateServer () Local $aReq, $iData While True If _WCD_Server_IsRequestAvail () Then $aReq = _WCD_Server_GetRequest () $iData = @extended Switch $iData Case 1 ; who are you _WCD_Send($hServer, $aReq[0], $iData, @ComputerName) Case 2 Switch Number($aReq[1]) Case 1 _WCD_Send($hServer, $aReq[0], $iData, @IPAddress1) Case 2 _WCD_Send($hServer, $aReq[0], $iData, @IPAddress2) Case 3 _WCD_Send($hServer, $aReq[0], $iData, @IPAddress3) Case 4 _WCD_Send($hServer, $aReq[0], $iData, @IPAddress4) Case Else _WCD_Send($hServer, $aReq[0], $iData, "Invalid parameter") EndSwitch EndSwitch EndIf Sleep (100) WEnd And the client : #include <Constants.au3> #include <GUIConstants.au3> #include "WCD_IPC.au3" Opt ("MustDeclareVars", 1) $_WCD_Verbose = True ; as for the server, you can decide to make client verbose or not Global $hWnd = _WCD_CreateClient ("Test WCD Client") Global $hWndServer = _WCD_GetServerHandle () _WCD_Send($hWnd, $hWndServer, 1) ; simple request - who are you ? Local $sString = WaitForResponse () ConsoleWrite ($sString & @CRLF) _WCD_Send($hWnd, $hWndServer, 2, "5") ; adding text to a more complex request $sString = WaitForResponse () ConsoleWrite ($sString & @CRLF) Func WaitForResponse () Local $sResp While _WCD_IsServerAvailable () $sResp = _WCD_Client_GetResponse () If $sResp <> "" Then Return $sResp Sleep (100) WEnd EndFunc As always, let me know if you got issues, comments, suggestions. I will be glad to answer. Version 2020-06-27 * Allows processes with different levels of privilege to communicate with each other WCD_IPC.au31 point
-
Available here: https://github.com/OfficialLambdax/_netcode_Proxy-UDF/blob/main/examples/simple http_s proxy/simple http_s proxy.au3 Its a example for the _netcode_Proxy-UDF, but it runs quite well, so maybe someone has a use for it. Its a forward-proxy that doesnt modify any data. So a website doesnt detect the proxy, atleast i havent found one. You could go ahead and make a reverse proxy of it, a load balancer or what ever you think of. _storageS-UDF might be of use then. Bandwith wise i think 1 Gbit/s should be possible, couldnt test that yet. The script is single threaded, so it fully uses non blocking sockets and technics to keep lag low. Mem usage is also low because the proxy does not buffer data. It checks all sockets for those that have anything in the recv buffer and then checks the sockets, where the data is supposed to go, for if they are send ready. And only then the data is received and send. The http/s request parser is quite old and could use some optimization, but there is no problem with it, so i focussed on other things. Compatible with X64/32 Autoit Stable and Beta. Windows XP - 10. Havent tested Windows 11 or Wine. Requires a good chunk of UDFs's. If you dont want to go through the hassle then just pick the AllInOne and modify the #include in the http_s proxy script, to use the AllInOne. https://github.com/OfficialLambdax/_netcode_AllinOne-UDF Otherwise here is the whole required list _netcode_Proxy-UDF https://github.com/OfficialLambdax/_netcode_Proxy-UDF _netcode_AddonCore-UDF https://github.com/OfficialLambdax/_netcode_AddonCore-UDF _netcode_Core-UDF https://github.com/OfficialLambdax/_netcode_Core-UDF _storageS-UDF https://github.com/OfficialLambdax/_storageS-UDF Obviously there might be bugs, in that case please report them either here or there https://github.com/OfficialLambdax/_netcode_Proxy-UDF/issues Loading autoitscript.com with cache disabled. Running a speedtest1 point
-
Not sure, but tell me first why you really need to do this as this plugin serves a purpose and you can exclude websites in case you don't want it enable for that particular site? Jos1 point
-
It needs to be done by AutoIT.exe and AutoIT_x64.exe, if you write it yourself, it's too easy and makes no sense.1 point
-
@jugador This topic was originally about InetGet and is marked as solved. The only reason I brought up WinHTTP was to help me identify where the problem may have been. If you have questions about WinHTTP, XMLHTTP, ServerXMLHTTP, cURL, or any other HTTP request methods, I would suggest that you start another topic. As far as XMLHTTP is concerned, if it works for you, then I don't see any disadvantage or risk. The same would be true for any of the other methods.1 point
-
AutoIt v3.3.15.5 Beta
toasterking reacted to Jon for a file
5,158 downloads
3.3.15.5 (27th February, 2022) (Beta) AutoIt: - Added #3826: GUI "On event" While loop precision. - Added: Doc Symbolic constants for MouseGetCursor(), GUISetCursor() $MCID_*. - Added #3849: @OSVersion for Windows 11 and Server 2022. - Fixed #3836: FileExits trailing quotation mark. - Fixed #3844: Right bracket does not register as a hotkey. - Fixed #3830: GUICtrlSetResizing $GUI_DOCKBOTTOM fullscreen. - Fixed #3831: GUICtrlSetPos $GUI_DOCKHCENTER. - Fixed #2696: StringRegExp non-participating groups. - Fixed #2866: Regread x64 remote from x86. - Fixed #3667: empty continuation line. - Fixed #3760: oversized Number conversion. - Fixed #3215: GUICtrlCreateUpdown Show-Hide. UDFs: - Added: $ARRAYDISPLAY_NUMERICSORT for selected column for _ArrayDisplay() and _DebugArrayDisplay(). - Added: _GUICtrlEdit_SetPadding(). - Added: _WinAPI_ShellExecuteEx() Doc example. - Fixed #3828: SetError(), SetExtended() broken doc links. - Fixed #3827: _GUICtrlListView_ClickItem() outside listview area. - Fixed #3835: Magic numbers in GDIPlus doc. - Fixed #3833: _WinAPI_RegisterRawInputDevices() $iCount. - Fixed #3842: -StringToArray() default parameter doc precision. - Fixed #3846: missing $LVKF_* constants definition. - Fixed #3847: _GUICtrlEdit_ShowBalloonTip() crash in _WinAPI_MultiByteToWideChar(). - Fixed #3848: _GUICtrlListView_GetItemTextArray() no error detection in multicolumn. - Fixed #3850: _WinAPI_GetDriveNumber() does return - 1 as partition number. - Fixed #3852: _ArrayToString() speed optimization. - Fixed: Constants for _WinAPI_GetCursorInfo(). - Fixed: Debug.au3 when stripping. - Fixed #3861: RunAs() doc remark.1 point -
Well after some more thoughts, I believe the simpler and most efficient short-term solution would be to create a share folder where everybody could add their answers in RTF format. Here a revised version using this approach : #include <GUIConstants.au3> #include <GuiRichEdit.au3> #include <WindowsConstants.au3> #include <File.au3> Global Const $DOCUMENT_PATH = ".\document\" Example() Func Example() Local $aList = _FileListToArray($DOCUMENT_PATH, "*.rtf", $FLTA_FILES) If @error Then Exit MsgBox($MB_SYSTEMMODAL, "Error", "No File Found") Local $hGui = GUICreate("Example of reading a RTF file", 1020, 650, -1, -1) Local $idList = GUICtrlCreateCombo("Select Answer", 10, 10, 150, 25) GUICtrlSetData(-1, ListAnswer($aList)) Local $hRichEdit = _GUICtrlRichEdit_Create($hGui, "", 10, 50, 1000, 520, _ BitOR($ES_MULTILINE, $WS_VSCROLL, $ES_AUTOVSCROLL)) Local $idCopy = GUICtrlCreateButton("Copy", 10, 600, 100, 20) GUISetState() Local $sText While True Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $idList $sText = BinaryToString(FileRead($DOCUMENT_PATH & GUICtrlRead($idList) & ".rtf")) _GUICtrlRichEdit_StreamFromVar($hRichEdit, $sText) Case $idCopy _GUICtrlRichEdit_SetSel($hRichEdit, 0, -1, True) _GUICtrlRichEdit_Copy($hRichEdit) _GUICtrlRichEdit_SetSel($hRichEdit, -1, -1) EndSwitch WEnd _GUICtrlRichEdit_Destroy($hRichEdit) EndFunc ;==>Example Func ListAnswer($aArray) Local $sList For $i = 1 To $aArray[0] $sList &= StringRegExpReplace($aArray[$i], "\..*", "") & "|" Next Return StringTrimRight($sList, 1) EndFunc There is a small bug when using WordPad, so I suggest to create/modify the RTF file with Word. VPN.rtf1 point
-
Thank you LarsJ for pointing me to right direction. I would prefer to go with the force repaint solution. _WinAPI_RedrawWindow($main) Calling the above function makes the borders reappear. Is there is way to constantly check if Windows is changed from lock to unlock state? and only call the above function one time when Windows is unlocked.1 point
-
Now don't ask me about the event "Global Const $EVENT_OPEN_DESKTOP_CHANGED = 0x0020". Found it by trial an error, otherwise it seems to be undocumented , hell, it could even mean something completely different ... #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.6.1 Author: KaFu Script Function: Use a WinEventHook to detect a Desktop Change #ce ---------------------------------------------------------------------------- HotKeySet("{ESC}", "_Exit") #region ; WinEventHook ; Event Constants ; http://msdn.microsoft.com/en-us/library/ms697187.aspx ; http://msdn.microsoft.com/en-us/library/dd318066(VS.85).aspx ; http://mwinapi.sourceforge.net/doc/html/T_ManagedWinapi_Accessibility_AccessibleEventType.htm ; http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/accessibility/AccConst.html Global Const $EVENT_OPEN_DESKTOP_CHANGED = 0x0020 ; Undocumented? Found by trial&error... $h_DLL_User32 = DllOpen("User32.dll") $h_WinEventHook_Proc = DllCallbackRegister("_WinEventHook_Proc", "none", "hwnd;int;hwnd;long;long;int;int") If @error Then MsgBox(16 + 262144, "Error", "DllCallbackRegister(_WinEventHook_Proc) did not succeed. FFH will exit now.") Exit EndIf $h_Hook = _WinEventHook_Set(0x0020, 0x0020, $h_DLL_User32) If @error Then MsgBox(16 + 262144, "Error", "_WinEventHook_Set() did not succeed. FFH will exit now.") Exit EndIf OnAutoItExitRegister("_WinEventHook_UnSet") #endregion ; WinEventHook while 1 sleep(10) wend #region ; WinEventHook Functions Func _WinEventHook_Proc($h_Hook, $iEvent, $hWnd, $idObject, $idChild, $iEventThread, $iEventTime) ;ConsoleWrite($hWnd & @TAB & $idObject & @CRLF) ConsoleWrite(TimerInit() & @tab & hex($iEvent,4) & @tab & "IsDesktopLocked()" & @tab & IsDesktopLocked() & @crlf) EndFunc ;==>_WinEventHook_Proc Func _WinEventHook_Set($iEventMin, $iEventMax, $hDLLUser32) Local $aRet Local Const $WINEVENT_OUTOFCONTEXT = 0x0 Local Const $WINEVENT_SKIPOWNPROCESS = 0x2 If Not $hDLLUser32 Or $hDLLUser32 = -1 Then $hDLLUser32 = "User32.dll" $aRet = DllCall($hDLLUser32, "hwnd", "SetWinEventHook", _ "uint", $iEventMin, _ "uint", $iEventMax, _ "hwnd", 0, _ "ptr", DllCallbackGetPtr($h_WinEventHook_Proc), _ "int", 0, _ "int", 0, _ "uint", $WINEVENT_OUTOFCONTEXT) ; BitOR($WINEVENT_OUTOFCONTEXT, $WINEVENT_SKIPOWNPROCESS) If @error Then Return SetError(@error, 0, 0) Return $aRet[0] EndFunc ;==>_WinEventHook_Set Func _WinEventHook_UnSet() If $h_WinEventHook_Proc Then DllCallbackFree($h_WinEventHook_Proc) EndIf If $h_Hook Then DllCall($h_DLL_User32, "int", "UnhookWinEvent", "hwnd", $h_Hook) If $h_DLL_User32 Then DllClose($h_DLL_User32) EndFunc ;==>_WinEventHook_UnSet #endregion ; WinEventHook Functions Func IsDesktopLocked() Local $hDesktop Local $iRet Local $iRC Local $sMsg Local Const $DESKTOP_SWITCHDESKTOP = 0x100 $hDesktop = DllCall("User32.dll", "int", "OpenDesktop", "str", "Default", "int", 0, "int", 0, "int", $DESKTOP_SWITCHDESKTOP) $iRet = DllCall("User32.dll", "int", "SwitchDesktop", "int", $hDesktop[0]) If IsArray($iRet) Then If $iRet[0] = 0 Then $iRC = 1 ElseIf $iRet[0] = 1 Then $iRC = 0 EndIf Else EndIf DllCall("User32.dll", "int", "CloseDesktop", "int", $hDesktop[0]);<-- handle returned by "OpenDesktop" ;$iRet = DllCall("User32.dll", "int", "CloseDesktop", "int", $iRet[0]) Return ($iRC) EndFunc ;==>IsDesktopLocked Func _Exit() Exit EndFunc ;==>_Exit1 point