Sign in to follow this  
Followers 0
kenzu

Help with gaia forum poster

2 posts in this topic

Hi, i edited gaia forum poster for my forum. I want to use this tool to post my in-game bans on the forum, but the message i write in the message field is not inserted in internet explorer..

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

$gui = GUICreate("Gaia forum poster", 357, 419, 192, 125)
$Euser = GUICtrlCreateInput("Username", 64, 96, 233, 21, -1, $WS_EX_CLIENTEDGE)
GUICtrlCreateLabel("Gaia Forum Poster. Uses the poster made by", 80, 40, 214, 17)
GUICtrlCreateLabel("GoFlago", 152, 56, 44, 17)
$Epass = GUICtrlCreateInput("Password", 64, 152, 233, 21, -1, $WS_EX_CLIENTEDGE)
$Emsg = GUICtrlCreateEdit("", 48, 200, 257, 169, -1, $WS_EX_CLIENTEDGE)
$Submit = GUICtrlCreateButton("Start", 125, 390)
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

Share this post


Link to post
Share on other sites



kenzu,

Welcome to the AutoIt forum. :)

Unfortunately you appear to have missed the Forum rules on your way in. Please read them now (there is also a link at bottom right of each page) - particularly the bit about not discussing game interaction - and then you will understand why you will get no help and this thread will now be locked. And please do not try to argue that you are not interacting with the game - in my opinion "in-game bans" are indeed interaction. :naughty:

See you soon with a legitimate question I hope. :)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0