Jump to content

Fetch feild values from website


 Share

Recommended Posts

Hi Folks,

Can anyone help me to fetch field values from the website. My script is all about opening a website link by pass userid as filter value. with the current script my search of record with the passed userid filter is working fine. But i want to fetch value of the OS (field in the search record) and save it in a notepad.

Please help  me to proceed further. 


#include <IE.au3>
#include <MsgBoxConstants.au3>
#include <GUIConstantsEx.au3>
#include <MsgBoxConstants.au3>

triage()

Func triage()
    GUICreate("offense triage" ,220,88) ; will create a dialog box that when displayed is centered

    Local $idRadio1 = GUICtrlCreateRadio("Internal", 10, 10, 120, 20)
    Local $idRadio2 = GUICtrlCreateRadio("External", 10, 40, 120, 20)
    Local $eAsset = "some link"
    GUISetState(@SW_SHOW) ; will display an  dialog box with 1 checkbox

     Local $idMsg
    ; Loop until the user exits.
    While 1
        $idMsg = GUIGetMsg()
        Select
            Case $idMsg = $GUI_EVENT_CLOSE
                ExitLoop
            Case $idMsg = $idRadio1 And BitAND(GUICtrlRead($idRadio1), $GUI_CHECKED) = $GUI_CHECKED
                Local $sIP = InputBox("Internal IP Triage", "Please enter the IP address", "", "" , -1, -1, 800, 500)
                 GUISetState(@SW_HIDE)
            Case $idMsg = $idRadio2 And BitAND(GUICtrlRead($idRadio2), $GUI_CHECKED) = $GUI_CHECKED
                Local $sEIP = InputBox("Internal IP Triage", "Please enter the IP address", "", "" , -1, -1, 800, 500)
                Local $eAssetsearch = $eAsset & $sEIP
                    ShellExecute ( "C:\Program Files\Internet Explorer\iexplore.exe", $eAssetsearch )
                        GUISetState(@SW_HIDE)
                EndSelect
    WEnd
EndFunc   ;==>Example
 

Link to comment
Share on other sites

Hi Danp2,

Am a newbie to auto it so the am confused in choosing the appropriate -IE functions.

and to add a note more in detail. Am trying to search a Machine name assigned to user its a web application. where we can search with the user id and fetch his inventory details.

Am successful in login and passing userid. The search is also successful but i ve no clue how to grab the displayed machine name to a notepad.

Thanks in advance.

 

Link to comment
Share on other sites

Hi Dan,

This is my code.

include <IE.au3>
#include <MsgBoxConstants.au3>
#include <GUIConstantsEx.au3>
#include <MsgBoxConstants.au3>

triage()

Func triage()
    GUICreate("offense triage" ,220,88) ; will create a dialog box that when displayed is centered

    Local $idRadio1 = GUICtrlCreateRadio("IP", 10, 10, 120, 20)
    Local $idRadio2 = GUICtrlCreateRadio("userid", 10, 40, 120, 20)
    Local $eAsset = "some link"  
    GUISetState(@SW_SHOW) ; will display an  dialog box with 1 checkbox

     Local $idMsg
    ; Loop until the user exits.
    While 1
        $idMsg = GUIGetMsg()
        Select
            Case $idMsg = $GUI_EVENT_CLOSE
                ExitLoop
            Case $idMsg = $idRadio1 And BitAND(GUICtrlRead($idRadio1), $GUI_CHECKED) = $GUI_CHECKED
                Local $sIP = InputBox("Internal IP Triage", "Please enter the IP address", "", "" , -1, -1, 800, 500)
                 GUISetState(@SW_HIDE)
            Case $idMsg = $idRadio2 And BitAND(GUICtrlRead($idRadio2), $GUI_CHECKED) = $GUI_CHECKED
                Local $sEIP = InputBox("userid Triage", "Please enter the userid", "", "" , -1, -1, 800, 500) ;giving input for search filter
                Local $eAssetsearch = $eAsset & $sEIP
                    ShellExecute ( "C:\Program Files\Internet Explorer\iexplore.exe", $eAssetsearch )
                        GUISetState(@SW_HIDE)
                EndSelect
    WEnd
EndFunc   ;==>Example

 

i ve attached my search result here as well i jus wanted to fetch the state and OS details and write the same in the notepad.

Thanks !

 

 

 

Capture.PNG

Link to comment
Share on other sites

Quote

This is my code.

That's the same code as before. So you aren't really logging into the website. Rather, you are just loading the web browser with a predefined URL.

Quote

i ve attached my search result here as well i jus wanted to fetch the state and OS details and write the same in the notepad.

Can't really tell much from the picture. Looks like a table, so you can probably use _IETableGetCollection and _IETableWriteToArray to load it into an array. Then you would use standard Autoit commands to retrieve the desired values from the array.

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