Jump to content

Puzzled by _IEAttach issue


Recommended Posts

Hi All,

I have an issue trying to get _IEAttach to work. Here is the details of the window in IE that I am trying to attach to:

>>>> Window <<<<
Title:  Assign Account Management - Windows Internet Explorer
Class:  IEFrame
Position:   615, 325
Size:   475, 520
Style:  0x16CA0000
ExStyle:    0x00000100
Handle: 0x00051B68

>>>> Control <<<<
Class:  
Instance:   
ClassnameNN:    
Name:   
Advanced (Class):   [CLASS:; INSTANCE:]
ID: 
Text:   
Position:   0, 0
Size:   469, 492
ControlClick Coords:    54, 383
Style:  0x56000000
ExStyle:    0x00000000
Handle: 0x00131EFC

>>>> Mouse <<<<
Position:   57, 408
Cursor ID:  5
Color:  0x5F5FAE

>>>> StatusBar <<<<
1:  Done
2:  
3:  
4:  
5:  
6:  
7:  
8:  
9:  
10: 

>>>> ToolsBar <<<<

>>>> Visible Text <<<<
Assign Account Management - Windows Internet Explorer


>>>> Hidden Text <<<<
Navigation Bar
https://zzzzz.zzzzz.com/efiles/clients/add_new_policy_assignment.asp?pid=4718149&id=11365939&mode=2&edit=true&sid=6&TPC=0&polno=02670949
Address Combo Control
Page Control
Google
Search Combo Control
Search Control
Command Bar
Favorites Command Bar
ITBarHost
Menu Bar
100%
Google Search
Highlight in page
Done
Zoom Level

Also in the HTML the title is: <title>Assign Account Management</title>

Additionally the html "<b>Assign Account Management</b>" is also found in the body of the html.

I have tried the following variations of which none work:

Local $oIE = _IEAttach("Assign Account Management")

Local $oIE = _IEAttach("Assign Account Management","text")

Local $oIE = _IEAttach("Assign Account Management - Windows Internet Explorer","windowtext")

Local $oIE = _IEAttach("Assign Account Management","html")

 

The hwnd changes everytime the window is opened. The URL is unique to the specific client record so I do not think I can look at the URL.

Any thoughts why I cannot get to the actual IE Window?

 

 

Link to comment
Share on other sites

Try this:

$sTITLE = "[REGEXPTITLE:(?i)(Assign Account Management.*Internet Explorer.*)]"
$hWindowToFind = WinGetHandle($sTITLE)
_IEAttach($hWindowToFind, "HWND")

EDIT: Better example:

Global $sTITLE = "[REGEXPTITLE:(?i)(Assign Account Management.*Internet Explorer.*)]"

$oIE = _IEAttachToTitle($sTITLE)

Func _IEAttachToTitle($sTITLE)
    $hWindowToFind = WinGetHandle($sTITLE)
    Return _IEAttach($hWindowToFind, "HWND")
EndFunc   ;==>_IEAttachToTitle
Edited by mlipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 *

 

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related:How to get reference to PDF object embeded in IE * IE on Windows 11

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2023-04-24

Link to comment
Share on other sites

That did not seem to make a difference. This is what I currently have:

Func _ChangeAssignmentToHouse($PersonValue)
    Global $sTITLE = "[REGEXPTITLE:(?i)(Assign Account Management.*Internet Explorer.*)]"
    Local $oIE = _IEAttachToTitle($sTITLE)

    $oForm = _IEFormGetObjByName($oIE, "add_new_assignment")
    $oSelect = _IEFormElementGetObjByName($oForm, "PeopleId")
    _IEFormElementOptionSelect($oSelect, $PersonValue, 1, "byText")
    ;_IEFormSubmit($oForm) 

EndFunc
Link to comment
Share on other sites

And when I run this code it does return the window

; Create an array of object references to all current browser instances
; The first array element will contain the number of instances found

#include <IE.au3>
#include <Constants.au3>

Local $aIE[1]
$aIE[0] = 0

Local $i = 1, $oIE
While 1
    $oIE = _IEAttach("", "instance", $i)
    MsgBox($MB_SYSTEMMODAL, "The URL", _IEPropertyGet($oIE, "locationurl"))

    If @error = $_IEStatus_NoMatch Then ExitLoop
    ReDim $aIE[$i + 1]
    $aIE[$i] = $oIE
    $aIE[0] = $i
    $i += 1
WEnd
Link to comment
Share on other sites

are You using COM Error Handling ?

can you post messages from this COM Error Handling ?

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 *

 

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related:How to get reference to PDF object embeded in IE * IE on Windows 11

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2023-04-24

Link to comment
Share on other sites

I see the bad referring to an object of type Form

try this:

$oForm = _IEGetObjByName($oIE, "add_new_assignment")

EDIT:

"Form" object type, is not part of the Form object , so it is wrong to use:

$oForm = _IEFormGetObjByName($oIE, "add_new_assignment")
Edited by mlipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 *

 

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related:How to get reference to PDF object embeded in IE * IE on Windows 11

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2023-04-24

Link to comment
Share on other sites

Ok - I did change the $oForm syntax.

I have added the following code to the project:

Func MyErrFunc($oMyError) 
Local $HexNumber
Local $strMsg

$HexNumber = Hex($oMyError.Number, 8) 
$strMsg = "Error Number: " & $HexNumber & @CRLF 
$strMsg &= "WinDescription: " & $oMyError.WinDescription & @CRLF 
$strMsg &= "Script Line: " & $oMyError.ScriptLine & @CRLF 
MsgBox(0, "ERROR", $strMsg)
SetError(1)
Endfunc

It returns Error Number: 80020009, WinDescription: ExceptionOccurred, Script Line 345. That is not helpful - I do not know what line 345 is as I am including files in the first au3 so I can manage the code.

 

However I did add this code: msgbox(0,"Title",$sTITLE) which returned "[REGEXPTITLE:(?i)(Assign Account Management.*Internet Explorer.*)]". I removed the quotes and now get the following:

Global $sTITLE = [REGEXPTITLE:(?i)(Assign Account Management.*Internet Explorer.*)]
Global $sTITLE = [REGEXPTITLE:(?i)(Assign Account Management^ ERROR

Edit: However I see that  "[REGEXPTITLE:(?i)(Assign Account Management.*Internet Explorer.*)]" is the correct syntax
 

Edited by ckelsoe
Link to comment
Share on other sites

Can You use this:

ConsoleWrite("We intercepted a COM Error !" & @CRLF & _
            "Number is: " & $HexNumber & @CRLF & _
            "WinDescription is: " & $oMyError.windescription & @CRLF & _
            "source is: " & $oMyError.source & @CRLF & _
            "description is: " & $oMyError.description & @CRLF & _
            "helpfile is: " & $oMyError.helpfile & @CRLF & _
            "helpcontext is: " & $oMyError.helpcontext & @CRLF & _
            "lastdllerror is: " & $oMyError.lastdllerror & @CRLF & _
            "scriptline is: " & $oMyError.scriptline & @CRLF & _
            "" )

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 *

 

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related:How to get reference to PDF object embeded in IE * IE on Windows 11

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2023-04-24

Link to comment
Share on other sites

Ok - I did change the $oForm syntax.

I have added the following code to the project:

I removed the quotes and now get the following:

Global $sTITLE = [REGEXPTITLE:(?i)(Assign Account Management.*Internet Explorer.*)]

Global $sTITLE = [REGEXPTITLE:(?i)(Assign Account Management^ ERROR

Edit: However I see that  "[REGEXPTITLE:(?i)(Assign Account Management.*Internet Explorer.*)]" is the correct syntax

 

 

You can not remove qutes when you set string to variable

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 *

 

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related:How to get reference to PDF object embeded in IE * IE on Windows 11

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2023-04-24

Link to comment
Share on other sites

Can you post a OuterHtml for element named "add_new_assignment"

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 *

 

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related:How to get reference to PDF object embeded in IE * IE on Windows 11

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2023-04-24

Link to comment
Share on other sites

<BODY onload=javascript:loadValues(113) aLink=#0000ff link=#0000ff topMargin=10 bgColor=#ffffe1 vLink=#0000ff><!-- Form tag [START]. -->
<FORM method=post name=add_new_assignment action=add_new_assignment.asp>
 
<DIV align=center>
<CENTER>
<TABLE border=0 cellSpacing=0 cellPadding=0 width="100%">
<TBODY>
<TR>
<TD width="100%"></TD></TR>
<TR>
<TD width="100%">
<DIV align=left>
<TABLE border=0 cellSpacing=0 cellPadding=0 width="100%" bgColor=#ffffe1>
<TBODY>
<TR>
<TD width=10 colSpan=2 align=left><IMG border=0 src="/images/g-box-topleft.gif" width=10 height=10></TD>
<TD bgColor=#ffffff><IMG border=0 src="/images/g-box-topline.gif" width="100%" height=10></TD>
<TD width=10 colSpan=2 align=right><IMG border=0 src="/images/g-box-topright.gif" width=10 height=10></TD></TR>
<TR>
<TD bgColor=#cccccc width=1><IMG border=0 src="/images/g-box-greyline.gif" width=1 height=20></TD>
<TD bgColor=#ffffff width=9>&nbsp;</TD>
<TD>
<CENTER></CENTER>
<DIV align=center>
<CENTER>
<TABLE border=0 cellSpacing=0 cellPadding=0 width="100%">
<TBODY>
<TR>
<TD vAlign=top width="100%">
<TABLE border=0 cellSpacing=0 cellPadding=0 width="100%" bgColor=#ffffff>
<TBODY>
<TR>
<TD noWrap><FONT size=1 face=Verdana><B>Assign Account Management</B> </FONT></TD>
<TD width="100%">
<P align=right><IMG border=0 src="/images/sm-nexsurelogo.gif" width=87 height=24></P></TD></TR><!--RA 03.28.2006 UI-->
<TR>
<TD bgColor=#ffffff height=3 colSpan=2></TD></TR>
<TR>
<TD bgColor=#cccccc height=20 colSpan=2></TD></TR>
<TR>
<TD bgColor=#ffffff height=3 colSpan=2></TD></TR>
<TR>
<TD colSpan=2><FONT size=1 face=verdana>Assign account management by selecting the branch that the responsibility will be handled by. After the branch is selected, Department, Responsibility, and Name will become active. </FONT></TD></TR></TBODY></TABLE><!-- Input [START]. -->
<TABLE border=0 cellSpacing=0 cellPadding=0 width="100%">
<TBODY>
<TR>
<TD bgColor=#ffffff colSpan=2>
<TABLE border=0 cellSpacing=0 cellPadding=0 width="100%">
<TBODY>
<TR>
<TD bgColor=#ffffff>
<TABLE border=0 cellSpacing=0 cellPadding=2 width="100%">
<TBODY>
<TR>
<TD vAlign=top width="25%"><FONT size=1 face=verdana>Branch:</FONT></TD>
<TD width="75%" colSpan=2><SELECT style="WIDTH: 100%; FONT-FAMILY: verdana; FONT-SIZE: 8pt" disabled onchange=javascript:loadValues(this.value) name=BranchId> <OPTION value=0>&nbsp;</OPTION> <OPTION value=99>Future Use</OPTION></SELECT> </TD></TR>
<TR>
<TR>
<TD vAlign=top width="25%"><FONT size=1 face=verdana>Department:</FONT></TD>
<TD width="75%" colSpan=2><SELECT style="WIDTH: 100%; FONT-FAMILY: verdana; FONT-SIZE: 8pt" onchange=javascript:loadUnitValues(this) name=DepartmentEntityId><OPTION id=1 value=1152>Commercial</OPTION><OPTION id=3 value=1154>Benefits</OPTION><OPTION id=4 value=1155>Individual</OPTION><OPTION id=10 value=1158>Operations</OPTION><OPTION id=2 selected value=1153>Personal</OPTION><OPTION id=0 value=1151>Unassigned</OPTION> </SELECT> </TD></TR>
<TR>
<TD vAlign=top width="25%"><FONT size=1 face=verdana>Unit:</FONT></TD>
<TD width="75%" colSpan=2><SELECT style="WIDTH: 100%; FONT-FAMILY: verdana; FONT-SIZE: 8pt" name=UnitId><OPTION selected value=0>Unassigned</OPTION> </SELECT> </TD></TR>
<TR>
<TD vAlign=top width="25%"><FONT size=1 face=verdana>Responsibility:</FONT></TD>
<TD width="75%" colSpan=2><SELECT style="WIDTH: 100%; FONT-FAMILY: verdana; FONT-SIZE: 8pt" name=ResponsibilityId> <OPTION value=6>Executive</OPTION></SELECT></TD></TR>
<TR>
<TD vAlign=top width="25%"><FONT size=1 face=verdana>Name:</FONT></TD>
<TD width="75%" colSpan=2><SELECT style="WIDTH: 100%; FONT-FAMILY: verdana; FONT-SIZE: 8pt" onchange=DetermineCommissionCBStatus(); name=PeopleId><OPTION value=46>first choice   </OPTION> </SELECT> 
<DIV style="DISPLAY: none; FONT-FAMILY: verdana; COLOR: red; FONT-SIZE: 8pt" id=people_err>No valid commission defaults exist for name selected</DIV></TD></TR>
<TR>
<TD vAlign=top width="25%"><FONT size=1 face=verdana>Primary:</FONT></TD>
<TD width="75%" colSpan=2 align=left><INPUT style="FONT-FAMILY: verdana; FONT-SIZE: 8pt" disabled value=1 CHECKED type=checkbox name=Primary> </TD></TR>
<TR>
<TD vAlign=top width="25%"><FONT size=1 face=verdana>Update "Other" in Info:</FONT></TD>
<TD width="10%" align=left><INPUT style="FONT-FAMILY: verdana; FONT-SIZE: 8pt" CHECKED type=checkbox name=Commissions> </TD>
<TD width="65%" align=left>
</TD></TR>
<TR>
<TD colSpan=3><FONT size=1 face=verdana>&nbsp;</FONT></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD bgColor=#ffffff colSpan=2>
<TABLE border=0 cellSpacing=0 cellPadding=0 width="100%">
<TBODY>
<TR>
<TD>
<TABLE border=0 cellSpacing=1 cellPadding=2 width="100%">
<TBODY>
<TR>
<TD><IMG border=0 src="/images/g-box-bottomline.gif" width="100%" height=9></TD>
<TR>
<TD></TD></TR>
<TR>
</TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD bgColor=#ffffff><FONT size=1 face=verdana>&nbsp;</FONT></TD></TR>
<TR>
<TD bgColor=#ffffff height=3 colSpan=2></TD></TR>
<TR>
<TD bgColor=#cccccc height=13 colSpan=2></TD></TR>
<TR>
<TD bgColor=#ffffff height=3 colSpan=2></TD></TR>
<TR>
<TD bgColor=#ffffff width="100%" colSpan=2>
<DIV align=right>
<TABLE border=0 cellSpacing=0 cellPadding=0 width="100%">
<TBODY>
<TR>
<TD align=right><INPUT style="WIDTH: 60px; FONT-FAMILY: Verdana; COLOR: #000000; FONT-SIZE: 8pt" onclick=javascript:saveAssignment(); value=Save type=button name=save> <INPUT style="WIDTH: 60px; FONT-FAMILY: Verdana; COLOR: #000000; FONT-SIZE: 8pt" onclick=javascript:window.close() value=Cancel type=button name=cancel> </TD></TR></TBODY></TABLE></DIV></TD></TR></TBODY></TABLE></TD></TR></CENTER></TBODY></TABLE></DIV></TD>
<TD bgColor=#ffffff width=9>&nbsp;</TD>
<TD bgColor=#cccccc width=1><IMG border=0 src="/images/g-box-greyline.gif" width=1 height=20></TD></TR>
<TR>
<TD width=10 colSpan=2 align=left><IMG border=0 src="/images/g-box-bottomleft.gif" width=10 height=10></TD>
<TD bgColor=#ffffff><IMG border=0 src="/images/g-box-bottomline.gif" width="100%" height=10></TD>
<TD width=10 colSpan=2 align=right><IMG border=0 src="/images/g-box-bottomright.gif" width=10 height=10></TD></TR></TBODY></TABLE></DIV></TD></TR>
<TR>
<TD width="100%"></TD></TR></TBODY></TABLE></DIV></CENTER></FORM></BODY>

Link to comment
Share on other sites

try this:

#include <IE.au3>
Global $sTITLE = "[REGEXPTITLE:(?i)(Assign Account Management.*Internet Explorer.*)]"
Global $oIE
_test()

Func _test()
    ConsoleWrite('$sTITLE = ' & $sTITLE)
    If WinExists($sTITLE) = 0 Then
        ConsoleWrite('WinExists($sTITLE) = 0' & @CRLF)
        $oIE = _IECreate("http://www.google.com")
    Else
        ConsoleWrite('WinExists($sTITLE) = 1' & @CRLF)
        $oIE = _IEAttachToTitle($sTITLE)
    EndIf
    ConsoleWrite('IsObj($oIE) = ' & IsObj($oIE) & @CRLF)
    $oForms = _IEFormGetCollection($oIE)
    ConsoleWrite('IsObj($oForms) = ' & IsObj($oForms) & @CRLF)
    For $oForm In $oForms
        ConsoleWrite('$oForm.name = ' & $oForm.name & @CRLF)
        ConsoleWrite('$oForm.id = ' & $oForm.id & @CRLF)
    Next
EndFunc   ;==>_test

Func _IEAttachToTitle($sTITLE)
    $hWindowToFind = WinGetHandle($sTITLE)
    Return _IEAttach($hWindowToFind, "HWND")
EndFunc   ;==>_IEAttachToTitle

and give me console output

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 *

 

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related:How to get reference to PDF object embeded in IE * IE on Windows 11

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2023-04-24

Link to comment
Share on other sites

Ok that finds the form, etc. I will go back through my code to see what is different:

$sTITLE = [REGEXPTITLE:(?i)(Assign Account Management.*Internet Explorer.*)]WinExists($sTITLE) = 1
IsObj($oIE) = 1
IsObj($oForms) = 1
$oForm.name = add_new_assignment
$oForm.id = 0
Link to comment
Share on other sites

Well now I am getting to the form but cannot get the combo box to change using _IEFormElementOptionSelect. It has no affect on the combo box. I am trying to send text in this format: "Lastname, Firstname". The values in the list are in the same format.

However, I can get it to change to a blank value using _IEFormElementSetValue

I did try _IEFormElementOptionSelect using "byIndex" which seems to work. I just do not have that value - just the LastName, FirstName value. So I would really like to figure out why byText is not working as expected. Is it the comma perhaps?

Link to comment
Share on other sites

show: what You got now, and how You using _IEFormElementOptionSelect

Edited by mlipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 *

 

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related:How to get reference to PDF object embeded in IE * IE on Windows 11

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2023-04-24

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