Re: autoit3a.exe has encounter a problem and needs to close
"t1ppex" <[email protected]> Sun, 05 Aug 2007 11:18:24 -0000
| Newsgroups | gmane.comp.windows.autoit.user |
|---|---|
| Message-ID | <[email protected]> |
I found it was an AutoIT bug caused by having the following directive:
#AutoIT3Wrapper_UseAnsi=y
in the header section of my script.
Commenting this out allows the script to work successfully.
Please can anyone let me know the disadvantages of leaving out Ansi
support?
Below is the script used to discover the bug:
; *******************************************************
;<HTML>
; <HEAD>
; <TITLE>Test Form</TITLE>
; </HEAD>
; <BODY>
; <FORM ACTION="action.asp" METHOD="POST" Name="dataform">
; <INPUT TYPE="HIDDEN" NAME="RefNo" VALUE="N09999">
;<TABLE WIDTH="100%" BORDER="1" ALIGN="CENTER">
; <TR>
; <TD ALIGN="RIGHT">
; <B>If input value = "" and #AutoIt3Wrapper_UseAnsi=y then
AutoIT crashes when querying it</B>
; </TD>
; <TD COLSPAN="5" WIDTH="40%">
; <INPUT TYPE="TEXT" NAME="Data4" SIZE="55" MAXLENGTH="55"
VALUE="">
; </TD>
; </TR>
;</TABLE>
; </FORM>
; </BODY>
;</HTML>
; *******************************************************
;
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_icon=C:\Program Files\AutoIt3\Icons\filetype2.ico
#AutoIt3Wrapper_UseAnsi=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <IE.au3>
$oIE = _IEAttach("Test Form")
$oForm = _IEFormGetObjByName ($oIE, "dataform")
$oText = _IEFormElementGetObjByName ($oForm, "Data4")
MsgBox(0, "Form Element Value", _IEFormElementGetValue ($oText))