
martijn
Active Members-
Posts
26 -
Joined
-
Last visited
Everything posted by martijn
-
It's a shame I didn't see that this script does allow to connect to a server with a ssl-portnumber (443), but that it doesn't support ssl-communication. In other words: it's sending a http request over port 443, where in fact it should send a https-request (ssl encrypted) over port 443. That is not implemented. I suggest to use something like Automation. I've illustrated with a little example: #include <IE.au3> Dim $oIE, $o_form, $o_from, $o_to, $o_msg, $o_terms, $b_showbrowser = true Dim $from = "Joe", $to = "3334445555", $msg = "Hi again" ; Create a browser window and navigate to tool $url = "https://wmg.tmomail.net/customer_site/jsp/messaging_lo.jsp" $oIE = _IECreate ($url, 0, $b_showbrowser) ; get pointers to the form and from, to, message and terms fields $o_form = _IEFormGetObjByName ($oIE, "message_form") $o_from = _IEFormElementGetObjByName ($o_form, "require_sender") $o_to = _IEFormElementGetObjByName ($o_form, "min") $o_msg = _IEFormElementGetObjByName ($o_form, "text") _IEFormElementCheckBoxSelect($o_form, 0, "", 1, "byIndex") ; Set field values and submit the form _IEFormElementSetValue ($o_from, $from) _IEFormElementSetValue ($o_to, $to) _IEFormElementSetValue ($o_msg, $msg) _IEFormSubmit ($o_form) _IELoadWait($oIE) _IEQuit ($oIE) Ofcourse, uncomment the IEQuit to see the result of this code ;-) Works for me
-
I've tried the url in a browser from above code example, but it gives me a 404-not found-message. So HTTP UDF *does* seem to work, but you are probably using the wrong url. Edit: the 404-error could be generated by the php-file
-
For https you have to add an extra parameter to the _HTTPConnect-function call. Instead of _HTTPConnect("www.yourserver.com"), make it _HTTPConnect("www.yourserver.com",443) 443 is the default port number for ssl
-
Access violation with Koda FormDesigner 1.6.0.2
martijn replied to martijn's topic in AutoIt General Help and Support
Thanks guys. Moved the topic here as suggested by Jos. -
Access violation with Koda FormDesigner 1.6.0.2 (unable to save form after modifications) I originally posted here, but then was suggested to place it here. I'm working with Koda FormDesigner 1.6.0.2 (not using SciTE mode) and after making some changes (copying multiple controls like a groupbox with textbox and a inputbox and changing their names) I am no longer able to save the form. I get the following message Access violation at address 00403B00 in module 'FD.exe'. Read of address FFFFFFDC Generating code is still possible, but I can't save the kxf-file. It's a simple form with a Tabbed Panel, two tabsheets, two groupboxes, three textboxes, labels and two buttons. Any ideas Btw, I was able to save the form by creating a new form and copying all controls over, but unable to reproduce the error.
-
I'm working with Koda FormDesigner 1.6.0.2 (not using SciTE mode) and after making some changes (copying multiple controls like a textbox and a inputbox, changing their names) I am no longer able to save the form. I get the following message Access violation at address 00403B00 in module 'FD.exe'. Read of address FFFFFFDC Generating code is still possible, but I can't save the kxf-file. It's a simple form with a Tabbed Panel, two tabsheets, two groupboxes, three textboxes, labels and two buttons. Any ideas Edit: I was able to save the form by creating a new form and copying all controls over.
-
I've just begun playing around with your script and have a few suggestions: 1. Change "Dim $recv = TCPRecv($socket,16)" into "Dim $recv = TCPRecv($socket,4096)" to speed things up (especially when receiving larger files) 2. I'm unable to use this at work due to proxy settings (TCPConnect doesn't like the proxy). Is it possible to add such settings? 3. How about adding a referrer to the _HTTPPost and _HTTPGet 4. It would be nice if the _HTTPSetUserAgent would accept an array of values (*) (*) My useragent is built out of 3 products and 1 comment: "Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7". Here's a link to the 2616RFC Other than that it's excellent and perfectly suits my needs
-
After more searching I found this thread, explaining two ways that work and two ways that don't. Good luck
-
I noticed the same thing and have been struggling for hours. Read more about that here. I wonder if (read: 'hope that') someone will write a fix / working example using IE.au3 soon.
-
POST-data in proper SAFEARRAY Data Type Structure
martijn replied to martijn's topic in AutoIt General Help and Support
In the original POST from IE I see a Content-Length header that has a value of 22. But in my post it reports as having a length of 16. It seems that every element in the $postdata array takes up 16 bytes in the final POST-request. After googling around, I'm almost convinced that I should send a byte array as parameter. How the -bleep- should I do that? -
POST-data in proper SAFEARRAY Data Type Structure
martijn replied to martijn's topic in AutoIt General Help and Support
Added Referer and Content-Type to the http-headers. Still missing the POST-data in a HTTP Sniffer #include <IE.au3> #include <array.au3> #include <GUIConstants.au3> Dim $postdata[1] $posturl = "http://www.server.com/process.php" $postdata[0] = "a=do&b=know&c=how&d=to&e=set&f=this&g=properly" $headerdata = "Content-Type: application/x-www-form-urlencoded" & Chr(13) & _ "Referer: http://www.server.com/process.php" $oInternet = _IECreate() $oInternet.navigate($posturl,"","",$postdata,$headerdata) Anyone? -
Yeah! I was afraid there wasn't going to be anymore, but it doesn't seem to stop! This really is fun reading and I can't wait for the next reply OMG I missed it again...... "seppuku" hahahaha P.S. Thanks for sharing SmOke_N
-
You can use the navigate function, as I tried. The only problem is that I don't know how to send the POST-data as the proper parameter for the function. I wrote a small code snippet for testing purposes (change the url to suite your needs)
-
So close, but..... I'm trying to send a POST to a url, but failed in passing the right parameter into the navigate function for the POST-data. I've read that AutoIt converts objects or variables to safearrays automatically, but what should the autoit-variable look like in order to get an automatically converted safearray, that matches the following description (taken from above url): Edit: Here's the code snippet that I currently use for testing purposes (no valid url)#include <IE.au3> #include <array.au3> #include <GUIConstants.au3> Dim $url, $postdata $url = "http://www.server.com/process.php" $postdata = "a=dont&b=know&c=how&d=to&e=set&f=this&g=properly" $oInternet = _IECreate($url,False,True) $oInternet.navigate($url,"","",$postdata) _IELoadWait($oInternet) I'v tried passing the following variables, but they all seem to fail in passing the proper values: Dim $postdata[1] $postdata[0] = "var1=on&id=12" Dim $postdata[2] $postdata[1] = "2" $postdata[0] = "var1=on&id=12" Dim $postdata $postdata = "var1=on&id=12" Dim $postdata $postdata[13] = ["v","a","r","1","=","o","n","&","i","d","=","1","2"] If someone can give me information how to solve this, I would be very greatfull
-
Pfffft, Proudness can hold people back
martijn replied to Starf0x's topic in AutoIt General Help and Support
I've been trying to set checkboxes by name all day long and finally came to the conclusion that it must a bug in _IEFormElementCheckboxSelect(). I've succeeded by applying a home made patch I would love to hear your ideas about or experience with this possible bugfix. Here's the story: After studying the _IEFormElementCheckboxSelect function I noticed two things considering the above code-example. The syntax in the above example should have been like this _IEFormElementCheckboxSelect ($oForm, "[b]on[/b]", "[b]9961946[/b]", 1, "byValue")oÝ÷ Ù·jë¢[r¥oÝ÷ Ú)í¡«¢+ØÀÌØí½%ѵÌôáÕÑ ÅÕ½ÐìÀÌØí½}½©Ð¹±µ¹ÑÌ ÌäìÅÕ½ÐìµÀìÀÌØíÍ}9µµÀìÅÕ½ÐìÌäì¤ÅÕ½Ðì¤oÝ÷ ÚÊ"µÆ§ën®w!yÉ£¬Â+a¶zÈ«yÙÚà'u§]yÛ(ç(uæµê÷ô&¬z«¨µ¼j[ªê-ßÖ§wBjǪº[ÈÝ{®¢Ýýjëh×6If ObjName($oItems) = "DispHTMLInputElement" Then ; not all code displayed here, see attachment for full code to detect whether it found one or more checkboxes Here's my IE.au3 file (not thouroughly tested though) IE.au3.zip If I messed things up, please be gentle with me Info: I'm using AutoIt V3 with SciTE v1.71 and an English Internet Explorer version 6.0.3790.1830 with SP1 installed on a Windows 2003 server. -
Dutch translation available lang_dut.xml Koda rules, thanks guys
-
RegExp - has anyone seen this library before?
martijn replied to sohfeyr's topic in AutoIt Technical Discussion
No problemo -
RegExp - has anyone seen this library before?
martijn replied to sohfeyr's topic in AutoIt Technical Discussion
Excellent timing: I'm in the middle of parsing html-files with a billion StringInStr, StringLeft, StringMid, etc. So if you have an executable that I can work with, please let me know. I would really like to replace all the searching with a few regular expressions. -
RegExp - has anyone seen this library before?
martijn replied to sohfeyr's topic in AutoIt Technical Discussion
I would *love* to test this in a beta release -
This seems to be a bug in the StringRegExp function
-
Thank you for your reply, but my question was about the use of StringRegExp. I need more complex regular expressions, but to start with I used a simple script. This 'simple script' already gives me headaches. Can someone please explain why I does not match a simple <td> in my second code sample? I thought that a ? would limit the 'greediness' and return the smallest match possible. And in combination with a * (none or more matches) it expect it to return items with no matches as well. So both <td class="..."> and <td>. Many thanks in advance Edit: I've tried your script, but that doesn't work either. Here's the code I used #Include <array.au3> $text = "<td remark=this one shows up><td><td remark=and this one too><td><table><td question=but the empty td's don't show>" $arr = _SRE_BetweenEX($text, '<td', '>') _ArrayDisplay($arr, 'Array') Func _SRE_BetweenEX($s_String, $s_Start, $s_End, $iCase = 'i') If $iCase <> 'i' Then $iCase = '' $a_Array = StringRegExp ($s_String, '(?' & $iCase & _ ':' & $s_Start & ')(.*?)(?' & $iCase & _ ':' & $s_End & ')', 3) If @extended & IsArray($a_Array) Then Return $a_Array Return SetError(1, 0, 0) EndFunc ;==>_SRE_BetweenEX
-
I use the following script to parse an html file: $arr = StringRegExp($text,"(<td.*?>|<td>)",3) and that works. But if I use $arr = StringRegExp($text,"(<td.*?>)",3) it does not work. It leaves out the <td> ? Can anyone explain?