Jump to content

Chefito

Active Members
  • Posts

    29
  • Joined

  • Last visited

Chefito's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Hello, I have to use this udf in a windows xp. When I use control+w of the simplepy it gives me this error: I have framework .net 4.0 installed. I have not been able to install the program of link https://support.microsoft.com/es-es/help/971513/description-of-the-windows-automation-api . The link to xp is broken. How can I run ui automation on windows xp? I need to install something? Where can I download it? Thank you very much.
  2. MSXML2.ServerXMLHTTP object don´t work in event OnReadyStateChange. I have searched in the forum and google and I have not found anything. Anyone know how to make it work? $oMSXML2 = ObjCreate("MSXML2.ServerXMLHTTP") Local $oEventObject = ObjEvent($oMSXML2, "Event_") ; Start receiving Events. $url = "https://www.autoitscript.com/site/" ;web example With $oMSXML2 .Open ("GET", $Url, True) .Send EndWith ;~ While 1 ;~ Sleep(50) ;~ If $oMSXML2.readystate=4 Then ;~ ConsoleWrite($oMSXML2.responseText & @CR) ;~ ExitLoop ;~ EndIf ;~ WEnd While 1 Sleep(50) WEnd Func Event_OnReadyStateChange() ConsoleWrite($oMSXML2.readystate) EndFunc ;==>HandleStateChange Thank you very much.
  3. Thanks to all. Thank Malkey. Your function is great . jchd I know to use quite well the udf IE. Even DOM in general. But I always try to avoid the use of the object InternetExplorer. I prefer to use the udfs winhttp and inet, and try the html code with regular expression. This is faster and give less fails. This is solved. Thanks.
  4. Thanks for answering. This code is fine, but is not what I need. Again it's my fault for putting text on a single line. The text where you have to use is the html code of a web page, so this is a multiline text, and the code you have set does not work for multi-line. Example: #include <inet.au3> $text=_INetGetSource("https://www.autoitscript.com/site/") MsgBox(0,"",searchBackwards($text, '<a href="http://www.autoitconsulting.com/site/', "</a>")) Func searchBackwards($string, $subStringStart, $subStringEnd, $casesense = 0, $includeSubString = True) Local $result=StringInStr($string, $subStringEnd, default, -1) If @error Then Return SetError(1) If $result > 0 Then Local $posEnd = $result + StringLen($subStringEnd) Local $posStart = StringInStr($string, $subStringStart, Default, -1, $result - 1) If @error Then Return SetError(1) If $posStart >0 Then If $includeSubString = False Then $posStart += StringLen($subStringStart) $posEnd -= StringLen($subStringEnd) EndIf Return StringMid($string, $posStart, $posEnd - $posStart) Else Return SetError(2,Default,0) EndIf Else Return SetError(3,default,0) EndIf EndFunc I know that in this case can be solved with a normal search using '<a href="http://www.autoitconsulting.com/site/cookie-policy/">' which is unique, but is just one example. Is it possible that with these arguments I get the same result that my previous function but with regular expressions? It is more for interest, because my role is going more or less well. Greetings and thanks.
  5. jchd, thanks for answering, . But I think that it was not what I wanted. Maybe I misspoke. My English is bad. Sorry. I made a small sample function to understand what I want to do with regular expressions. I want use the options, power and speed of the regular expressions. $text="hi, today we are fine, we are writting about AutoIt language, and search text backwards." MsgBox(0,"",searchBackwards($text, ",", ",")) Func searchBackwards($string, $subStringStart, $subStringEnd, $casesense = 0, $includeSubString = True) Local $result=StringInStr($string, $subStringEnd, default, -1) If @error Then Return SetError(1) If $result > 0 Then Local $posEnd = $result + StringLen($subStringEnd) Local $posStart = StringInStr($string, $subStringStart, Default, -1, $result - 1) If @error Then Return SetError(1) If $posStart >0 Then If $includeSubString = False Then $posStart += StringLen($subStringStart) $posEnd -= StringLen($subStringEnd) EndIf Return StringMid($string, $posStart, $posEnd - $posStart) Else Return SetError(2,Default,0) EndIf Else Return SetError(3,default,0) EndIf EndFunc Is there any way to do this with regular expressions, find the string that there is between two strings, touring the text from the end of the text at the beginning? I remember I read something, but I'm not sure. Thank you.
  6. Hi, How could I search for text starting from the end to the beginning with StringRegExp? that is, a search backwards. Thank you.
  7. Puffff......I didn´t think it. TANK YOU!!!!! This is perfect!!!! Yes, I´m chefito from autoit spanish forum. Do you meet me?
  8. How could retrieve the data with a pointer? It is to do a algorithm with lists. Local $str = "int var1;ptr var2" Local $a1 = DllStructCreate($str) Local $a2 = DllStructCreate($str) DllStructSetData($a2, "var1", 200) DllStructSetData($a1, "var1", 100) DllStructSetData($a1, "var2", DllStructGetPtr($a2,1)) $pointer=DllStructGetPtr($a2,1) Very thank you.
  9. Exit, thank, but it isn't that I want to do. Also, I don't want to use the ie.au3 udf. I could do it for example with _iebodyreadtext, but I want to know as it do with winhttp. Thank you very much . Trancexx, I have read many post from you and I know that you are a genius . Your solution works perfectly!!!!! . I was that I wanted. I never would have guessed it was that parameter. Thank you very very much.
  10. Hi, I am having problems trying to retrieve the code HTML from a website. the letters with accents and the letter ñ don´t show well. For example, I see this: Guía local de comercios en Argentina - Guía Local and I would have to see this: Guía local de comercios en Argentina - Guía Local. It happens with all the text html. I am using winhttp udf. What I can do? Any idea? My code: #include <WinHTTP.au3> $hOpen = _WinHttpOpen() $hConnect = _WinHttpConnect($hOpen, "guialocal.com.ar") $html = _WinHttpSimpleRequest($hConnect, "get") ConsoleWrite($html) ; Close handles _WinHttpCloseHandle($hConnect) _WinHttpCloseHandle($hOpen)
  11. Hi, I will put two links about the subject: Link of the original post traslate by Google Link of the original post in spanish Sorry, but I know very little English. I hope you like it and tell you your opinion. Greetings. Transiciones_IE.rar
  12. _StringBetween ($filetoread,'href="anrdomlinkofsite">','</a></td>') Saludos.
  13. Here I leave a link to the AutoIt forum in Spanish with other functions. My link of the function Saludos.
  14. I did something on this subject, but I did not get much Link of the function Saludos.
×
×
  • Create New...