Jump to content

_IEFormElement...


AlmarM
 Share

Recommended Posts

Hello,

Does anyone see whats the problem here?

$Read_Title = GUICtrlRead($TopicTitle)
$Read_Desc = GUICtrlRead($TopicDesc)
$Read_Post = GUICtrlRead($TextForPost)
$oIE = _IECreate("http://www.autoitscript.com/forum/index.php?act=post&do=new_post&f=2")
$oTitle = _IEFormElementGetObjByName($oIE, "TopicTitle")
$oDesc = _IEFormElementGetObjByName($oIE, "TopicDesc")
$oPost = _IEFormElementGetObjByName($oIE, "Post")
_IEFormElementSetValue($oTitle, $Read_Title)
_IEFormElementSetValue($oDesc, $Read_Desc)
_IEFormElementSetValue($oPost, $Read_Post)

My error

>"C:\Program Files\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Documents and Settings\Gortstraat_41\Bureaublad\Script\iPost AutoIt (General).au3"    
--> IE.au3 V2.4-0 Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidObjectType
--> IE.au3 V2.4-0 Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidObjectType
--> IE.au3 V2.4-0 Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidObjectType
--> IE.au3 V2.4-0 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataType
--> IE.au3 V2.4-0 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataType
--> IE.au3 V2.4-0 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataType
>Exit code: 0   Time: 34.511

AlmarM

Edited by AlmarM

Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Link to comment
Share on other sites

Hmmm, nobody?

I think this isn't a error but im doing something wrong?

Can anybody help me some more?

AlmarM

Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Link to comment
Share on other sites

Hello,

Does anyone see whats the problem here?

$Read_Title = GUICtrlRead($TopicTitle)
$Read_Desc = GUICtrlRead($TopicDesc)
$Read_Post = GUICtrlRead($TextForPost)
$oIE = _IECreate("http://www.autoitscript.com/forum/index.php?act=post&do=new_post&f=2")
$oTitle = _IEFormElementGetObjByName($oIE, "TopicTitle")
$oDesc = _IEFormElementGetObjByName($oIE, "TopicDesc")
$oPost = _IEFormElementGetObjByName($oIE, "Post")
_IEFormElementSetValue($oTitle, $Read_Title)
_IEFormElementSetValue($oDesc, $Read_Desc)
_IEFormElementSetValue($oPost, $Read_Post)

My error

>"C:\Program Files\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Documents and Settings\Gortstraat_41\Bureaublad\Script\iPost AutoIt (General).au3"    
--> IE.au3 V2.4-0 Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidObjectType
--> IE.au3 V2.4-0 Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidObjectType
--> IE.au3 V2.4-0 Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidObjectType
--> IE.au3 V2.4-0 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataType
--> IE.au3 V2.4-0 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataType
--> IE.au3 V2.4-0 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataType
>Exit code: 0   Time: 34.511

AlmarM

Did you examine those objects with DebugBar or something similar?

Shouldn't there be a Form reference before you get down to those objects in $oForm instead of $oIE?

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Hmmm, im trying to create a program that can post a post in General Help and Support.

#include <IE.au3>
#AutoIt3Wrapper_Version = 1.0
#AutoIt3Wrapper_Outfile = iPost.exe

Global $Bitmap = 0x0080
Global $Scroll = 0x0040

$GUI = GUICreate("iPost AutoIt (General) v1.0", 380, 540)
GUICtrlCreateLabel("Topic Title", 10, 10)
GUICtrlCreateLabel("Topic Description", 10, 33)
$TopicTitle = GUICtrlCreateInput("", 120, 7, 250, 20)
$TopicDesc = GUICtrlCreateInput("", 120, 30, 250, 20)
$Insert_Img = GUICtrlCreateButton("", 10, 60, 22, 22, $Bitmap)
$Insert_Link = GUICtrlCreateButton("", 40, 60, 22, 22, $Bitmap)
$Insert_Quote = GUICtrlCreateButton("", 70, 60, 22, 22, $Bitmap)
$Insert_AutoIt = GUICtrlCreateButton("", 100, 60, 22, 22, $Bitmap)
$Insert_b = GUICtrlCreateButton("", 130, 60, 22, 22, $Bitmap)
$Insert_i = GUICtrlCreateButton("", 160, 60, 22, 22, $Bitmap)
$Insert_u = GUICtrlCreateButton("", 190, 60, 22, 22, $Bitmap)
$TextForPost = GUICtrlCreateEdit("", 10, 90, 360, 400)
$Post = GUICtrlCreateButton("Post Topic", 10, 500, 80, 30)
$Preview = GUICtrlCreateButton("Preview Post", 290, 500, 80, 30)

GUICtrlSetImage($Insert_Img, @ScriptDir & "\Pictures\Image_Pic.bmp")
GUICtrlSetImage($Insert_Link, @ScriptDir & "\Pictures\Link_Pic.bmp")
GUICtrlSetImage($Insert_Quote, @ScriptDir & "\Pictures\Quote_Pic.bmp")
GUICtrlSetImage($Insert_AutoIt, @ScriptDir & "\Pictures\AutoIt_Pic.bmp")
GUICtrlSetImage($Insert_b, @ScriptDir & "\Pictures\b_Pic.bmp")
GUICtrlSetImage($Insert_i, @ScriptDir & "\Pictures\i_Pic.bmp")
GUICtrlSetImage($Insert_u, @ScriptDir & "\Pictures\u_Pic.bmp")
GUICtrlSetLimit($TopicTitle, 150)
GUICtrlSetLimit($TopicDesc, 150)

GUISetState()
While 1
    $nMsg = GUIGetMsg()
    Select
    Case $nMsg = -3
        Exit
    Case $nMsg = $Insert_Img
        $Path_Img = InputBox("", "Please enter the URL for this image.")
        GUICtrlSetData($TextForPost, "[img]" & $Path_Img & "[/img]", "|")
    Case $nMsg = $Insert_Link
        $Path_Link = InputBox("", "Please enter the IRL for this link.", "http://")
        $Title = InputBox("", "Please enter the Title.")
        GUICtrlSetData($TextForPost, '[url="' & $Path_Link & '"]' & $Title & '[/url]', "|")
    Case $nMsg = $Insert_Quote
        GUICtrlSetData($TextForPost, "[quote][/quote]", "|")
    Case $nMsg = $Insert_AutoIt
        GUICtrlSetData($TextForPost, "[autoit][/autoit]", "|")
    Case $nMsg = $Insert_b
        GUICtrlSetData($TextForPost, "[b][/b]", "|")
    Case $nMsg = $Insert_i
        GUICtrlSetData($TextForPost, "[i][/i]", "|")
    Case $nMsg = $Insert_u
        GUICtrlSetData($TextForPost, "[u][/u]", "|")
    Case $nMsg = $Post
        $Read_Title = GUICtrlRead($TopicTitle)
        $Read_Desc = GUICtrlRead($TopicDesc)
        $Read_Post = GUICtrlRead($TextForPost)
        $oIE = _IECreate("http://www.autoitscript.com/forum/index.php?act=post&do=new_post&f=2")
        WinWaitActive("AutoIt Forums -> Posting New Topic - Windows Internet Explorer")
        $oTT = _IEFormGetObjByName($oIE, "TopicTitle")
        $oTD = _IEFormGetObjByName($oIE, "TopicDesc")
        $oP = _IEFormGetObjByName($oIE, "Post")
        $oTitle = _IEFormElementGetObjByName($oTT, "Topic Title")
        $oDesc = _IEFormElementGetObjByName($oTD, "Topic Description")
        $oPost = _IEFormElementGetObjByName($oP, "")
        _IEFormElementSetValue($oTitle, $Read_Title)
        _IEFormElementSetValue($oDesc, $Read_Desc)
        _IEFormElementSetValue($oPost, $Read_Post)
    EndSelect
WEnd

Whats wrong?

AlmarM

Edited by AlmarM

Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Link to comment
Share on other sites

Hmmm, im trying to create a program that can post a post in General Help and Support.

Whats wrong?

AlmarM

Hmmm, let's try that again:

Did you examine those objects with DebugBar or something similar?

Shouldn't there be a Form reference before you get down to those objects in $oForm instead of $oIE?

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Hi AlmarM,

Please create descriptive topics.

Using one word topics makes it really difficult to use the search feature, and those that could probably answer your question will probably not even read your thread.

Doing it enough could cause your posting privileges to be taken away all together, and we don't want that :) .

Thanks.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...