Jump to content
Sign in to follow this  

AutoIt 1-2-3 Question

Recommended Posts

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?

Share this post

Link to post
Share on other sites

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

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

    $o_IE = _IECreate (0) ; 0 = NOT VISIBLE
    ProgressSet(25, "25 Percent", "Loading File...")
    _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")

    _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...")

    $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...")

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

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

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

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

Share this post

Link to post
Share on other sites

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.

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...