Jump to content

Embeded IE into GUI


Recommended Posts

Im working on a bot for gaia online, and I embeded the IE window into the GUI, but the IE.au3 functions dont seem to like the embeded IE :whistle:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;              Emit               ;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;Origonal 'post bot' by Codemyster;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#include <IE.au3>
#include <GUIConstants.au3>
;+++++++++++++++++++++++++++++++++++++++++++++
$gui = GUICreate("Gaia Online Bot .~*BETA*~.", 800, 600, 0, 0);375, 170, -1, -1
;+++++++++++++++++++++++++++++++++++++++++++++
#comments-start
FileInstall( "C:\Documents and Settings\Vivvic\Desktop\Codeing\Gaia\project\avatar_guest.gif" , "./" )
guictrlcreatepic("C:\Documents and Settings\Vivvic\Desktop\Codeing\Gaia\project\avatar_guest.gif" , 615 , 50 )
guictrlsetstate( -1, $GUI_DISABLE)
#comments-end
;+++++++++++++++++++++++++++++++++++++++++++++
$Embed = _IEcreateEmbedded ()
$Embed.document.body.scroll = "yes"
$gui = $Embed
;+++++++++++++++++++++++++++++++++++++++++++++
;$feedbackmenu = GuiCtrlCreateMenu ("Feedback")
;$seperator = GuiCtrlCreateMenuitem ("",$feedbackmenu)
;$emiT = GuiCtrlCreateMenuitem ("Emit",$Feedbackmenu)
;$seperator1 = GuiCtrlCreateMenuitem ("",$feedbackmenu)
;+++++++++++++++++++++++++++++++++++++++++++++
;$Word_Bump_bot= GUICtrlCreateButton("Word Bump", 645, 410, 150, 30)
;$Gaia_Slot_bot= GUICtrlCreateButton("Gaia Slots Bot", 645, 445, 150, 30)
;$Lurk_bot= GUICtrlCreateButton("Gaia Lurk Bot", 645, 480, 150, 30)
$Post_bot= GUICtrlCreateButton("<^*~*~*Gaia Post Bot*~*~*^>", 645, 515, 150, 30)
;$Fishing_bot= "coming soon"
;$Marketplace_bot= "coming soon"
$STOP= GUICtrlCreateButton("STOP", 645, 550, 150, 30)
;+++++++++++++++++++++++++++++++++++++++++++++
$Username = GUICtrlCreateInput("", 700, 15, 95, 18, -1, $WS_EX_CLIENTEDGE)
GUICtrlCreateLabel("Username:", 645, 15, 50, 15)
$Password = GUICtrlCreateInput("", 700, 40, 95, 18, -1, $WS_EX_CLIENTEDGE)
GUICtrlCreateLabel("Password:", 645, 40, 50, 15)
$Message = "*Bump*"
;+++++++++++++++++++++++++++++++++++++++++++++
GUICtrlCreateObj($Embed, 5, 5, 635, 570)
$Embed.navigate ("http://gaiaonline.com")
;+++++++++++++++++++++++++++++++++++++++++++++
GuiSetState ()
    While 1
        $msg = GUIGetMsg()
            Select
;+++++++++++++++++++++++++++++++++++++++++++++
            Case $msg = $STOP
                $Loop = 0
;+++++++++++++++++++++++++++++++++++++++++++++
#comments-start
;+++++++++++++++++++++++++++++++++++++++++++++
            Case $msg = $Fishing_bot
;+++++++++++++++++++++++++++++++++++++++++++++
            Case $msg = $Marketplace_bot
;+++++++++++++++++++++++++++++++++++++++++++++
            Case $msg = $emiT
                MsgBox(0, "Feedback", "Feel free to" & @CRLF & "email feedback to" & @CRLF & "Emit@30gigs.com")
;+++++++++++++++++++++++++++++++++++++++++++++
            Case $msg = $Gaia_Slot_bot
                $Loop = 1
                Do
                    
                Until $Loop = 0
;+++++++++++++++++++++++++++++++++++++++++++++
            Case $msg = $Word_Bump_bot
                $Embed.navigate ("http://www.gaiaonline.com/games/launch.php?g=wordbump")
;+++++++++++++++++++++++++++++++++++++++++++++
            Case $msg = $Lurk_bot
                $Loop = 1
                $time = 12000
                Do
                    
                Until $Loop = 0             
;+++++++++++++++++++++++++++++++++++++++++++++
#comments-end
;+++++++++++++++++++++++++++++++++++++++++++++
            Case $msg = $Post_bot
                ;$Bump_NUM = 0
                ;$Bump_NUM = $Bump_NUM + 1
                $loop = 1
                $Bump_NUM = 0
                $TopicNumber = "15949257"
                $PostNumber = ""
                $var        =  ""
                $var2      =  ""
                Dim $Thread[4]  = ["http://gaiaonline.com/forum/viewtopic.php?t=" & $TopicNumber,"http://www.gaiaonline.com/forum/posting.php?mode=edit&p=" & $PostNumber,"http://www.gaiaonline.com/forum/posting.php?mode=reply&tc=1&t=" & $TopicNumber,"http://www.gaiaonline.com/forum/posting.php?mode=reply&tc=561&t=" & $TopicNumber]
                $Forum    =  "http://gaiaonline.com/forum/viewforum.php?f=23"
                $Main      =  "http://gaiaonline.com"
                $Exit      =  1
                $Gaia_login = "http://www.gaiaonline.com/gaia/login.php?"
                    $Embed.navigate ($Gaia_login)
                    Call("Process")
;+++++++++++++++++++++++++++++++++++++++++++++
            EndSelect
        If $msg = $GUI_EVENT_CLOSE Then ExitLoop
    Wend
;+++++++++++++++++++++++++++++++++++++++++++++
Func Begin()
    If $Exit = 1 Then
        $Exit = 0
        Global $Embed = $Embed.navigate ($Gaia_login, 0, 1, 1)
        Call("Process")
    EndIf
EndFunc
;+++++++++++++++++++++++++++++++++++++++++++++  
Func Process()
    Call("Login")
    Call("Post")
EndFunc
;+++++++++++++++++++++++++++++++++++++++++++++
Func Login()
    $Login = _IEFormGetObjByName($Embed,"loginForm")
    $User = _IEFormElementGetObjByName($Login,"username")
    $Pass = _IEFormElementGetObjByName($Login,"password")
    _IEFormElementSetValue($User,$Username)
    _IEFormElementSetValue($Pass,$Password)
    _IEFormSubmit($Login)
    $var2 = _IEPropertyGet($Embed,"locationurl")
    $var = "&" & StringMid($var2,37, 9999)
EndFunc
;+++++++++++++++++++++++++++++++++++++++++++++
Func Logout()
    _IENavigate($Embed,$Main)
    _IELinkClickByText($Embed,"Logout")
EndFunc
;+++++++++++++++++++++++++++++++++++++++++++++
Func Post()
    While $Loop = 1 ;And $Bump_NUM <= 200
        _IENavigate($Embed,$Thread[2] & $var)
        $Post = _IEFormGetObjByName($Embed,"post")
        $Mess = _IEFormElementGetObjByName($Post,"message")
        _IEFormElementSetValue($Mess,$Message)
        _IEFormImageClick ($Post,"Submit","alt")
        Sleep(55000)
                _IENavigate($Embed,$Thread[3] & $var)
        $Post = _IEFormGetObjByName($Embed,"post")
        $Mess = _IEFormElementGetObjByName($Post,"message")
        _IEFormElementSetValue($Mess,$Message)
        _IEFormImageClick ($Post,"Submit","alt")
        Sleep(45000)
    WEnd
EndFunc
;+++++++++++++++++++++++++++++++++++++++++++++
 Func start()
    Begin()
EndFunc
;+++++++++++++++++++++++++++++++++++++++++++++

Error:

C:\Documents and Settings\Vivvic\Desktop\Codeing\Gaia\Project\IE.au3(130,57) : ERROR: _IELinkClickByIndex(): undefined function.
    Return _IELinkClickByIndex($o_object, $i_index, $f_wait)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\Vivvic\Desktop\Codeing\Gaia\Project\IE.au3(134,69) : ERROR: _IELinkClickByText(): undefined function.
    Return _IELinkClickByText($o_object, $s_linkText, $i_index, $f_wait)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\Vivvic\Desktop\Codeing\Gaia\Project\IE.au3(138,31) : ERROR: _IEDocGetObj(): undefined function.
    Return _IEDocGetObj($o_object)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\Vivvic\Desktop\Codeing\Gaia\Project\IE.au3(142,71) : ERROR: _IEImgClick(): undefined function.
    Return _IEImgClick($o_object, $s_linkText, $s_mode, $i_index, $f_wait)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\Vivvic\Desktop\Codeing\Gaia\Project\IE.au3(146,46) : ERROR: _IEPropertyGet(): undefined function.
    Return _IEPropertyGet($o_object, $s_property)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\Vivvic\Desktop\Codeing\Gaia\Project\Gaia Online_TEST.au3(17,29) : ERROR: _IEcreateEmbedded(): undefined function.
$Embed = _IEcreateEmbedded ()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\Vivvic\Desktop\Codeing\Gaia\Project\Gaia Online_TEST.au3(113,52) : ERROR: _IEFormGetObjByName(): undefined function.
    $Login = _IEFormGetObjByName($Embed,"loginForm")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\Vivvic\Desktop\Codeing\Gaia\Project\Gaia Online_TEST.au3(114,57) : ERROR: _IEFormElementGetObjByName(): undefined function.
    $User = _IEFormElementGetObjByName($Login,"username")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\Vivvic\Desktop\Codeing\Gaia\Project\Gaia Online_TEST.au3(116,43) : ERROR: _IEFormElementSetValue(): undefined function.
    _IEFormElementSetValue($User,$Username)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\Vivvic\Desktop\Codeing\Gaia\Project\Gaia Online_TEST.au3(118,25) : ERROR: _IEFormSubmit(): undefined function.
    _IEFormSubmit($Login)
~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\Vivvic\Desktop\Codeing\Gaia\Project\Gaia Online_TEST.au3(124,29) : ERROR: _IENavigate(): undefined function.
    _IENavigate($Embed,$Main)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\Vivvic\Desktop\Codeing\Gaia\Project\Gaia Online_TEST.au3(134,48) : ERROR: _IEFormImageClick(): undefined function.
        _IEFormImageClick ($Post,"Submit","alt")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\Vivvic\Desktop\Codeing\Gaia\Project\Gaia Online_TEST.au3 - 12 error(s), 0 warning(s)
!>AU3Check ended.rc:2
>Running:(3.1.1.131):C:\Program Files\AutoIt3\beta\autoit3.exe "C:\Documents and Settings\Vivvic\Desktop\Codeing\Gaia\Project\Gaia Online_TEST.au3" 
--> IE.au3 Warning from function _IEFormGetObjByName, $_IEStatus_NoMatch
--> IE.au3 Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidDataType
--> IE.au3 Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidDataType
--> IE.au3 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataType
--> IE.au3 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataType
--> IE.au3 Error from function _IEFormSubmit, $_IEStatus_InvalidDataType

Thanks in advance

EDIT:If you need an account to test with on gaia I made one

Username:autoitforum

Password:autoit

~Vivvic~

Edited by Vivvic

[quote name='DaleHohm']You have a strange habit of posting error messages that don't match your code.[/quote][quote name='SmOke_N']Forget the learning... straight to the scripting :lol: (laugh.gif)[/quote]

Link to comment
Share on other sites

Hi,

works for me. Did you try beta?

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

Yes, I use beta, the program works up untill you click the "Gaia post bot" button

[quote name='DaleHohm']You have a strange habit of posting error messages that don't match your code.[/quote][quote name='SmOke_N']Forget the learning... straight to the scripting :lol: (laugh.gif)[/quote]

Link to comment
Share on other sites

Is, IE.au3 in the BETA include folder?

#include <IE.au3>
$PostThread = ""
$ReplyUrl = ""
$MessageToPost = ""

    $oIE_Post = _IECreate ($PostThread)
    
While 1
    _IEImgClick ($oIE_Post, $ReplyUrl)
    _IENavigate ($oIE_Post, "java script:emoticon('" & $MessageToPost & "')", 0)
    $Post = _IEFormGetObjByName ($oIE_Post, "post")
    _IEFormImageClick ($Post, "Submit", "alt")
    Sleep(50000)
WEnd

Mine does the same thing, and its simpler =P

Edited by AzKay
# MY LOVE FOR YOU... IS LIKE A TRUCK- #
Link to comment
Share on other sites

XD no, Ill fix that then try.

[quote name='DaleHohm']You have a strange habit of posting error messages that don't match your code.[/quote][quote name='SmOke_N']Forget the learning... straight to the scripting :lol: (laugh.gif)[/quote]

Link to comment
Share on other sites

Didnt make a difference >.< the gaia post bot button still dosnt function properly, not sure how to make IE.au3 stop looking for a window and look in the gui.

EDIT:TYPO

Edited by Vivvic

[quote name='DaleHohm']You have a strange habit of posting error messages that don't match your code.[/quote][quote name='SmOke_N']Forget the learning... straight to the scripting :lol: (laugh.gif)[/quote]

Link to comment
Share on other sites

><, Well, I dont really know, I dont use _IEEmbed, I just add a COM object, "Microsoft Web Browser", Does the same thing.

Edited by AzKay
# MY LOVE FOR YOU... IS LIKE A TRUCK- #
Link to comment
Share on other sites

Could you explain on that? Im new to this.

EDIT:

Well I got to go for a while, Im on test machine and it needs a format, maby dale will be on when i get back.

Thanks for the help though.^^

Edited by Vivvic

[quote name='DaleHohm']You have a strange habit of posting error messages that don't match your code.[/quote][quote name='SmOke_N']Forget the learning... straight to the scripting :lol: (laugh.gif)[/quote]

Link to comment
Share on other sites

In KODA, theres the 3 tabs Standard, and 2 others, on the 3rd one, theres COM Object, Add that, and in properties, you can choose which type of object, scroll through until you find "Microsoft Web Browser" then, add that, resize it, then use _IENavigate to navigate it.

# MY LOVE FOR YOU... IS LIKE A TRUCK- #
Link to comment
Share on other sites

The undefined function errors you are getting from IE.au3 indicate taht you are not using the latest version. Make certain that you have installed beta version 129 or higher and IE.au3 will be included.

Insert a call to the function _IE_VersionInfo() and it will display the IE.au3 version to the SciTe console (or that function will also be undefined if your version is old).

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

Well, Im on test machine and I just reformated it, so Ill be getting latest versons anyway, but the functions worked when the IE window wasnt embeded, anything extra I need to do to that?

[quote name='DaleHohm']You have a strange habit of posting error messages that don't match your code.[/quote][quote name='SmOke_N']Forget the learning... straight to the scripting :lol: (laugh.gif)[/quote]

Link to comment
Share on other sites

Well, Im on test machine and I just reformated it, so Ill be getting latest versons anyway, but the functions worked when the IE window wasnt embeded, anything extra I need to do to that?

You're getting Undefined Function errors -- that is not caused by the type of object you are controlling, the function is NOT DEFINED.

Most things you can do with a browser you can do with an embedded control -- the things you cannot should make sense, like turning on a status bar.

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

Well, is it declared correct in my script? I just installed the newest everything and still not functioning as it does when it uses a "rea" IE window.

[quote name='DaleHohm']You have a strange habit of posting error messages that don't match your code.[/quote][quote name='SmOke_N']Forget the learning... straight to the scripting :lol: (laugh.gif)[/quote]

Link to comment
Share on other sites

Insert a call to the function _IE_VersionInfo() and it will display the IE.au3 version to the SciTe console (or that function will also be undefined if your version is old).

It should be T2.0-5 or higher.

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

Where do I get the newest version? I thought http://www.autoitscript.com/forum/index.ph...ost&id=9432 was the newest but it says undefined function still >.<

[quote name='DaleHohm']You have a strange habit of posting error messages that don't match your code.[/quote][quote name='SmOke_N']Forget the learning... straight to the scripting :lol: (laugh.gif)[/quote]

Link to comment
Share on other sites

Ok just installed newest beta and confirmed latest version, execpt my script still fails to function properly and it still works if I use it on an IE window instead of my embeded GUI, which I would really like to do, here is the script mine derived from which is how mine is ment to work.

#include <IE.au3>
#include <GUIConstants.au3>

;HotKeySet("{F10}", togglepause )
;HotKeySet("{F11}", toggleHide())
;HotKeySet("{F12}", Stop())

Global $Euser
Global $Epass
Global $Emsg
$Username   =  GUICtrlRead($Euser)
$Password   =  GUICtrlRead($Epass)
$Message    =  GUICtrlRead($Emsg)
$TopicNumber = "13179136"
$PostNumber = ""
$sid        =  ""
$sid2      =  ""
Dim $Thread[4]  = ["http://gaiaonline.com/forum/viewtopic.php?t=" & $TopicNumber,"http://www.gaiaonline.com/forum/posting.php?mode=edit&p=" & $PostNumber,"http://www.gaiaonline.com/forum/posting.php?mode=reply&tc=1&t=" & $TopicNumber,"http://www.gaiaonline.com/forum/posting.php?mode=reply&tc=561&t=" & $TopicNumber]
$Forum    =  "http://gaiaonline.com/forum/viewforum.php?f=23"
$Main      =  "http://gaiaonline.com"
$Exit      =  1
$s_url = "http://www.gaiaonline.com/gaia/login.php?"

$gui = GUICreate("Gaia Post Bot", 200, 300, 150, 125)
$Euser = GUICtrlCreateInput("", 60, 5, 135, 18, -1, $WS_EX_CLIENTEDGE)
GUICtrlCreateLabel("Username:", 5, 5, 50, 15)
$Epass = GUICtrlCreateInput("", 60, 30, 135, 18, -1, $WS_EX_CLIENTEDGE)
GUICtrlCreateLabel("Password:", 5, 30, 50, 15)
$Emsg = GUICtrlCreateEdit("", 5, 80, 190, 185, -1, $ES_WANTRETURN)
GUICtrlCreateLabel("Message:", 5, 55, 50, 15)
$Submit = GUICtrlCreateButton("Start", 5, 270, 190)
GUISetState(@SW_SHOW)
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case $msg = $Submit
        GUISetState(@SW_hide, $gui)
        Begin()
        
    Case Else
        $Username   =  GUICtrlRead($Euser)
        $Password   =  GUICtrlRead($Epass)
        $Message    =  GUICtrlRead($Emsg)
       ;;;;;;;
    EndSelect
WEnd
Exit



While $Exit = 1
    Sleep(100)
WEnd

Func Begin()
    If $Exit = 1 Then
        $Exit = 0
        Global $IE = _IECreate($S_url, 0, 1, 1)
        Call("Prog")
    EndIf
EndFunc

Func Stop()
    $Exit = 1
Endfunc
    
Func Prog()
    Call("Login")
    Call("Post")
EndFunc

Func Login()
    $Login = _IEFormGetObjByName($IE,"loginForm")
    $User = _IEFormElementGetObjByName($Login,"username")
    $Pass = _IEFormElementGetObjByName($Login,"password")
    _IEFormElementSetValue($User,$Username)
    _IEFormElementSetValue($Pass,$Password)
    _IEFormSubmit($Login)
    $sid2 = _IEPropertyGet($IE,"locationurl")
    $sid = "&" & StringMid($sid2,37, 9999)
EndFunc
    
Func Logout()
    _IENavigate($IE,$Main)
    _IELinkClickByText($IE,"Logout")
EndFunc

Func Post()
    While $Exit = 0
        _IENavigate($IE,$Thread[2] & $sid)
        $Post = _IEFormGetObjByName($IE,"post")
        $Mess = _IEFormElementGetObjByName($Post,"message")
        _IEFormElementSetValue($Mess,$Message)
        _IEFormImageClick ($Post,"Submit","alt")
        Sleep(45000)
                _IENavigate($IE,$Thread[3] & $sid)
        $Post = _IEFormGetObjByName($IE,"post")
        $Mess = _IEFormElementGetObjByName($Post,"message")
        _IEFormElementSetValue($Mess,$Message)
        _IEFormImageClick ($Post,"Submit","alt")
        Sleep(45000)
    WEnd
EndFunc
 Func start()
     Begin()
     EndFunc

If you would like to test and donot have a gaia online account I made a test account.

Username:autoitforum

Password:autoit

P.S. Codemyster wrote the origonal script.

EDIT:Missed a bracket ]

Edited by Vivvic

[quote name='DaleHohm']You have a strange habit of posting error messages that don't match your code.[/quote][quote name='SmOke_N']Forget the learning... straight to the scripting :lol: (laugh.gif)[/quote]

Link to comment
Share on other sites

I see no embedded GUI in that code.

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

The embeded is in the first post, that last post I made was the script I was trying to get to work in the first post, any idea why it wont work?

[quote name='DaleHohm']You have a strange habit of posting error messages that don't match your code.[/quote][quote name='SmOke_N']Forget the learning... straight to the scripting :lol: (laugh.gif)[/quote]

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...