Jump to content

AutoIt 1-2-3 Question


Jon
 Share

Recommended Posts

  • Administrators

How does this program do the registration? I can see that it posts the results into the thread but I'm wondering if some of the performance problems I'm having with the forum could be do to with the way this cool test works and registers or maybe even the sheer number of replies in a single thread?

Link to comment
Share on other sites

Func post_exam($Inum)
    $wait = 500
    ProgressOn("AutoIt 1-2-3", "Initiating File...", "10 percent")
    Sleep($wait)

    $user = "Examiner"
    $pass = "xxxxxx"

    $o_IE = _IECreate (0) ; 0 = NOT VISIBLE
    ProgressSet(25, "25 Percent", "Loading File...")
    Sleep($wait)
    _IENavigate ($o_IE, "http://www.autoitscript.com/forum/index.php?act=Login&CODE=00")
    $o_SearchForm = _IEFormGetObjByName ($o_IE, "LOGIN")

    $o_Keyword_1 = _IEFormElementGetObjByName ($o_SearchForm, "UserName")
    _IEFormElementSetValue ($o_Keyword_1, $user)

    $o_Keyword_2 = _IEFormElementGetObjByName ($o_SearchForm, "PassWord")
    _IEFormElementSetValue ($o_Keyword_2, $pass)

    $o_Keyword_3 = _IEFormElementGetObjByName ($o_SearchForm, "CookieDate", 0)
    $o_Keyword_3.checked = False

    $oButton = _IEFormElementGetObjByName ($o_SearchForm, "submit")
    $oButton.click

    Sleep(500)
    _IENavigate ($o_IE, "http://www.autoitscript.com/forum/index.php?act=post&do=reply_post&f=9&t=21048")
    ProgressSet(50, "50 Percent", "Navigating File...")
    Sleep($wait)

    $o_form = _IEFormGetObjByName ($o_IE, "REPLIER")
    $o_message = _IEFormElementGetObjByName ($o_form, "Post")

    $post_file = FileRead(@ScriptDir & "\Exam_" & $Inum & ".txt", (FileGetSize(@ScriptDir & "\Exam_" & $Inum & ".txt")))
    ;MsgBox(0,@ScriptDir & "\Exam_" & $Inum & ".txt",$post_file)
    _IEFormElementSetValue ($o_message, $post_file)
    ProgressSet(75, "75 Percent", "Posting File...")
    Sleep($wait)

    $oButton1 = _IEFormElementGetObjByName ($o_form, "dosubmit")
    $oButton1.click

    ProgressSet(100, "Done", "Posting Complete...")
    Sleep($wait * 2)

    _IENavigate ($o_IE, "http://www.autoitscript.com/forum/index.php?act=Login&CODE=03&k=2e8ba6d89860f5f46acde2ddf404bcb5")
    Sleep(500)
    _IEQuit ($o_IE)
    ProgressOff()

EndFunc   ;==>post_exam

My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll

Link to comment
Share on other sites

  • Administrators

Ok. What about the registration stuff? I just ran it and it came up with my details as previously registered from months ago so I assume it's querying something somewhere for that?

Link to comment
Share on other sites

  • Moderators

Did you register with that browser? I wouldn't think it would query anything.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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