-
Posts
2,483 -
Joined
-
Last visited
-
Days Won
5
Content Type
Forums
Downloads
Forum Articles
Events
Everything posted by ProgAndy
-
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.
-
The COM specification does not allow overloaded methods, so you cannot do that.
-
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.
-
InetGet - Get File Name from HTTP Header
ProgAndy replied to mgeorg's topic in AutoIt General Help and Support
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 -
Is autoit compatible with Linux?
ProgAndy replied to xuzo's topic in AutoIt General Help and Support
I think your best option on linux is python with dogtail or ldtp -
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)
-
Parsing a .md5 checksum file
ProgAndy replied to guinness's topic in AutoIt General Help and Support
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. -
Parsing a .md5 checksum file
ProgAndy replied to guinness's topic in AutoIt General Help and Support
You could also use ([[:xdigit:]]{32}) I think. It might be slightly faster since it is a predefined character class. -
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)
-
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.
-
Cannot send POST request with WinHttp functions
ProgAndy replied to W2lkm2n's topic in AutoIt General Help and Support
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) -
Here is my take on the functions
-
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)
-
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
-
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?
-
Do you mean something like this? SELECT COUNT(*) FROM db WHERE field=value
-
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.
-
Anyone tried Extensible Provisioning Protocol yet?
ProgAndy replied to themadman's topic in AutoIt General Help and Support
I don't like domain sniping and you won't get around ICANN's Redemption Grace Period. -
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);
-
How can I get number from binary
ProgAndy replied to lesmly's topic in AutoIt General Help and Support
you got that right. -
SciTE's Ctrl-D keybind for Visual Studio?
ProgAndy replied to Info's topic in AutoIt Technical Discussion
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