All Activity

This stream auto-updates   

  1. Past hour
  2. Latest revision can be downloaded here.
  3. Ok, i understand, so i assume ripdad's solution solved it yes? In adition to his solution, i'd like to sugest the possibility of having something like that loop, but just a winexists + winkill, so no need to activate it and pressing enter, simply, if it exists, close it, and you're done.
  4. Yesterday
  5. There are 12 instances of the flypop running, when a certain event happen all of them give a pop-up message and if the event happens 5 times I get 60 pop-up messages to close so the purpose of the script is to keep running in the back waiting for the pop-ups to happen and then close them automatically when they do.
  6. @mLipok Good suggestion. @NguyenLe It's a bug that I've already fixed. I'll post an update soon.
  7. you need to say 3 letters for sure, and then maybe one other. I think that range is the only issue, you could do it like so instead: $a="1232ssni123.mp4" $b="1232ssn123.wmv" $c="1232ss123.wmv" ; negative test not enough letters $d="1232ssni123.wma" ; negative test extension msgbox(0,"",StringRegExp($a,"\d{4}[A-Za-z]{3}[A-Za-z]*\d{3}\.(avi|mp4|wmv|mkv)")) msgbox(0,"",StringRegExp($b,"\d{4}[A-Za-z]{3}[A-Za-z]*\d{3}\.(avi|mp4|wmv|mkv)")) msgbox(0,"",StringRegExp($c,"\d{4}[A-Za-z]{3}[A-Za-z]*\d{3}\.(avi|mp4|wmv|mkv)")) msgbox(0,"",StringRegExp($d,"\d{4}[A-Za-z]{3}[A-Za-z]*\d{3}\.(avi|mp4|wmv|mkv)"))
  8. here's a simple script that i can't get working: $a="1232ssni123.mp4" $result=StringRegExp($a,"\d{4}[A-Za-z]{3-4}\d{3}\.(avi|mp4|wmv|mkv)",0) msgbox(0,"",$result) it should match and produce a result of 1 but it doesn't. what am i doing wrong?
  9. Not for me, handle is all zeroes
  10. I rewrote the function (Not Tested) to take advantage of the BytesReceived feature and a few other things. Wrote a few comments along with it. Hopefully, it will improve the situation. Func __TCPClient_Recv() Local $nBytesReceived, $nError, $sData, $recv ; For $i = 1 To $__TCPClient_Sockets[0] If Not $__TCPClient_Sockets[$i] Then ContinueLoop EndIf ; $recv = _WSA_TCPRecv($__TCPClient_Sockets[$i], 65536, 1, 10); socket, buffer, binary, timeout $nError = @error $nBytesReceived = @extended ; If $nError Then ConsoleWrite('__TCPClient_Recv Error-1: ' & $nError & @CRLF) __TCPClient_KillConnection($i) ContinueLoop ElseIf $nBytesReceived Then $sData = BinaryToString($recv); It's best to use binary for encrypted data returning from receive. Else ContinueLoop EndIf ; Do $recv = _WSA_TCPRecv($__TCPClient_Sockets[$i], 65536, 1, 10); socket, buffer, binary, timeout $nError = @error $nBytesReceived = @extended ; If $nError Then ConsoleWrite('__TCPClient_Recv Error-2: ' & $nError & @CRLF) __TCPClient_KillConnection($i) ContinueLoop 2 ElseIf $nBytesReceived Then $sData &= BinaryToString($recv) EndIf Until $nBytesReceived = 0 ; ; *** This is probably not a good idea, since headers generally have at least one @CRLF at the end, which is definitely a monkey wrench if removed. ;If $_TCPClient_AutoTrim Then ;$sData = StringStripWS($sData, 1 + 2) ;EndIf ; If $_TCPClient_DebugMode Then __TCPClient_Log("Client " & _TCPClient_SocketToIP($__TCPClient_Sockets[$i]) & " sent " & StringLeft($sData, 255)) ; ; *** At first glance, this looks like Async Sockets, but I can't find any code supporting that notion. ; *** FYI, The UDF has not been tested with a mix of Async Sockets and Non-Blocking Sockets. So, I have no idea what the effects are. Call($_TCPClient_OnReceiveCallback, $__TCPClient_Sockets[$i], _TCPClient_SocketToIP($__TCPClient_Sockets[$i]), $sData, $__TCPClient_Pars[$i]) Next EndFunc
  11. I also run run many scripts (even not compiled) and I collect responses from those scripts from a main script without issues. For example, this udf (https://www.autoitscript.com/forum/topic/156395-versatile-multi-ping/#comment-1131267) runs more ping commands at the same time and collects results from each of them. Here (https://www.autoitscript.com/forum/topic/177999-how-to-change-bgcolor-of-a-control-belonging-to-another-window/?do=findComment&comment=1278754) a funny example where a main script with a gui with 100 labels, spawns 100 separate and not compiled scripts that will change the content and the color of the main gui (save the last 2 script Main.au3 and Child.au3 in the same path and run the Main.au3). When the main script ends, also all child processes will close themselves. it was just for a fun experiment
  12. I have some progress. EDIT: I'm tired, going sleep, will check it toomorow.
  13. This works for me #include <ScreenCapture.au3> #Include <Clipboard.au3> Send("{PRINTSCREEN}") _ClipBoard_Open(0) $hBmp = _ClipBoard_GetDataEx($CF_BITMAP) _ClipBoard_Close() MsgBox (0, "$hBmp", $hBmp) _ScreenCapture_SaveImage (@ScriptDir & "\ClipBoard_GetData.jpg", $hBmp)
  14. I have run a random number of scripts (each for a random period) - controlled by a master script in an infinite loop - and never encountered any problems.
  15. Allow2010, See if this thread helps you out: https://www.autoitscript.com/forum/topic/189734-how-can-i-make-autoit-copy-and-paste-only-numbers/
  16. Hello, I've modified a bit the script to chek the IE version and use appropriate commands to get reference to the javascript eval() function. At the moment I've access only to an IE version 11 and I can not test if it works on IE < 11 Could someone please check if this script is working on IE versions lesser than 11. It should inject jquery (if not already present in the page), show the jquery version (injected or already present) and use jquery to make the google logo disappear from the page (just for a test). Thanks for the help #include <ie.au3> Example() Func Example() Local $oIE = _IECreate("www.google.com") Local $jQuery = _jQuerify($oIE) MsgBox(0, "Version", "jQuery version: " & $jQuery.fn.jquery) MsgBox(0, "Example", "click ok to exit." & @CRLF & "Google logo will fade out by jQuery...") $jQuery('#hplogo').fadeOut(3000) ; jQuery will fade out the google logo EndFunc ;==>Example ; #FUNCTION# ==================================================================================================================== ; Name ..........: _jQuerify ; Description ...: ; Syntax ........: _jQuerify(Byref $oIE) ; Parameters ....: $oIE - Object variable of an InternetExplorer.Application. ; Return values .: an object variable pointing to the jQuery library ; Author ........: Chimp ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: ; =============================================================================================================================== Func _jQuerify(ByRef $oIE) Local $msie, $jsEval, $jQuery, $otherlib = False $msie = Execute('$oIE.document.documentMode') If ($msie = "") Or Number($msie) < 11 Then ; an IE version < 11 ; create a reference to the javascript eval() function $oIE.document.parentWindow.setTimeout('window.eval = eval', 0) Do Sleep(250) $jsEval = Execute('$oIE.Document.parentwindow.eval') Until IsObj($jsEval) Else ; IE version > = 11 ; create a reference to the javascript eval() function $oIE.document.parentWindow.setTimeout('document.head.eval = eval', 0) Do Sleep(250) $jsEval = Execute('$oIE.Document.head.eval') Until IsObj($jsEval) EndIf ; if jQuery is not already loaded then load it If $jsEval("typeof jQuery=='undefined'") Then ; check if the '$' (dollar) name is already in use by other library If $jsEval("typeof $=='function'") Then $otherlib = True Local $oScript = $oIE.document.createElement('script'); $oScript.type = 'text/javascript' ; If you want to load jQuery from a disk file use the following statement ; where i.e. jquery-1.9.1.js is the file containing the jQuery source ; (or also use a string variable containing the whole jQuery listing) ;~ $oScript.TextContent = FileRead(@ScriptDir & "\jquery-1.9.1.js") ; <--- from a file ; If you want to download jQuery from the web use this statement $oScript.src = 'https://code.jquery.com/jquery-latest.min.js' ; <--- from an url $oIE.document.getElementsByTagName('head').item(0).appendChild($oScript) Do Sleep(250) Until $jsEval("typeof jQuery == 'function'") EndIf Do Sleep(250) $jQuery = $jsEval("jQuery") Until IsObj($jQuery) If $otherlib Then $jsEval('jQuery.noConflict();') Return $jQuery EndFunc ;==>_jQuerify
  17. @maxsri welcome to the forum. First off, please pay attention to where you post. Posting in the correct forum will help ensure you get help as quickly as possible. Each forum has a statement at the top to give you an idea of what to post (or not post) there. For the DEV forum: Also, whenever you post a question, especially if (as it seems) you have already tried some things on your own, please post your code. It is great that you have tried something on your own rather than just wanting someone to do it for you; being able to see that code, even if it is not working as you would expect, helps us help you
  18. Comrades share the utility, who has.
  19. @SteveStrop please pay attention to where you post in the future. The Examples forum very clearly states:
  20. I used it like so using the Latest version of autoit with its beta in 32 bit $recv = _WSA_TCPRecv($__TCPClient_Sockets[$i], 65536, 0, 10) as to the HTTPS-everywhere plugin i'm not completely sure what is exactly happening ,didn't do any special modding may be it has to do with how i'm sending the text back to the browser where that plugin is active ,without it being active every thing seems normal will need to test it again to find out more ..
  21. Hi, I want to query a firebird database. Everything works fine, but i need to optimize my query so the results will be ok. Each row of my table holds a customer with collumns like lastname, firstname, phone1, phone2, fax and mobile My script has a phonenumber and i want to find alle customers with that phonenumber (yes, the number can be used by more than one customer). Right now i use something like: $sQUERY = 'Select * from ' & $sTableName & " WHERE PHONE1 LIKE '%" & $number & "%'" As long as the number is stored correctly it works fine, but sometimes there are spaces or comments in the stored number or a number is written in different ways like 089-123456 or like 089/123456 or like 089123456. How can i construct a query to only compare the numeric part (that means strip letters and whitespaces) of the phone1 column (and also the other phone columns)? Only using wildcards like % and _ (that is waht i do now) is probably not enough. I need something a bit more complicated :-) On the web i found examples using substring with something like %[0-9]% but i am not sure if this syntax is supported by the firebird db and even if it is, i did not manage to get it working. Can anyone help me here? Thanks!
  22. I took a look at the code in the TCPClient-UDF... Func __TCPClient_Recv() For $i = 1 To $__TCPClient_Sockets[0] Dim $sData If Not $__TCPClient_Sockets[$i] Then ContinueLoop $recv = TCPRecv($__TCPClient_Sockets[$i], 1000000); <--- If @error Then __TCPClient_KillConnection($i) ContinueLoop EndIf If $recv Then $sData = $recv Do $recv = TCPRecv($__TCPClient_Sockets[$i], 1000000); <--- If @error Then ConsoleWrite('log 2') __TCPClient_KillConnection($i) ContinueLoop (2) EndIf $sData &= $recv Until $recv = "" If $_TCPClient_AutoTrim Then $sData = StringStripWS($sData, 1 + 2) EndIf If $_TCPClient_DebugMode Then __TCPClient_Log("Client " & _TCPClient_SocketToIP($__TCPClient_Sockets[$i]) & " sent " & StringLeft($sData, 255)) Call($_TCPClient_OnReceiveCallback, $__TCPClient_Sockets[$i], _TCPClient_SocketToIP($__TCPClient_Sockets[$i]), $sData, $__TCPClient_Pars[$i]) EndIf Next EndFunc ;==>__TCPClient_Recv One million bytes seems to be a little much for a buffer size, in my opinion. Maybe if you were to change it to something more reasonable, it might make a difference. Perhaps 100000 or lower?
  23. Tried to move your 1469 lines of code into a codebox but that fails for some reson, so attached it You really need to spent a little more time to explain your issues as wading through that many lines would make it pretty impossible. Jos source.au3
  24. Use the ID (handle) of your GUI. With all the testing I've done, I have never had this problem or error. Mind if I ask what kind of data is being received? I would need some way to reproduce it also. What version of Autoit are you using? And, 32 or 64 Bit? Not sure if I understand what you want to do here. The browser initiates the connection to the remote site. Once connected, the data is passed back and forth encrypted in such a way that only the browser and the remote site can decipher -- unless you are using it some other way.
  25. Not really my area of expertise. Jos
  26. You are welcome Have a look to this link: https://msdn.microsoft.com/en-us/library/aa752084(v=vs.85).aspx
  1. Load more activity