Jump to content

ie.au3 tutorial/direction needed


Recommended Posts

Was hoping to get some answers from the >same topic, but it appears that one is close to being closed.

I am working with BMC Remedy (thin client) and have not gotten very far with trying to automate filling in fields, as I am unable to locate what type of field it is.

While trying to create a new incident, there is a Summary* field that I have tried to find out what it is, but am unable. I have tried form, table, and frame. I am about to give up and just use _SendEx() to do what I want, but thought I would try something new today. As of this time, I have put in about 5 hours trying to just find out how to get the name of a field.

When trying to show forms on page, I get 0 (Zero)
I get lots of tags/innerText, but only a couple with the word Summary in it:
 

Tagname: LABEL
innerText: Summary*
--> IE.au3 V2.4-0 Warning from function _IEFormGetObjByName, $_IEStatus_NoMatch
--> IE.au3 V2.4-0 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataType
--> IE.au3 V2.4-0 Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidObjectType
--> IE.au3 V2.4-0 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataType
Tagname: LABEL
innerText: Summary
--> IE.au3 V2.4-0 Warning from function _IEFormGetObjByName, $_IEStatus_NoMatch
--> IE.au3 V2.4-0 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataType
--> IE.au3 V2.4-0 Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidObjectType
--> IE.au3 V2.4-0 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataType

I want to know how to find the name of the field, what type it is, and how to update it with _IEFormElementSetValue??? Any ideas?
 

#include <IE.au3>
;LABELinnerText: Summary
$oIE = _IECreate("[url=""]XXX[/url]") ; unable to post URL as it is work related
#cs
 Local $oForms = _IEFormGetCollection($oIE)
 MsgBox(0, "Forms Info", "There are " & @extended & " forms on this page")
 For $oForm In $oForms
 MsgBox(0, "Form Info", $oForm.name)
 Next
 
 Local $oForms = _IEFormGetObjByName($oIE, "", -1)
 For $oForm In $oForms
 MsgBox(0, "Form Info", $oForms.name)
 Next
#ce
;#cs
Local $oElements = _IETagNameAllGetCollection($oIE)
If @error Then MsgBox('', [email="'@error'"]'@error'[/email], @error)
; WORKS and gets all Tags
For $oElement In $oElements
 If StringInStr($oElement.tagname, 'Summary') Or StringInStr($oElement.innerText, 'Summary') _
   And Not StringInStr($oElement.tagname, 'HTML') _
   And Not StringInStr($oElement.tagname, 'Body') _
   And StringInStr($oElement.tagname, 'Label') Then

  ConsoleWrite("Tagname: " & $oElement.tagname & @CR & "innerText: " & $oElement.innerText)
  ConsoleWrite(@CRLF & @CRLF)
  #cs
   Local $oInputs = _IETagNameGetCollection($oIE, $oElement.tagname)
   For $oInput In $oInputs
   ConsoleWrite("Form: " & $oInput.form.name & " Type: " & $oInput.type)
   ConsoleWrite(@CRLF & @CRLF)
   Next
  #ce
  ;
  $oQuery = _IEFormGetObjByName($oIE, $oElement.innerText)
  _IEFormElementSetValue($oQuery, "AutoIt IE.au3")
  $oQuery = _IEFormElementGetObjByName($oIE, $oElement.tagname)
  _IEFormElementSetValue($oQuery, "AutoIt IE.au5")

  #cs
   Local $oInputs = _IETagNameGetCollection($oIE, $oElement.innerText, -1)
   For $oInput In $oInputs
   ConsoleWrite("Form: " & $oInput.form.name & " Type: " & $oInput.type)
   ConsoleWrite(@CRLF & @CRLF)
   Next
  #ce
 EndIf
Next
;#ce
Edited by nitekram

All by me:

"Sometimes you have to go back to where you started, to get to where you want to go." 

"Everybody catches up with everyone, eventually" 

"As you teach others, you are really teaching yourself."

From my dad

"Do not worry about yesterday, as the only thing that you can control is tomorrow."

 

WindowsError.gif

WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF

AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send

StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2

AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit  Docs

SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF

Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language

Programming Tips

Excel Changes

ControlHover.UDF

GDI_Plus

Draw_On_Screen

GDI Basics

GDI_More_Basics

GDI Rotate

GDI Graph

GDI  CheckExistingItems

GDI Trajectory

Replace $ghGDIPDll with $__g_hGDIPDll

DLL 101?

Array via Object

GDI Swimlane

GDI Plus French 101 Site

GDI Examples UEZ

GDI Basic Clock

GDI Detection

Ternary operator

Link to comment
Share on other sites

Anyone have any ideas?

All by me:

"Sometimes you have to go back to where you started, to get to where you want to go." 

"Everybody catches up with everyone, eventually" 

"As you teach others, you are really teaching yourself."

From my dad

"Do not worry about yesterday, as the only thing that you can control is tomorrow."

 

WindowsError.gif

WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF

AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send

StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2

AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit  Docs

SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF

Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language

Programming Tips

Excel Changes

ControlHover.UDF

GDI_Plus

Draw_On_Screen

GDI Basics

GDI_More_Basics

GDI Rotate

GDI Graph

GDI  CheckExistingItems

GDI Trajectory

Replace $ghGDIPDll with $__g_hGDIPDll

DLL 101?

Array via Object

GDI Swimlane

GDI Plus French 101 Site

GDI Examples UEZ

GDI Basic Clock

GDI Detection

Ternary operator

Link to comment
Share on other sites

Don't guess, use something like DebugBar (or another DOM inspector) to see what it is. If you use DebugBar, use the Drag Target onto the element you want to see it's source and use the "View Source" icon in the DebugBar toolbar to see if you have frames to navigate.

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

@DaleHohm

I installed DebugBar on my home computer - running IE version 9.0.8112.16421 and every time I open Internet Explorer - I have a popup telling me that IE has stopped working and do I want to check online for a solution or close program - I click close program two times and then my home page shows, this is not going to work, if I am at work. Can you suggest another product? I am new to DOM inspectors!

I am going to uninstall and try again - maybe a different version of DebugBar?

EDIT

OK uninstalled 7.0.1 and installed 6.4 worked, now to see if I will be able to get it installed at work - thanks for your time and will let you know what I find

Edited by nitekram

All by me:

"Sometimes you have to go back to where you started, to get to where you want to go." 

"Everybody catches up with everyone, eventually" 

"As you teach others, you are really teaching yourself."

From my dad

"Do not worry about yesterday, as the only thing that you can control is tomorrow."

 

WindowsError.gif

WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF

AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send

StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2

AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit  Docs

SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF

Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language

Programming Tips

Excel Changes

ControlHover.UDF

GDI_Plus

Draw_On_Screen

GDI Basics

GDI_More_Basics

GDI Rotate

GDI Graph

GDI  CheckExistingItems

GDI Trajectory

Replace $ghGDIPDll with $__g_hGDIPDll

DLL 101?

Array via Object

GDI Swimlane

GDI Plus French 101 Site

GDI Examples UEZ

GDI Basic Clock

GDI Detection

Ternary operator

Link to comment
Share on other sites

  • 10 months later...

Sorry for bringing up an old thread, but wanted to know, if anyone knew of a hot key that will make debugbar work. I am working in Unicenter Service Desk and trying to find any info that would allow me to find the fields needed, so I do not have to TAB TAB Sleep() Paste, TAB - well you get the idea.

USD is a product of Computer Associates (probably bought it)

EDIT

when opening anything from the main window, you get a dumb version of IE, but not the tool bar, and I have tried F11 to get it to show and all that does is make the window full screen - maybe there is a hot key for tool bar

Edited by nitekram

All by me:

"Sometimes you have to go back to where you started, to get to where you want to go." 

"Everybody catches up with everyone, eventually" 

"As you teach others, you are really teaching yourself."

From my dad

"Do not worry about yesterday, as the only thing that you can control is tomorrow."

 

WindowsError.gif

WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF

AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send

StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2

AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit  Docs

SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF

Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language

Programming Tips

Excel Changes

ControlHover.UDF

GDI_Plus

Draw_On_Screen

GDI Basics

GDI_More_Basics

GDI Rotate

GDI Graph

GDI  CheckExistingItems

GDI Trajectory

Replace $ghGDIPDll with $__g_hGDIPDll

DLL 101?

Array via Object

GDI Swimlane

GDI Plus French 101 Site

GDI Examples UEZ

GDI Basic Clock

GDI Detection

Ternary operator

Link to comment
Share on other sites

I seem to not be able to use either Chrome or FF, as the tools that are offered off the landing page are not there. Plus on Chrome, when you open of a request, the display is all messed up.

I have found something of interest though, the hot key F12, seems to give a lot of information, but drilling down each level is a pain.

I will continue my search...if anyone has an idea - please do not be shy ;)

All by me:

"Sometimes you have to go back to where you started, to get to where you want to go." 

"Everybody catches up with everyone, eventually" 

"As you teach others, you are really teaching yourself."

From my dad

"Do not worry about yesterday, as the only thing that you can control is tomorrow."

 

WindowsError.gif

WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF

AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send

StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2

AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit  Docs

SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF

Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language

Programming Tips

Excel Changes

ControlHover.UDF

GDI_Plus

Draw_On_Screen

GDI Basics

GDI_More_Basics

GDI Rotate

GDI Graph

GDI  CheckExistingItems

GDI Trajectory

Replace $ghGDIPDll with $__g_hGDIPDll

DLL 101?

Array via Object

GDI Swimlane

GDI Plus French 101 Site

GDI Examples UEZ

GDI Basic Clock

GDI Detection

Ternary operator

Link to comment
Share on other sites

No one would able to see it - intranet

All by me:

"Sometimes you have to go back to where you started, to get to where you want to go." 

"Everybody catches up with everyone, eventually" 

"As you teach others, you are really teaching yourself."

From my dad

"Do not worry about yesterday, as the only thing that you can control is tomorrow."

 

WindowsError.gif

WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF

AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send

StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2

AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit  Docs

SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF

Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language

Programming Tips

Excel Changes

ControlHover.UDF

GDI_Plus

Draw_On_Screen

GDI Basics

GDI_More_Basics

GDI Rotate

GDI Graph

GDI  CheckExistingItems

GDI Trajectory

Replace $ghGDIPDll with $__g_hGDIPDll

DLL 101?

Array via Object

GDI Swimlane

GDI Plus French 101 Site

GDI Examples UEZ

GDI Basic Clock

GDI Detection

Ternary operator

Link to comment
Share on other sites

So looking at the window via F12, I see a frame called cai_main, but I am unable to get anything, but ZEROs
 

Local $oFrame = _IEFrameGetObjByName ($oIE, "cai_main")
    If @error Then MsgBox('ERROR',@extended,'')

    Local $oFrames = _IEFrameGetCollection($oIE)
Local $iNumFrames = @extended


For $i = 0 To ($iNumFrames - 1)
    Local $oFrame = _IEFrameGetCollection($oIE, $i)
    MsgBox(0, "Frame Info", _IEPropertyGet($oFrame, "uniqueid"))
Next

I get the following errors in scite

--> IE.au3 V2.4-0 Warning from function _IEFormGetObjByName, $_IEStatus_NoMatch
--> IE.au3 V2.4-0 Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidDataType
--> IE.au3 V2.4-0 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataType
--> IE.au3 V2.4-0 Error from function _IEPropertyGet, $_IEStatus_InvalidObjectType
--> IE.au3 V2.4-0 Error from function _IEPropertyGet, $_IEStatus_InvalidObjectType
--> IE.au3 V2.4-0 Error from function _IEPropertyGet, $_IEStatus_InvalidObjectType
--> IE.au3 V2.4-0 Error from function _IEPropertyGet, $_IEStatus_InvalidObjectType
--> IE.au3 V2.4-0 Error from function _IEPropertyGet, $_IEStatus_InvalidObjectType
 

Is there something I am doing wrong...tried a few of the properties, the only one that retrieves anything other then zero is - "locationurl"

I want to get the names of the input boxes in the window so that I can paste directly into the fields. Does that make sense?

All by me:

"Sometimes you have to go back to where you started, to get to where you want to go." 

"Everybody catches up with everyone, eventually" 

"As you teach others, you are really teaching yourself."

From my dad

"Do not worry about yesterday, as the only thing that you can control is tomorrow."

 

WindowsError.gif

WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF

AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send

StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2

AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit  Docs

SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF

Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language

Programming Tips

Excel Changes

ControlHover.UDF

GDI_Plus

Draw_On_Screen

GDI Basics

GDI_More_Basics

GDI Rotate

GDI Graph

GDI  CheckExistingItems

GDI Trajectory

Replace $ghGDIPDll with $__g_hGDIPDll

DLL 101?

Array via Object

GDI Swimlane

GDI Plus French 101 Site

GDI Examples UEZ

GDI Basic Clock

GDI Detection

Ternary operator

Link to comment
Share on other sites

Here I tried all of them with output:

#include <IE.au3>
;$s_URL = 'http://ndcusdwu.de-wil.csc.com/CAisd/html/popup_frames.html?POPUP_URLIX=0'
;$o_IE = _IECreate($s_URL)
Global $aPropertiesBrowser[33] = ["addressbar", "browserx", "browsery", "busy", "contenteditable", "fullscreen", "height", "hwnd", "innerhtml", _
        "innertext", "isdisabled", "left", "locationname", "locationurl", "menubar", "offline", "outertext", "outerhtml", "readystate", _
        "referrer", "resizable", "screenx", "screeny", "silent", "statusbar", "statustext", "theatermode", "title", "toolbar", _
        "top", "visible", "width", "uniqueid"]
Global $aPropertiesClientInfo[14] = ["appcodename", "appminorversion", "appname", "appversion", "browserlanguage", "cookieenabled", _
        "cpuclass", "javaenabled", "online", "platform", "systemlanguage", "useragent", "userlanguage", "vcard"]

_USDtest()

Func _USDtest()

    Local $oIE = _IEAttach("Create New Request")
    If @error Then MsgBox('', 'ERROR', @error)

    Local $oFrame = _IEFrameGetObjByName($oIE, "cai_main")
    If @error Then MsgBox('ERROR', @extended, '')

    Local $oFrames = _IEFrameGetCollection($oIE)
    Local $iNumFrames = @extended

    For $i = 0 To ($iNumFrames - 1)
        Local $oFrame = _IEFrameGetCollection($oIE, $i)
        ConsoleWrite($oFrame & @CRLF)

        For $x = 0 To UBound($aPropertiesBrowser) - 1
            ConsoleWrite($aPropertiesBrowser[$x] & @CRLF)
            If $aPropertiesBrowser[$x] = "browserx" Or $aPropertiesBrowser[$x] = "browsery" Or $aPropertiesBrowser[$x] = "contenteditable" _
                    Or $aPropertiesBrowser[$x] = "isdisabled" Then
                ContinueLoop
            EndIf
            ConsoleWrite($aPropertiesBrowser[$x] & @CRLF & _IEPropertyGet($oFrame, $aPropertiesBrowser[$x]) & @CRLF)

        Next
        ConsoleWrite(@CRLF & @CRLF)
    Next

EndFunc   ;==>_USDtest

And attached is the output:

USD_Testing_web_output.txt

Edited by nitekram

All by me:

"Sometimes you have to go back to where you started, to get to where you want to go." 

"Everybody catches up with everyone, eventually" 

"As you teach others, you are really teaching yourself."

From my dad

"Do not worry about yesterday, as the only thing that you can control is tomorrow."

 

WindowsError.gif

WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF

AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send

StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2

AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit  Docs

SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF

Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language

Programming Tips

Excel Changes

ControlHover.UDF

GDI_Plus

Draw_On_Screen

GDI Basics

GDI_More_Basics

GDI Rotate

GDI Graph

GDI  CheckExistingItems

GDI Trajectory

Replace $ghGDIPDll with $__g_hGDIPDll

DLL 101?

Array via Object

GDI Swimlane

GDI Plus French 101 Site

GDI Examples UEZ

GDI Basic Clock

GDI Detection

Ternary operator

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