Jump to content

Eusebio

Members
  • Posts

    17
  • Joined

  • Last visited

About Eusebio

  • Birthday 04/25/1967

Profile Information

  • Location
    Barcelona - SPAIN -
  • WWW
    http://www.eusebioperez.jazztel.es

Recent Profile Visitors

461 profile views

Eusebio's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Func _BDConnect($bdName="",$Server="",$mode=3,$connectionTimeOut=0,$commandTimeOut=0) ;Cadenas de conexión: http://www.connectionstrings.com/ Local $xCNN,$cConn if $Server="" Then if StringUpper(StringRight ($bdName,4))<>".MDB" Then $bdName=$bdName & ".MDB" EndIf $cConn="PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & $bdName Else $cConn="Provider=sqloledb;Server=" & $Server & ";Initial Catalog=" & $bdName & ";integrated security=SSPI;persist security info=False;" ;$cConn="Driver={SQL Server};Server=" & $Server & ";Database=" & $bdName & ";Trusted_Connection=Yes;" ;$cConn="Driver={SQL Server};Server=" & $Server & "Database=" & $bdName & ";Uid=sa;Pwd=MyPassword;" ;$cConn="Provider=sqloledb;Data Source=192.168.1.10,1433;Network Library=DBMSSOCN;Initial Catalog=" & $bdName & ";User ID=sa;Password=MyPassword;" ;$cConn="Data Source=" & $Server & ";Initial Catalog=" & $bdName & ";Integrated Security=SSPI;" EndIf $xCNN=Objcreate("ADODB.Connection") $xCNN.mode=$mode ;(2=adModeRead; 3=adModeReadWrite; 12=adModeShareExcludive) $xCNN.connectiontimeout=$connectionTimeOut $xCNN.commandtimeout=$commandTimeOut $xCNN.Open($cConn) Return $xCNN EndFunc Func _BDCloseConnexion(ByRef $xCNN) ;State ; adStateClosed =0 ; adStateOpen =1 ; adStateConnecting=2 if $xCNN.state=1 then $xCNN.close $xCNN=0 EndIf EndFunc Func _BDCloseRecordSet(byref $RS) ;State ; adStateClosed =0 ; adStateOpen =1 ; adStateConnecting=2 if $RS.state=1 then $RS.close $RS=0 EndIf EndFunc Func _BDSQLQuery(ByRef $xCNN,$strSQL,$cursorLocation=3,$cursorType=3,$lockType=3) ;CursorLocation ; adUseServer =2 ; adUseClient =3 ;CursorType ; adOpenForwardOnly =0 ; adOpenKeyset =1 ; adOpenDynamic =2 ; adOpenStatic =3 ;LockType ; adLockReadOnly =1 ; adLockPessimistic =2 ; adLockOptimistic =3 ; adLockBatchOptimistic=4 Local $miRS $miRS=ObjCreate("ADODB.Recordset") $miRS.cursorLocation=$cursorLocation $miRS.cursortype=$cursorType $miRS.locktype=$lockType $miRS.activeconnection=$xCNN $miRS.source=$strSQL $miRS.open Return ($miRS) EndFunc Func _getTables(ByRef $xCNN) Local $adoRs,$cCad $cCad="" $adoRs=Objcreate("ADODB.Recordset") $adoRs = $xCNN.OpenSchema (20) while not $adoRs.eof() if stringmid($adoRs("TABLE_NAME").value,1,4)<>"MSys" Then $cCad=$cCad & $adoRs("TABLE_NAME").value & "|" EndIf $adoRs.movenext() wend $adoRs.close() $adoRs=0 Return $cCad EndFunc Func _BDQuote($str) Return (Quote = "'" & $str & "'") EndFunc
  2. This is for Windows Vista.
  3. I think this is a backup of this forum and are not all answers. But, thanks a lot to who answer to me. Yes, I resolved the problem like this: IE -> Tools / Internet Options / Security -> Disable IE protected mode Thanks, Eusebio.
  4. An error with IE.au3 in Windows Vista AutoIt Error: Line 2161 (File "C:\Program Files\AutoIt3\beta\IE.au3"); Return $o_object.document.body.innerHTML Return $o_object.document^ERROR Error: The requested action with this object has failed.
  5. Here my old code in au3: http://www.autoitscript.com/forum/index.ph...st&p=224962
  6. Get information from WhoIs servers and get domains information. For example, put in the programme: cocacola.com You can put more servers (specialy for other country domains) from: http://www.iana.org/root-whois/index.html and complet whois.ini BR, Eusebio. WhoIs.zip
  7. If you are interested, I Know how now: TCPStartUp() dim $datos="" $ip=TCPNameToIP ("whois.nic.fr") while 1 $socket = TCPConnect($ip, 43 ) If $socket = -1 Then MsgBox(1,@error,"No conectado") Else ExitLoop EndIf WEnd TCPSend ( $socket,"123pizza.fr" & @CRLF ) If @error Then MsgBox(1,@error,"Error al enviar los datos") EndIf While 1 $recv = TCPRecv( $Socket, 2048 ) If @error Then ExitLoop If $recv <> "" Then $datos=$datos & $recv EndIf WEnd ConsoleWrite($datos) TCPShutdown ( )
  8. Anyboyd knows the way to connect to WhoIs server with sockets? I know the port is 43 but I don't know how to connect and save the data. Thanks, Eusebio.
  9. Hi Paulie, You must put ".flv" extension to the download file. Then you can view the video with a flv player or use another tool for convert the file to other format like: avi,mpg... I use "cinemaforge 2.0" you can download it from this link: http://www.download.com/CinemaForge/3000-2...4-10496506.html Eusebio.
  10. Fantastic GUI (with download progress). Thanks for rewrite and do better the code (only with inet). Now is perfect. Eusebio.
  11. Yes, of course.. There are many ways to download from youtube, but this is in autoIt and you can look how work the other tools...
  12. In this page you can do the same: http://javimoya.com/blog/youtube.php Eusebio.
  13. The download file must be renamed to extension .flv and then you can see the video with flv viewer or convert to other formats (avi,mpg) with your prefered tools. #include <INet.au3> #include <IE.au3> Local $sYouTubeLink="http://www.youtube.com/watch?v=lv4Potdpjhw" Local $oIE $sYouTubeLink=InputBox("Download YouTube videos","YouTube link:", $sYouTubeLink) if stringlen($sYouTubeLink)=0 Then Exit EndIf $sCode=_INetGetSource ($sYouTubeLink) $s_t=StringRegExp($sCode, "&t=(.*?)&", 3) $s_v=stringmid($sYouTubeLink,stringinstr($sYouTubeLink,"v=")+2) $sDownloadLink="http://youtube.com/get_video?video_id=" & $s_v & "&t=" & $s_t[0] $oIE=_IECreate ($sDownloadlink,0, 0, 1)The code could be better, you can change and post here. I would like detect when cancel download button is pressed for abort/exit script.
  14. I've created functions if anybody are interested (any comments are welcome) ;.......................................................................................................................................... ; This function returns an integer number which indicates the Levenshtein-Distance between the two ; argument strings or -1, if one of the argument strings is longer than the limit of 255 characters ; (255 should be more than enough for name or dictionary comparison). ; ; The Levenshtein distance is defined as the minimal number of characters you have to replace, ; insert or delete to transform sString1 into sString2. ; ; The greater the Levenshtein-Distance, the more different the strings are. ; Levenshtein-Distance is named after the Russian scientist Vladimir Levenshtein, ; who devised the algorithm in 1965. ; In its simplest form the function will take only the two strings as parameter and will calculate ; just the number of insert, replace and delete operations needed to transform sString1 into sString2. ; ; If you can't spell or pronounce Levenshtein, the metric is also sometimes called 'edit distance'. ; The Levenshtein distance algorithm has been used in: ; - Spell checking, - Speech recognition, - DNA analysis, - Plagiarism detection . ; ; Reference: [url=http://www.merriampark.com/ld.htm]http://www.merriampark.com/ld.htm[/url] ; ; I added some character 'cleaning' procedures prior to the specific Levenshtein algorithm. ; ; Eusebio Pérez Hurtado ;.......................................................................................................................................... Func _Levenshtein ($sString1, $sString2) $iStrLen1 = StringLen($sString1) $iStrLen2 = StringLen($sString2) If $iStrLen1=0 Then Return ($iStrLen2) EndIf If $iStrLen2=0 Then Return ($iStrLen1) EndIf If ($iStrLen1>255) Then Return (-1) ; see Note at end of function. If ($iStrLen2>255) Then Return (-1) ; see Note at end of function. ;.......................................................................................................................................... ; Cleanup procedures, not quite necessary, but useful. $sString1 = StringUpper($sString1) $sString1 = _StringClean($sString1,"ÄÅÃÂÁÀ","A") $sString1 = _StringClean($sString1,"ËÊÉÈ" ,"E") $sString1 = _StringClean($sString1,"ÏÎÍÌ" ,"I") $sString1 = _StringClean($sString1,"ÒÓÔÕÖ" ,"O") $sString1 = _StringClean($sString1,"ÜÛÚÙ" ,"U") $sString1 = _StringClean($sString1,"Ç","C") $sString1 = _StringClean($sString1,"Ñ","N") $sString2 = StringUpper($sString2) $sString2 = _StringClean($sString2,"ÄÅÃÂÁÀ","A") $sString2 = _StringClean($sString2,"ËÊÉÈ" ,"E") $sString2 = _StringClean($sString2,"ÏÎÍÌ" ,"I") $sString2 = _StringClean($sString2,"ÒÓÔÕÖ" ,"O") $sString2 = _StringClean($sString2,"ÜÛÚÙ" ,"U") $sString2 = _StringClean($sString2,"Ç","C") $sString2 = _StringClean($sString2,"Ñ","N") $sString1 = _StringClean($sString1,"ABCDEFGHIJKLMNOPQRSTUVWXYZ","",2) ;OjO! aquí quito los numeros también $sString2 = _StringClean($sString2,"ABCDEFGHIJKLMNOPQRSTUVWXYZ","",2) ;OjO! aquí quito los numeros también ;.......................................................................................................................................... ; The Levenshtein algorithm $iStrLen1 = StringLen($sString1) $iStrLen2 = StringLen($sString2) Dim $aArray [$iStrLen1+1][$iStrLen2+1] For $iRow=0 To $iStrLen1 $aArray[$iRow][0] = $iRow Next For $iCol=0 To $iStrLen2 $aArray[0][$iCol] = $iCol Next For $iRow=1 To $iStrLen1 For $iCol=1 To $iStrLen2 $iCost = StringMid($sString1,$iRow,1) <> Stringmid($sString2,$iCol,1) $iRowPrev = $iRow-1 $iColPrev = $iCol-1 $aArray[$iRow][$iCol] = _Min3(1+$aArray[$iRowPrev][$iCol],1+$aArray[$iRow][$iColPrev],$iCost+$aArray[$iRowPrev][$iColPrev]) Next Next $iDistance = $aArray[$iStrLen1][$iStrLen2] Return ($iDistance) EndFunc oÝ÷ Ù«­¢+Ø)Õ¹}5¥¸Ì ÀÌØí¸Ä°ÀÌØí¸È°ÀÌØí¸Ì¤(íIÑÕɹÌÑ¡5¥¹¥µÕ´½Ì¹ÕµÉÌ(íÕÍ¥¼AÉè!ÕÉѼ(ÀÌØíµ¥¸ÌôÀÌØí¸Ä(%ÀÌØí¸È±ÐìÀÌØíµ¥¸ÌQ¡¸ÀÌØíµ¥¸ÌôÀÌØí¸È(%ÀÌØí¸Ì±ÐìÀÌØíµ¥¸ÌQ¡¸ÀÌØíµ¥¸ÌôÀÌØí¸Ì(%IÑÕɸ ÀÌØíµ¥¸Ì¤)¹Õ¹oÝ÷ Ù«­¢+Ø(츸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸(ìM½Õ¹àµ¹¥Áձѥ½¸Í½¸(ìT¹L¸AѹÑÌÄÈØÄÄØÜ ÄäÄरÄÐÌÔØØÌ ÄäÈȤ(ìä5ÉÉÐ,¸=±°¹I½ÉиIÕÍͰ(ìÌÕÍäÑ¡9Ñ¥½¹°É¡¥Ù̹I½É̵¥¹¥ÍÑÉÑ¥½¸¡9I¤(ì¡ÁÕ±¥Í¡ä½¸-¹ÕÑ m-¹ÕÑ¡t¤¸(ì(ìIÕÍͰÌäí̵ѡ½¥ÌÕͱ½È¹µÌɽ´¹±¹°µÉ¥°ÝÍÑɸÕɽÁ½Õ¹Ñɥ̰(ìÕн̹½ÐÁÁ±äݱ°Ñ¼µ¹äM±Ù¥¹e¥¥Í ÍÕɹµÌ(칥̹½Ð¥¹Á¹¹Ð½ÍÙɰѡ¹¥½¹Í¥ÉÑ¥½¹Ì¸(ì(ì]¥Ñ ͽչà°Ñ¡ÅÕ½ÐíͽչÅÕ½Ðì½¹µÌ´Ñ¡Á¡½¹Ñ¥Í½Õ¹Ñ¼áа¥Ì½¸(ìQ¡¥Ì¥Ì½ÉС±ÀÍ¥¹¥ÐÙ½¥Ìµ½ÍÐÁɽ±µÌ½µ¥ÍÍÁ±±¥¹Ì½È±ÑɹÑÍÁ±±¥¹Ì¸(ì½ÈáµÁ±M¡Éµ¸°M¡Õɵ¸°M¡Éµ¸¹M¡¥Éµ¸¹M¡Õɵ¸É¥¹áѽѡÈÌÅÕ½ÐíLØÔÔÅÕ½Ðì¸(ìMÕɹµÍ½Õ¹à¥¹á¥¹¥Ì¹½Ð±Á¡Ñ¥°°ÕХ̱¥ÍÑäÑ¡±ÑÑȵ¹µ¹ÕµÈ½¸(ì%ÍÙɰÍÕɹµÌ¡Ùѡ͵½°Ñ¡¥ÈÉÌÉÉɹ±Á¡Ñ¥±±ää¥Ù¸¹µ¸(ìáµÁ±èLØÔÔÉÑ¡ÕȰLØÔÔ ÑÍä°LØÔÔ ¡É±Ì¸(ì(ìIÕÍͱ°M½Õ¹à9µµ5Ñ¡¥¹(ìQ¡IÕÍͱ°M½Õ¹à ½±½É¥Ñ¡´¥ÌÍ¥¹ÁÉ¥µÉ¥±ä½ÈÕÍÝ¥Ñ ¹±¥Í ¹µÌ¹¥Ì(ìÁ¡½¹Ñ¥±±ä͹µµÑ¡¥¹µÑ¡½¸Q¡±½É¥Ñ¡´½¹ÙÉÑÌ ¹µÑ¼½Õȵ¡ÉÑȽ°(ìÝ¡¥ ¸ÕÍѼ¥¹Ñ¥äÅÕ¥Ù±¹Ð¹µÌ°¹¥ÌÍÑÉÕÑÕÉ̽±±½ÝÌm-¹ÕÑ¡tè(ìĸIÑ¥¸Ñ¡¥ÉÍбÑÑȽѡ¹µ°¹É½À±°½ÕÉɹ̽°° °¤°¼°Ô°Ü°ä¥¸½Ñ¡ÈÁ½Í¥Ñ¥½¹Ì¸(ìȸÍÍ¥¸Ñ¡½±±½Ý¥¹¹ÕµÉÌѼѡɵ¥¹¥¹±ÑÑÉÌÑÈÑ¡¥ÉÍÐè(ì°°À°ØôôÄ(ì°°¨°¬°Ä°Ì°à°èôôÈ(ì°ÐôôÌ(ì°ôôÐ(ì´°¸ôôÔ(ìÈôôØ(ì̸%Ñݼ½Èµ½É±ÑÑÉÌÝ¥Ñ Ñ¡Íµ½ÝÉ©¹Ð¥¸Ñ¡½É¥¥¹°¹µ¡½ÉÍÑÀĤ ÌÌìÌÌìÌÌ줰(ì½µ¥Ð±°ÕÐÑ¡¥ÉÍи(ìи ½¹ÙÉÐѼѡ½É´E±ÑÑȰ¥¥Ð°¥¥Ð°¥¥ÒH䥹ÑÉ¥±¥¹éɽÌ(졥ѡÉɱÍÌÑ¡¸Ñ¡É¥¥Ñ̤°½ÈäɽÁÁ¥¹É¥¡Ñµ½ÍÐ¥¥ÑÌ¥ÐÑ¡Éɵ½ÉÑ¡¸Ñ¡É¸(ì(ì½ÈáµÁ±°Ñ¡¹µÌձȰÕḬ́!¥±Éа-¹ÕÑ ¹1±½åɥٸѡÉÍÁÑ¥Ù½Ì(ìÐØÀ°ÈÀÀ° ÐÄØ°,ÔÌÀ°0ÌÀÀ¸(ì!½ÝÙȰѡ±½É¥Ñ¡´±Í¼¥ÙÌѡ͵½Ì½È(ì±±Éä°¡½Í °!¥±É½¹¸°-¹Ð¹1m-¹ÕÑ¡tÝ¡¥ ɹ½Ðɱѥ¸É±¥Ñä¸(ì(ìm-¹ÕÑ¡t踸-¹ÕÑ °Q¡ÉÐ= ½µÁÕÑÈAɽɵµ¥¹°Y½°¸Ì°M½ÉÑ¥¹¹MÉ¡¥¹°¥Í½¸]ͱä°ÁÀÌäÄ´Ìäȸ(ì(ìÕÍ¥¼AÉè!ÕÉѼ(츸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸)Õ¹}M½Õ¹à ÀÌØíÍMÑÉ¥¹¤(%%MÑÉ¥¹1¸ ÀÌØíÍMÑÉ¥¹¤ôÀQ¡¸($%IÑÕɸ ÅÕ½ÐìÅÕ½Ðì¤(%¹%($ÀÌØíÍMÑÉ¥¹ôMÑÉ¥¹UÁÁÈ ÀÌØíÍMÑÉ¥¹¤(($ìIÑ¥¸Ñ¡¥ÉÍбÑÑȽѡ¹µ¸($ÀÌØíÍ ¡É¥ÉÍÐôMÑÉ¥¹5¥ ÀÌØíÍMÑÉ¥¹°Ä°Ä¤(($ìÍÁ¥°ÁɵÁɽÍÍ¥¹½Èɵ¸±¹Õ($ÀÌØíÍMÑÉ¥¹ôMÑÉ¥¹IÁ± ÀÌØíÍMÑÉ¥¹°ÅÕ½ÐíM ÅÕ½Ðì°ÅÕ½ÐíLÅÕ½Ðì¤ìɵ¸ÍÁ¥°ÅÕ½ÐíÍ ÅÕ½Ðì($ÀÌØíÍMÑÉ¥¹ôMÑÉ¥¹IÁ± ÀÌØíÍMÑÉ¥¹°ÅÕ½Ðï|ÅÕ½Ðì°ÅÕ½ÐíLÅÕ½Ðì¤ìɵ¸ÍÁ¥°Í¡ÉÀµÌÅÕ½Ðï|ÅÕ½Ðì(($ìɽÀ±°½ÕÉɹ̽°° °$°
  15. I would like to use a function that is in this dll: xnm34i.dll This DLL is for winbatch script language. Is possible to use with DllCall in AutoIT? My code is: $sResult=DllCall ( "xnm34i.dll", "str","nmSoundex","str","TEST","int",0 ) the return error is 3: @error = 3 "function" not found in the DLL file Can you help me, please... Thanks, Eusebio
×
×
  • Create New...