Jump to content

Watching Website/Form submission WITHOUT using IE UDF


cassetti
 Share

Recommended Posts

Ok - here's the deal - i know i can simply include IE.au3 to automate web navigation

I am working on a script that downloads the source for a page using igetnet( or whatever it is - this is great - works fast

then i open the script and do a search looking at the code if it finds the stuff - i need it to do a few things

i need it to log in by entering username and password (since the inetget uses IE - if i have cookies enabled - it will already be logged in - i can set up the script to log in using the ie.au3 an hour before this happens so i can have it always assume that it is logged in - which it could work this way

Now after it logs in - say it already is logged in - the next page it navigates to - has a form - this form has information - most of it is saved already on the site - but a few sections are not

i need it to submit that form with the necessary information - and after it submits the next page is a whole bunch of data

i need to know if its possible or what i need to do this.

for this site - every second counts - and i do mean every second - the faster the time - the better

Link to comment
Share on other sites

take a look at this idea

#cs ================================================
    Autor:      Robert M @ QT Appraisal
    E-mail:     XPCleanMenu@aol.com
    Language:   English
    OSystem:    Windows Xp
#ce ================================================
#include <GUIConstants.au3>

Dim $My_Web_Page = "www.google.com"; Pl;ace your web site here ( after testing )
Dim $1Tip = "", $Stop = ""

Opt("MouseClickDelay", 10)   ;10 milliseconds
Opt("MouseCoordMode", 0)       ;1=absolute, 0=relative, 2=client
opt("GUIOnEventMode", 1) ; Change to OnEvent mode
Opt("WinTitleMatchMode", 3) ;1=start, 2=subStr, 3=exact, 4=advanced

$Logo = @HomeDrive & "\Temp\logo.jpg"
FileInstall("C:\Windows\Help\Tours\htmltour\logo.jpg", $Logo)

$Start_Menu = GUICreate("*XPClean*", 200, 115, 3, 3, $WS_POPUP, BitOR($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW))
GUICtrlCreatePic($Logo, 0, 0, 200, 80)
GUICtrlSetState( -1, $GUI_DISABLE)
$Start_1 = GUICtrlCreateButton("Start", -1, 80, 42, 20, $BS_ICON)
GUICtrlSetOnEvent(-1, "Set_Start")
$Start_2 = GUICtrlCreateButton("Stop", 41, 80, 40, 20, $BS_ICON)
GUICtrlSetOnEvent(-1, "Set_Stop")
$Start_4 = GUICtrlCreateButton("Hide", 120, 80, 40, 20, $BS_ICON)
GUICtrlSetOnEvent(-1, "Set_Hide")
$Start_5 = GUICtrlCreateButton("Exit", 160, 80, 40, 20, $BS_ICON)
GUICtrlSetOnEvent(-1, "Set_Exit")

$Notice = GUICtrlCreateLabel("IE 4 ME", 25, 30, 150, 40)
GUICtrlSetBkColor( -1, $GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetFont(-1, 28, 10)
GUISetState()

$begin = TimerInit()
Do
    $Msg = GUIGetMsg()
    
    $dif = TimerDiff($begin)
    If $dif >= 50000 Then
        GUISetState(@SW_HIDE, $Start_Menu)
        If $1Tip = "" Then
            SplashTextOn("", "<<< Place Mouse HERE", 200, 20, 2, 2, 1)
            Sleep(3500)
            SplashOff()
            $1Tip = "off"
        EndIf
        $begin = TimerInit()
    EndIf
    
; controls Start Menu return from upper/left screen position
    $pos = MouseGetPos()
    If $pos[0] > - 1 And $pos[0] < 12 And $pos[1] > - 1 And $pos[1] < 12 Then
        Call("Set_Show")
    EndIf
    Sleep(10)
Until $Msg = $Start_5; Continue loop until EXIT is pressed
Exit

;------------------------ Functions ---------------

Func Set_Start()
    Run(@ProgramFilesDir & "\Internet Explorer\iexplore.exe " & $My_Web_Page)
    Sleep(2000)
    MouseClick("Left", 450, 340, 1)
    Send("Feeling Lucky?????")
    Sleep(1000)
    MouseClick("Left", 470, 360, 1)
    
    
; ------------------------------------- do what you want to do
    
    $begin = TimerInit()
EndFunc  ;==>Set_Start

Func Set_Stop()
    #Region --- CodeWizard generated code Start ---
;MsgBox features: Title=Yes, Text=Yes, Buttons=Yes and No, Icon=Info, Timeout=30 ss
    If Not IsDeclared("iMsgBoxAnswer") Then Dim $iMsgBoxAnswer
    $iMsgBoxAnswer = MsgBox(68, "Stop What?", "LOL" & @CRLF & @CRLF & "Brought to you by QT Appraisal Service" & @CRLF & @CRLF & "Check out our *XPClean Menu* " & @CRLF & @CRLF & "@ www.XPCleanMenu.HostRocket.com", 30)
    Select
        Case $iMsgBoxAnswer = 6;Yes
            Run(@ProgramFilesDir & "\Internet Explorer\iexplore.exe http://www.xpcleanmenu.hostrocket.com")
        Case $iMsgBoxAnswer = 7;No
            
        Case $iMsgBoxAnswer = -1;Timeout
            
    EndSelect
    #EndRegion --- CodeWizard generated code End ---
    $begin = TimerInit()
EndFunc  ;==>Set_Stop

Func Set_Hide()
    GUISetState(@SW_HIDE, $Start_Menu)
    If $1Tip = "" Then
        SplashTextOn("", "<<< Place Mouse HERE", 200, 20, 2, 2, 1)
        Sleep(3000)
        SplashOff()
        $1Tip = "off"
    EndIf
EndFunc  ;==>Set_Hide

Func Set_Show()
    GUISetState(@SW_SHOW, $Start_Menu)
    $begin = TimerInit()
EndFunc  ;==>Set_Show

Func Set_Exit()
    Exit
EndFunc  ;==>Set_Exit

8)

NEWHeader1.png

Link to comment
Share on other sites

Uhm - i'm not quite sure what all is going on there

Here is what i want the script to do:

- Download the source code for this page

- check the contents of the source code for several keywords

- if it finds them, it will then procede to submit the necessary data (its like a website where you can purchase things - but its very time sensitive)

- I guess all i need to do is learn about post and get commands and figure out how to pass them through

Link to comment
Share on other sites

ok - i'm a little confused about that script - but i am thinking here about this

and i'm thinking the way to do it -is to pull this data down fromt he site - then load it into an object - using the IE.au3

then do what it says - then follow the next page and the next

i'll get it working - when i do - i'll post some idea's - this site is all about speed - thats the name of the game

Link to comment
Share on other sites

maybe...

#include <file.au3>
#include <IE.au3>

Dim $x, $Count, $Move[100]

$oIE = _IECreate()
_IENavigate($oIE, "http://www.autoitscript.com/"); need your web site here
$sloc = @TempDir & "\Htmltext.txt"
$Body = _IEBodyReadHTML($oIE)
FileDelete($sloc)
FileWrite($sloc, $Body)


Dim $aRecords
If Not _FileReadToArray( $sloc, $aRecords) Then
   MsgBox(4096,"Error", " Error reading log to Array     error:" & @error)
   Exit
EndIf
For $x = 1 to $aRecords[0]
    If StringInStr($aRecords[$x], "url to pic #1") Then
        _IENavigate($oIE, "http://www.autoitscript.com/"); need your #1 pic web site here
    EndIf   
    If StringInStr($aRecords[$x], "url to pic #2") Then
        _IENavigate($oIE, "http://www.autoitscript.com/"); need your #2 pic web site here
    EndIf   
Next

as an idea??

8)

NEWHeader1.png

Link to comment
Share on other sites

Thats pretty close to what i'm thinking

i'm working on a few things now

i'm actually including some counting scripts to get the actual time taken to process this stuff differant ways - i'm goint to figure it out and post it in the scripts section when i find out some more about what i'm doing

thanks for your help though - if you're interested in what exactly i'm doing - hit me up with a pm - i'd be more than happy to show you privately what i'm working on

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