Jump to content

Vitaliy4us

Active Members
  • Posts

    81
  • Joined

  • Last visited

Recent Profile Visitors

361 profile views

Vitaliy4us's Achievements

Wayfarer

Wayfarer (2/7)

1

Reputation

  1. I am trying to run *.au3 script from VSCode. I installed some plugins: Damien, 4ern, Code Runner but non of them could be used for this aim. Code editor works fine and the code is highlighted, but if I try to run the code I get an error: Line 0 (File "c:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3"); Error: Error opening the file. The script works fine by running it from SciTE editor
  2. Nice to meet you Danp2. It's an honor for me to get a reply from the author of the great UDF. You are doing the great job. And thank you for this.
  3. I just found an example for Java and hoped that it would be great to be use something like this in Autoit script public class GettingStarted { @Test public void testGoogleSearch() throws InterruptedException { // Optional. If not specified, WebDriver searches the PATH for chromedriver. System.setProperty("webdriver.chrome.driver", "/path/to/chromedriver"); WebDriver driver = new ChromeDriver(); driver.get("http://www.google.com/"); Thread.sleep(5000); // Let the user actually see something! WebElement searchBox = driver.findElement(By.name("q")); searchBox.sendKeys("ChromeDriver"); searchBox.submit(); Thread.sleep(5000); // Let the user actually see something! driver.quit(); } } Thank you for your reply.
  4. I saw this one million times. But there is no an answer to my question. I don't want UDF I asked about WebDriver object
  5. Is it possible to create WebDriver object in Autoit script in the same way as the object for WinHttp? E.g. I can use: Local $oHTTP = ObjCreate('WinHttp.WinHttpRequest.5.1') to get WinHttp object. Is it possible to do the same with WebDriver? Something like this: Local $oDriver = ObjCreate('ChromeDriver')
  6. I am trying to get access to yahoo IMAP server by means of TCP. But the server does not response. I think that the reason is ssl, using by the server. This example does not work as well. Here is the script for connecting the server: ;Host Name : imap.mail.yahoo.com ;IP Address : 217.146.190.234 and 77.238.185.51 Example() Func Example() Local $result = TCPStartup() ; Start the TCP service. MsgBox(0,"", "The result of TCPStartup() = " & $result) Local $iSocket = TCPConnect("217.146.190.234", 993) MsgBox(0,"", "The result of TCPConnect = " & $iSocket & @LF & "@error = " & @error) $result = TCPSend($iSocket, StringToBinary('capability', 4)) Local $response = TCPRecv($iSocket, 64, 1) Local $error = @error MsgBox(0,"", "The result of TCPSend() = " & $result & @LF & "The result of TCPRecv() = " & $response & @LF & "@error = " & $error) ; Register OnAutoItExit to be called when the script is closed. OnAutoItExitRegister("OnAutoItExit") EndFunc ;==>Example Func OnAutoItExit() $result = TCPShutdown() ; Close the TCP service. MsgBox(0,"", "The result of TCPShutdown() = " & $result) EndFunc ;==>OnAutoItExit
  7. One more comment regarding Node.js. Of course I know that "Node.js is basically a wrapper around Chrome's V8 JavaScript engine". But the thing is not the way how it does it, but the result that we get from such approach. And the result is a possibility of using JavaScript outside a browser. And here is one more interesting tool accessible from Node.js - namelly AutoIt module. Does anybody use it? I'm stuck at the installation stage. The problem is that there is a dependency from node-gyp that must be installed before. And this module uses Pyton. And it looks like there is another version of Pyton had been installed before. So there is cofiguring problem blocking node-gyp installation. Once the problem would be solved the autoit module could be installed and used fron the node: var au = require('autoit'); au.Init(); au.Run("notepad.exe"); au.WinWait("[Class:Notepad]"); au.Send("Hello, autoit & nodejs!"); Hope that somebody use it and can share the way of solving the problem?
  8. Not only WinHTTP. Here is a quotation from the article provided by the link: The paragraph is followed by the code (I think it should be C++ which I am not familiar with): // Declare an IHTMLDocument structure IHTMLDocument2Ptr myDocument; // Declared earlier in the code HRESULT hr = CoCreateInstance(CLSID_HTMLDocument,NULL, CLSCTX_INPROC_SERVER,IID_IHTMLDocument2, (void **)&myDocument); HRESULT hresult = S_OK; VARIANT *param; SAFEARRAY *tmpArray; // Creates a new one-dimensional array // for holding the webpage data tmpArray = SafeArrayCreateVector(VT_VARIANT, 0, 1); // Convert the buffer into binary string bstr_t bsData = (LPCTSTR) respage; hresult = SafeArrayAccessData(sfArray,(LPVOID*) & param); param->vt = VT_BSTR; param->bstrVal = bsData; hresult = myDocument->write(tmpArray); // injected code in document structure hresult = SafeArrayUnaccessData(tmpArray); SysFreeString(bsData); if (tmpArray != NULL) { SafeArrayDestroy(tmpArray); }
  9. Yes, you are right. But anyway the question is about the possibility to do this thing, not about what is it for and how it can be done in another way. What do you think about this https://www.codeproject.com/Articles/4586/Web-Data-Extraction-by-Crawling-using-WINHTTP-and ? It looks like the guy offers a real thing?
  10. Yes it was like this before Node.js stepped out. I'd like to be free of the browser type. And I believe that it would be much faster to get server response as a string directly from a server bypassing such monster as browser.
  11. Yes I can. And I can parse the page using AutoIt String functions. But there are much more options provided by JavaScipt since I get DOM by means of Local $oIE = _IECreate($URL, 0, 1) $oDoc = $oIE.document and from this moment you are able to use any of them. For example $oHtml=$oDoc.GetElementsByTagName("html").item(0) and a lot of others. The only problem is that in this case your are bounded to IE library supplied with AutoIt or other libraries existed for another browsers. But I do not want to be bounded to any browser. I'd like to know how to build Document Object Model based on the server responce whatever tool I use: WinHttp or InetGet or InetRead.
  12. Exactly. This is the thing that I meant. E.g. Chrome driver or something like that. I mean another tool than browser.
  13. IE library supplied with AutoIt allows to have access to DOM object, also there is some custom libraries for Chrome. Bu is it possible to get DOM using AutoIt native functions? Maybe by means of the AutoIt + Curl? What is the mechanizm of request for the DOM? How browsers perform this operation? I know that Curl can pretend to be browser so maybe it is possible to use this approach?
  14. Almost 10 years have past but the issue is still there and $LVS_EDITLABELS still does not work. I believe it should work without any additional actions required from a user. Moreover as far as I can see it is not the only thing regarding the same problem I mean the patch kindly provided by Melba23. Anyway I have another question: is it possible to copy (not edit) the listview item? Maybe this task can be solved without any patches?
×
×
  • Create New...