Jump to content

ProgAndy

MVPs
  • Posts

    2,483
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by ProgAndy

  1. If you want / have to use Python for most of your code, and mouse clicks are not enough, then you could have a look at pywinauto or try to create a ctypes wrapper for AutoItX.dll.
  2. The COM specification does not allow overloaded methods, so you cannot do that.
  3. I know why my UDF does not work with your file. First, it creates an array which can hold all available fields as single records, afterwards it adds a column if required and does not reduce allocated space in the first dimension. This is done only at the very end.To fix that, you'll have to cut down the record count of the array when adding an additional column which forces some more error checking in return. Edit: improved wording. I have a fixed version and currently am running some tests with openURL routing data.
  4. For SQLite you need to copy a DLL in the same folder as your script and use it with SQLite.au3, examples are in the helpfile.The current DLLs compiled for AutoIt can be found here: 32bit, 64bit
  5. Why don't you import all data in an SQLite database? This should be faster than anythin you could write in AutoIt once you created the initial database file.
  6. If you want to use the supplied filename, you'll have to do the download with WinHTTP I think. - open session - connect to server - request file - read headers - read data to file - close request, connection, and session
  7. I think your best option on linux is python with dogtail or ldtp
  8. Good question. I suggest you don't use MemoryDLLOpen/...Call/...Close anymore, but the MemLib-functions contained in this UDF. Something like this is better since we have DLLCallAddress: $hMod = MemLib_LoadLibrary(...) $pFunc = MemLib_GetProcAddress($hMod, "SomeFunc") $aRet = DLLCallAddress("int", $pFunc, "str", "param1", ...) MemLib_FreeLibrary($hMod)
  9. 0.0199695295556956 - ([[:xdigit:]]{32})h+*([^*?/|"<>[:cntrl:]]+) This pattern only accepts at least one space and one star as delimiter. Replace h+* with h*[ *|] for horizontal whitespace followed by space, star or pipe.
  10. You could also use ([[:xdigit:]]{32}) I think. It might be slightly faster since it is a predefined character class.
  11. If you cannot set up a database server, then sqlite would be a good choice I guess. MS Access files are not designed for concurrent write access. If you only read, then it should be acceptable, though. MySQL is one server based solution, MS SQL Express another. (WAMP contains Apache, MySQL and PHP)
  12. If you need only MySQL that is overkill. If you are in a corporate network, there could already exist a MS SQL server, so you could try to use it or install your own MS SQL express server. When you are already using Access, the MS server is a better choice since it integrates seamlessly with it.
  13. You have to count all characters for the minimum length. 4 digits + 1 decimal mark + 4 digits = 9 chars stringformat("%09.4f",round(timerdiff($time)/1000,4))
  14. The boundary is not different from the standards, but the boundary set in the header must have 2 hyphens less at the beginning than used in the body. Fields are separated with newline, two hyphens, boundary, newline Here is a working example (if the api of the website wasn't changed)
  15. Here is my take on the functions
  16. You'll have to connect to the https port if you want to send ssl requests. The helpfile should contain examples.
  17. I searched in my scripts and found this. It won't work well if the last message is wider than the window, though. Func _HTMLayout_ScrollToEnd($he) ; Author: ProgAndy ; scrolls the end of the given html element into view. Local $cnt = _HTMLayoutGetChildrenCount($he) If $fScrollDown And $cnt Then Local $c = _HTMLayoutGetNthChild($he, $cnt - 1) _HTMLayoutScrollToView($c, 0x11) _HTMLayout_UnuseElement($c) EndIf EndFunc ;==>_HTMLayout_ScrollToEnd ; Example: Local $root = _HTMLayoutGetRootElement($hHTMLLayout) Local $body = _HTMLayoutGetNthChild($root, 1) _HTMLayout_UnuseElement($root) _HTMLayoutSetElementHtml($body, BinaryToString(StringToBinary($sEntry, 4), 1), -1, $SIH_APPEND_AFTER_LAST) ; append utf-8 encoded string _HTMLayout_ScrollToEnd($body) _HTMLayout_UnuseElement($body)
  18. Execute the command and fetch the result, I think like this: _MySQL_Real_Query _MySQL_Store_Result $result = _MySQL_Fetch_Row_StringArray $count = $result[0] _MySQL_Free_Result
  19. I would create an element with an ID at the end of the page and the scroll to this id. I know that's possible but I forgot the commands to do so. @davidkim: Did you save that file as utf and added the charset to the headers or something like that?
  20. Do you mean something like this? SELECT COUNT(*) FROM db WHERE field=value
  21. You are both right. I just went for a quick and dirty solution in C and did not read the post completely. A buffer supplied per parameter (plain C), or string objects (when using C++) are the better choice.
  22. I don't like domain sniping and you won't get around ICANN's Redemption Grace Period.
  23. If you want to return a string you have to globally allocate the required memory and free it if you have finished using it, e.g. use malloc / free: char *szFileName = (char*) malloc(MAX_PATH+1); ... free(szReturnedPath);
  24. It can be really useful if you are trying to do some changes in a line while keeping a backup of the original line. I also found me using it when adding data in a 2D-array. Write the variable and the brackets, then duplicate the line and fill in the data. Here are some shortcuts for common editors and a macro for VS: http://stackoverflow.com/questions/2279000/visual-studio-short-cut-key-duplicate-line
×
×
  • Create New...