
moimon
Active Members-
Posts
35 -
Joined
-
Last visited
Content Type
Forums
Downloads
Forum Articles
Events
Everything posted by moimon
-
Implementing IRunningObjectTable Interface
moimon replied to LarsJ's topic in AutoIt Example Scripts
Great, this UDF is a great support for data transfer between processes 😍Thank you 😚 -
My friends can use this code (use COM - without registering Dll): MsgBox(0, 'Result', _ExtractTextCOM("sample.docx", False)) Func _ExtractTextCOM($sFilename, $bProperties = False) Local $hXd2tx = DllOpen(@ScriptDir & "\xd2txcom" & (@AutoItX64 ? '_64' : '') & ".dll") If @error Then Return SetError(1, '', '') Local $oXd2tx = ObjCreate('{4ECE8E8A-BCC2-4709-BCAE-264210DF321B}', '{EB26F494-4E90-4432-9BA6-C6D9CDEE25C4}', $hXd2tx) Return $oXd2tx.ExtractText($sFilename, $bProperties) EndFunc
- 14 replies
-
- text extraction
- word
-
(and 3 more)
Tagged with:
-
Using a COM property out of not registered DLL?
moimon replied to Matrix112's topic in AutoIt General Help and Support
@trancexx I tried it with your Subrogation function instead of using DllOpen function but failed. https://www.autoitscript.com/forum/topic/108969-subrogation/ Can you improve it or is there any other way to create a COM object using an hActiveX from memory ? Thanks for the help ♥️ -
Thanks trancexx. Although it has been a long time ago, it still works well and serves my project well. 😆 Btw, you have a new avatar 😍
-
Fastest way to send multiple HTTP requests
moimon replied to paradox109's topic in AutoIt General Help and Support
Example multi request 10 pages website: Local $Thread = 10 Local $oWH[$Thread] Local $ThreadCompleted[$Thread] Local $CheckCompleted = 0 Local $AsyncMode = True For $i = 0 To $Thread - 1 $oWH[$i] = ObjCreate('WinHttp.WinHttpRequest.5.1') $oWH[$i].Open('GET', 'http://autoitvn.com/forums/thao-luan-hoi-dap/page-' & ($i + 1), $AsyncMode) $oWH[$i].Send() Next Do For $i = 0 To $Thread - 1 If $ThreadCompleted[$i] = 0 And $oWH[$i].WaitForResponse(0) = True Then ;$ThreadCompleted[$i] variable condition to prevent loop result ConsoleWrite('>Page ' & $i & ' completed:' & @CRLF & $oWH[$i].GetAllResponseHeaders & @CRLF) $ThreadCompleted[$i] = 1 $CheckCompleted += 1 EndIf Next Until $CheckCompleted = $Thread MsgBox(0, 'Hi', 'Completed') This method works very fast and do not use as much CPU and RAM resources as multi process- 6 replies
-
- solved
- multithreading
-
(and 2 more)
Tagged with:
-
Fastest way to send multiple HTTP requests
moimon replied to paradox109's topic in AutoIt General Help and Support
ObjCreate('WinHttp.WinHttpRequest.5.1') Mode: Async = True In Loop use: .WaitForResponse(0) That is my suggestion to you 😙- 6 replies
-
- solved
- multithreading
-
(and 2 more)
Tagged with:
-
Hi all. Sorry if my words are confusing because I am not good at English. I am writing code to embed website with Recaptcha in GUI. And then, the code will automatically press the "I'm not a robot" button. The problem here is: - The code still works fine when entering iFrame to interact with Recaptcha with the URL is "https://www.google.com/recaptcha/api2/demo" <snip> - But for other URLs (such as "https://recaptcha-demo.appspot.com/recaptcha-v2-checkbox.php"), the code cannot be entered into the iframe. Code: <snip> I did a lot of research but didn't know why. I sincerely thanks for the help.
-
Working example of GetTextColor()/GetBkColor()
moimon replied to rover's topic in AutoIt Example Scripts
Awsome 😆 This UDF is working very well for my uncompleted project. Thank you. -
Local $var[] SetError(1, 1) $var.test = 1 MsgBox(4096, '@error and @extended', @error & ' ' & @extended) It seems that when using Map, @error will be reset to 0 (@extended is not affected). This is inconvenient. @Jon Can you adjust it to make @error not affected by Map? Thank you
-
In ChilkatContants.au3, I added: $CHILKATOBJ_API[$CHILKATOBJ_VERSION_950][$CHILKATOBJ_NAME_HTTP][$CHILKATOBJ_ID_PROGID] = 'Chilkat_9_5_0.Http' $CHILKATOBJ_API[$CHILKATOBJ_VERSION_950][$CHILKATOBJ_NAME_HTTP][$CHILKATOBJ_ID_CLSID] = '{A74C26D2-2429-4099-8672-2250B15E327F}' $CHILKATOBJ_API[$CHILKATOBJ_VERSION_950][$CHILKATOBJ_NAME_HTTP][$CHILKATOBJ_ID_IID] = '{C754C4B4-6B0A-4664-ADDD-45467F0BCB7E}' $CHILKATOBJ_API[$CHILKATOBJ_VERSION_950][$CHILKATOBJ_NAME_HTTPREQUEST][$CHILKATOBJ_ID_PROGID] = 'Chilkat_9_5_0.HttpRequest' $CHILKATOBJ_API[$CHILKATOBJ_VERSION_950][$CHILKATOBJ_NAME_HTTPREQUEST][$CHILKATOBJ_ID_CLSID] = '{D66A2F08-A267-4593-ACD4-3EF65255E005}' $CHILKATOBJ_API[$CHILKATOBJ_VERSION_950][$CHILKATOBJ_NAME_HTTPREQUEST][$CHILKATOBJ_ID_IID] = '{495F8CD2-9F03-4A83-A9BC-FEEAE2182D9B}' $CHILKATOBJ_API[$CHILKATOBJ_VERSION_950][$CHILKATOBJ_NAME_HTTPRESPONSE][$CHILKATOBJ_ID_PROGID] = 'Chilkat_9_5_0.HttpResponse' $CHILKATOBJ_API[$CHILKATOBJ_VERSION_950][$CHILKATOBJ_NAME_HTTPRESPONSE][$CHILKATOBJ_ID_CLSID] = '{65EA825E-648E-4BF0-8AA3-4E7724F75B07}' $CHILKATOBJ_API[$CHILKATOBJ_VERSION_950][$CHILKATOBJ_NAME_HTTPRESPONSE][$CHILKATOBJ_ID_IID] = '{C143C715-0FED-4392-B207-1CA3CDF84C88}' In Chilkat.au3, I added: Func _Chilkat_Http_ObjCreate, Func _Chilkat_HttpRequest_ObjCreate and Func _Chilkat_HttpResponse_ObjCreate. They are similar to other _Chilkat_xxx_ObjCreate functions. My HttpRequest Code: _ErrorLog_ChilkatWrapper(ConsoleWrite) _Chilkat_StartUp(@ScriptDir & "\Chilkat" & (@AutoItX64 ? '-x64' : '') & ".dll") _Chilkat_DllVersion($CHILKATOBJ_VERSION_950) Local $oHttp = _Chilkat_Http_ObjCreate() If Not IsObj($oHttp) Then Exit MsgBox(4096, 'Err', '_Chilkat_Http_ObjCreate') Local $oHttpRequest = _Chilkat_HttpRequest_ObjCreate() If Not IsObj($oHttpRequest) Then Exit MsgBox(4096, 'Err', '_Chilkat_HttpRequest_ObjCreate') $resp = $oHttp.SynchronousRequest("www.autoitscript.com", 443, True, $oHttpRequest) $resp is not HttpResponse Object without registering the chilkat/chilkat-x64.dll Thanks for your help.
- 16 replies
-
- chilkat
- pdfsigning
-
(and 3 more)
Tagged with:
-
Hi. Thanks for this nice UDF. Sorry because my bad English. When looking through this library, I see you do not need to register chilkat.dll, but use DllOpen and ObjectCreate with interfaces. But when I added the chilkat_httprequest function, it seemed that the response was not generated (it was not an object) without registering the dll. So is it possible to get chilkat_httpresponse without registering the dll? Thank you.
- 16 replies
-
- chilkat
- pdfsigning
-
(and 3 more)
Tagged with:
-
Function IsMap() requires AutoIt version 3.3.15.0 or 3.3.15.1 beta
-
Please Register as Devloper in Xprotec
moimon replied to naru's topic in AutoIt General Help and Support
COM Error by Func mEmailer You need to fully declare these, they are found at the beginning of the UDF -
Please Register as Devloper in Xprotec
moimon replied to naru's topic in AutoIt General Help and Support
@naru I run it perfectly. -
Please Register as Devloper in Xprotec
moimon replied to naru's topic in AutoIt General Help and Support
Add Clipput($D_2) in func XProTec And have: $D_License = "F2C02EDD5B8AB654" Try it. Sorry because I'm not well English -
Sorry, I posted the wrong topic. I hope Mod will help me remove this comment. Thank you.
-
AutoIt Windows Screenshooter v1.84 Build 2019-08-18
moimon replied to UEZ's topic in AutoIt Example Scripts
Awesome! Great Job! This is an amazing program. Thanks UEZ! I'm still studying your GDI+ scripts ^^- 129 replies
-
- screencapture
- gdi+
-
(and 3 more)
Tagged with:
-
How to trigger functions immediately
moimon replied to gahhon's topic in AutoIt General Help and Support
Example code: ; THư viện không thể thiếu #include <WinAPI.au3> #include <WinAPIShellEx.au3> Global $OldProc ; Đăng kí hàm Callback phụ, với tên hàm là NextProc, các parameter thì để y nguyên hoặc tham khảo trên MSDN nhé Global $hDll = DllCallbackRegister("NextProc", "ptr", "hwnd;uint;long;ptr") ; Get Pointer (C/C++ cân tất =]]) Global $pDll = DllCallbackGetPtr($hDll) ; Tạo một GUI traditional củ chuối... Global $hGUI = GUICreate("Test", 200, 60) ; Tạo 2 button để test để Set và Remove Subclass Global $Btn1 = GUICtrlCreateButton("Subclass", 15, 25, 75, 25) Global $Btn2 = GUICtrlCreateButton("Remove", 110, 25, 75, 25) ; Set Callback phụ $OldProc = _WinAPI_SetWindowLong($hGUI, $GWL_WNDPROC, $pDll) ; Có dòng này để GUI hiện lên chứ, hoặc không cần nếu set $WS_VISIBLE cho style GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case -3 ; Thoát GUIDelete() DllCallbackFree($hDll) Exit Case $Btn1 Case $Btn2 EndSwitch WEnd ;Callback function phụ: NextProc Func NextProc($hWnd, $iMsg, $wParam, $lParam, $iID, $pData) ; Xuất lên Console message của GUI, User khi tương tác với nó, nhớ xem phần console nhé ConsoleWrite(@CRLF & "Msg: " & Hex($iMsg, 4)) If $iMsg = 0x111 Then ;$WM_Command Switch $lParam ; $lParam trả về handle của control vừa tương tác Case GUICtrlGetHandle($Btn1) MsgBox(0, "", "Button 1 Clicked") Case GUICtrlGetHandle($Btn2) MsgBox(0, "", "Button 2 Clicked") ; Vô tư click... EndSwitch EndIf ; Luôn có dòng này đề tránh lỗi Return _WinAPI_CallWindowProc($OldProc, $hWnd, $iMsg, $wParam, $lParam) ;Dùng hàm dưới để Define (Unicode) thay cho hàm trên (ANSI), nhớ thêm #include <WinAPISys.au3> ;Return _WinAPI_CallWindowProcW($hWnd, $iMsg, $wParam, $lParam) EndFunc Source: https://translate.google.com.vn/translate?hl=en&tab=wT&sl=auto&tl=en&u=https%3A%2F%2Fp.rizon.top%3A443%2Fhttp%2Fautoitvn.com%2Fthreads%2Fadvanced-callback-phuong-phap-da-luong-trong-autoit.1254%2F -
This should be: #include "WinHttp.au3" $sDomain = "api-metrika.yandex.com" $sPage = "/stat/v1/data?preset=tech_platforms&dimensions=ym:s:browser&id=2138128&oauth_token=05dd3dd84ff948fdae2bc4fb91f13e22bb1f289ceef0037" ; Initialize and get session handle $hOpen = _WinHttpOpen() ; Get connection handle $hConnect = _WinHttpConnect($hOpen, $sDomain) ; Make a request $hRequest = _WinHttpOpenRequest($hConnect, "GET", $sPage) _WinHttpSendRequest($hRequest) ; Wait for the response _WinHttpReceiveResponse($hRequest) ; See what's returned Dim $sReturned If _WinHttpQueryDataAvailable($hRequest) Then ; if there is data Do $sReturned &= _WinHttpReadData($hRequest) Until @error EndIf ; Close handles _WinHttpCloseHandle($hRequest) _WinHttpCloseHandle($hConnect) _WinHttpCloseHandle($hOpen) ; See what's returned MsgBox(4096, "Returned", $sReturned) ConsoleWrite($sReturned & @CRLF)
-
Add #AutoIt3Wrapper_UseX64 = no in first line ^^
-
First, my english isn't well, I hope you understand. I have a problem with #pragma. #pragma compile(ExecLevel, #pragma compile(Compatibility, #pragma compile(UPX, #pragma compile(FileDescription, #pragma compile(ProductName, #pragma compile(FileVersion, #pragma compile(CompanyName, ................... But I didn't find #pragma equivalent to #autoit3wrapper_res_file_add How to clear line #autoit3wrapper_res_file_add after building my code ? I want to clear this because someone, who want decompile my exe, will see Res_File I added. Thanks for help ^^
-
Hi everyone Hi @trancexx I need add a CERT to the request handle. And I've found this code (C++) hint = InternetOpen("WebTestClient",INTERNET_OPEN_TYPE_DIRECT,NULL,NULL,0); if(hint!=NULL) { InternetSetStatusCallback(hint,&HTTPStatusCallbackFunc); hsession = InternetConnect(hint,"127.0.0.1",443,NULL,NULL,3,0,NULL); if(hsession!=NULL) { hreqest = HttpOpenRequest(hsession,"GET","/WebShop/","HTTP/1.1",NULL,(LPCSTR*)types,INTERNET_FLAG_SECURE|INTERNET_FLAG_IGNORE_CERT_CN_INVALID,NULL); if(hreqest!=NULL) { if(SetupSSL(hreqest)) { if(HttpSendRequest(hreqest,NULL,0,inbuf,inlen)) { ... } } InternetCloseHandle(hreqest); } InternetCloseHandle(hsession); } InternetCloseHandle(hint); } bool SetupSSL(HINTERNET request) { HCERTSTORE store = CertOpenSystemStore(NULL,"MY"); DWORD ret = 0; bool ok = false; if(store==NULL) return false; PCCERT_CONTEXT context = CertFindCertificateInStore(store,X509_ASN_ENCODING,0,CERT_FIND_SUBJECT_STR,L"WebClient",NULL); if(context!=NULL) { // this fails ok = WinHttpSetOption(request,WINHTTP_OPTION_CLIENT_CERT_CONTEXT,(LPVOID)context,sizeof(CERT_CONTEXT))==TRUE; if(!ok) ret = GetLastError(); // returns 6 CertFreeCertificateContext(context); } CertCloseStore(store,0); return ok; }; I have no experience on C++. Can anybody help me convert this code to AutoIt. Many and many thanks.
-
Hello all. How to get the Remote/Local IP by _WinHttpQueryOption($hInternet, $iOption), with $iOption = $WINHTTP_OPTION_CONNECTION_INFO. I tried and not successed. Thanks for any help Sorry My English isn't well.
-
Great share. But this doesn't work for me when trying the other images Like this
-
[SOLVED] Transparent png with a control
moimon replied to nend's topic in AutoIt GUI Help and Support
@UEZ You are awsome