Jump to content
Sign in to follow this  
10031992

Help with the script here

Recommended Posts

10031992

Hello I am trying to do a script of my login to forum

The person has to enter username / password to open the program after you login to the forum

I'm doing based on a script I found here in forum

I'm trying to do this so that only users of the forum, use the program

But it is not working,

He does not log on forum

He made the demand on the system search the forum

Just

See here

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
#include <file.au3>
#include <ie.au3>
Local $ES_PASSWOR
;
Opt("GUIOnEventMode", 1)
$Form2 = GUICreate("Forum Login", 400, 600, 184, 120)
GUISetBkColor(0xFFFFFF)
$Log = GUICtrlCreateTab(8, 176, 1193, 473)
GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT)
$TabSheet1 = GUICtrlCreateTabItem("Log-In System")
$Label1 = GUICtrlCreateLabel("Log-In Forum ", 150, 224, 186, 36)
GUICtrlSetFont(-1, 20, 800, 2, "Rosewood Std Regular")
$Group1 = GUICtrlCreateGroup("Forum Log-In", 40, 312, 265, 233)
$zamacc = GUICtrlCreateInput("", 64, 376, 129, 21)
$Label2 = GUICtrlCreateLabel("Username Forum", 64, 352, 216, 17)
$Label3 = GUICtrlCreateLabel("Pass Forum;", 64, 424, 153, 17)
$zampass = GUICtrlCreateInput("", 64, 448, 129, 21, BitOR($ES_PASSWORD,$ES_AUTOHSCROLL))
$zamlogin = GUICtrlCreateButton("Log-In", 128, 496, 75, 25, 0)
GUICtrlSetOnEvent($zamlogin, "zamlogin")
GUICtrlCreateGroup("", -99, -99, 1, 1)
$TabSheet2 = GUICtrlCreateTabItem("Forum GOHC")
GUICtrlSetState(-1,$GUI_SHOW)
GUISetState(@SW_SHOW)
;

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            ExitLoop
    EndSwitch
WEnd

Func  zamlogin()
$oIE = _IECreate("http://forumgohc.freehostia.com/forum/index.php?action=login")
$oForm = _IEFormGetObjByName($oIE, 0)
$oUserID = _IEGetObjById($oForm, "username")
$oPass = _IEGetObjById($oForm, "password")
_IEFormElementSetValue($oUserID, (GuiCtrlRead($zamacc)))
_IEFormElementSetValue($oPass, (GuiCtrlRead($zampass)))
_IEFormSubmit($oForm)
DirCreate("LOGS")
_FileWriteLog(@ScriptDir & "\LOGS\log-in_info.cfg", "Login Forum")
_FileWriteLog(@ScriptDir & "\LOGS\log-in_info.cfg", "Account - " & (GuiCtrlRead($zamacc)))
_FileWriteLog(@ScriptDir & "\LOGS\log-in_info.cfg", "Password - " & (GuiCtrlRead($zampass)))
_FileWriteLog(@ScriptDir & "\LOGS\log-in_info.cfg", "Login Forum by BODE GOHC")
_FileWriteLog(@ScriptDir & "\LOGS\log-in_info.cfg", "---------------------------------------------------------")

EndFunc

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            ExitLoop
    EndSwitch
WEnd

-------------------------------------------------------------------------------------------------------------------------------------------- [center][/center][center]Autoit Support Forum in Portuguese | AutoitBrasil.com[/center] [sub]My Script :[/sub]Simples Login for Program

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.