Jump to content

Please Explain _IEFormElementCheckBoxSelect


Recommended Posts

First off I am a total Noob as today is the first time I am creating a script in AutoIT.  I have been tasked with automating account creations in our phone system.  When done by hand this setup can take 30 to 45 minutes depending on distractions.  I write a lot of Powershell to automate routine tasks but this script calls for AutoIT.  The GUI interface of our phone system likes checkboxes.  Some boxes need to be check and others don't.  I would like to verify whether or not a box is check and if not, check or vice versa.  I found _IEFormElementCheckBoxSelect and thought this could do it but I am obviously missing something or I don't understand how to use it.  Any help is appreciated.

Here is what I have:

; Verify Checkboxes
#include <IE.au3>

_IEFormElementCheckBoxSelect("capassignForm", "enablecups", "", 1, "byValue")
_IEFormElementCheckBoxSelect("capassignForm", "enablecupc", "", 1, "byValue")

This is not the entire script, just the part that is failing.

Link to comment
Share on other sites

Suggest that you review the examples in the help file. Run them and see how they work. Then apply the same logic to your situation.

It's hard to tell where you are going wrong with the limited information that you posted. If you want more assistance, you will need to provide more details (full code, html, scite output, etc).

P.S. Welcome to the forum!

Link to comment
Share on other sites

Here is the entire code:

; Jabber Account Setup Variables
Global $uname = InputBox("Jabber Account Setup", "What is your HR number?")
Global $pwd = InputBox("Jabber Account Setup", "What is your password?", "", "*")
Global $uhrnum = InputBox("Jabber Account Setup", "What is users HR number?")
Global $uext = InputBox("Jabber Account Setup", "What is users extension?")

; Are you sure prompt
MsgBox(1, "Jabber Account Setup", "You are about to setup a Jabber account for: " & $uhrnum &" with Extension: " & $uext &".  Do you wish to continue?")

; Start Account Setup
; Open Cisco Unified CM Admin
ShellExecute("C:\Program Files\Internet Explorer\iexplore.exe", "-k https://*************/ccmadmin/showHome.do")
Sleep(2000)

; Send Username & Password
Send($uname&"{Tab}")
Send($pwd,1)
Send("{Enter}")
Sleep(20000)

; Select Capabilities Assignment
Send("{TAB 1}")
Send("{Down 21}")
Send("{Right 1}")
Send("{Down 3}")
Send("{Enter}")

; Search UserID
Sleep(5000)
Send("{TAB 95}")
Send($uhrnum&"{Enter}")

; Select UserID
Sleep(5000)
Send("{TAB 17}{Enter}")

; Verify Checkboxes
#include <IE.au3>

_IEFormElementCheckBoxSelect("capassignForm", "enablecups", "", 1, "byValue")
_IEFormElementCheckBoxSelect("capassignForm", "enablecupc", "", 1, "byValue")

 

Edited by monarch684
Typo
Link to comment
Share on other sites

do not use this sequece:

; Start Account Setup
; Open Cisco Unified CM Admin
ShellExecute("C:\Program Files\Internet Explorer\iexplore.exe", "-k https://*************/ccmadmin/showHome.do")
Sleep(2000)

; Send Username & Password
Send($uname&"{Tab}")
Send($pwd,1)
Send("{Enter}")
Sleep(20000)

; Select Capabilities Assignment
Send("{TAB 1}")
Send("{Down 21}")
Send("{Right 1}")
Send("{Down 3}")
Send("{Enter}")

; Search UserID
Sleep(5000)
Send("{TAB 95}")
Send($uhrnum&"{Enter}")

; Select UserID
Sleep(5000)
Send("{TAB 17}{Enter}")

 

try to use

Local $oIE = _IECreate(...
_IENavigate($oIE , ....
$oIeObj = _IEFormGetObjByName($oIE, ...
 _IEFormElementCheckBoxSelect($oIeObj, ...

 

Edited by mLipok
correction in _IEFormElementCheckBoxSelect($oIeObj, ...

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

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 here is what I got so far and it works so much better than Send.  Let me know if I am going the right direction.

; Start Jabber Setup
#include <IE.au3>

; Open Web Console and Wait for Load
Global $oIE = _IECreate("https://***************/ccmadmin/showHome.do",0,1,1,1)
_IELoadWait($oIE)

; Send Username & Password
Send($uname&"{Tab}")
Send($pwd,1)
Send("{Enter}")
_IELoadWait($oIE)

; Navigate to Capabilities Assignment
_IENavigate($oIE,"https://***************/ccmadmin/capassignFindList.do",1)

; Set User HR Number and Search
Global $oForm = _IEFormGetObjByName($oIE,"capassignFindListForm")
Local $oText = _IEFormElementGetObjByName($oForm, "searchString0")
_IEFormElementSetValue($oText, $uhrnum)
_IEFormSubmit($oForm,1)

; Get Link to Modify User
Local $oKey = _IEFormElementGetObjByName($oForm, "result[0].col[0].stringVal")
MsgBox(0,"Form", _IEFormElementGetValue($oKey))

I am at the moment stuck at the last part

; Get Link to Modify User
Local $oKey = _IEFormElementGetObjByName($oForm, "result[0].col[0].stringVal")
MsgBox(0,"Form", _IEFormElementGetValue($oKey))

I get error

--> IE.au3 T3.0-1 Warning from function _IEFormElementGetObjByName, $_IESTATUS_NoMatch

--> IE.au3 T3.0-1 Error from function _IEFormElementGetValue, $_IESTATUS_InvalidDataType

I am assuming this means that it cannot find "result[0].col[0].stringVal" in the HTML.  It's there because I copied and pasted it straight from the source code.  The value I am trying to get is a hidden value so I don't know it that makes a difference or not?  "result[0].col[0].stringVal" contains a dynamically created key that is appended to the next web address I need to go to. 

<TD align=center><INPUT class=content-nogroove type=checkbox value=true name=result[0].chked>
    <INPUT type=hidden value=dynamickey name=result[0].col[0].stringVal>
    <INPUT type=hidden value=uhrnum name=result[0].col[1].stringVal>
</TD>

Also I am going to be changing out the Username and Password send, just haven't got to that yet.

Link to comment
Share on other sites

Global $oIE = _IECreate("https://***************/ccmadmin/showHome.do",0,1,1,1)
_IELoadWait($oIE)

This can actually be written like this, without the additional parameters (the _IELoadWait is implicit by default):

Global $oIE = _IECreate("https://***************/ccmadmin/showHome.do")

Also, don't use Send. Examine the html to find the name of the desired form / elements and then use _IEFormElementGetObjByName and _IEFormElementSetValue.

Link to comment
Share on other sites

; Send Username & Password
Send($uname&"{Tab}")
Send($pwd,1)
Send("{Enter}")

You do not need to set this in that way.

you can use:

_IEFormElementSetValue($oIE,....

 

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 so I know have this

; Start Jabber Setup
#include <IE.au3>

; Open Web Console and Wait for Load
Global $oIE = _IECreate("https://*****************/ccmadmin/showHome.do")

; Send Username & Password
Local $oForm = _IEFormGetObjByName($oIE,"logonform")
Local $oUname = _IEFormElementGetObjByName($oForm, "j_username")
Local $oPwd = _IEFormElementGetObjByName($oForm, "j_password")
_IEFormElementSetValue($oUname, $uname)
_IEFormElementSetValue($oPwd, $pwd)
_IEFormSubmit($oForm)
_IELoadWait($oIE)

; Navigate to Capabilities Assignment
_IENavigate($oIE,"https://*****************/ccmadmin/capassignFindList.do")

; Set User HR Number and Search
Global $oForm = _IEFormGetObjByName($oIE,"capassignFindListForm")
Local $oText = _IEFormElementGetObjByName($oForm, "searchString0")
_IEFormElementSetValue($oText, $uhrnum)
_IEFormSubmit($oForm)

; Get Link to Modify User
Local $oKey = _IEFormElementGetObjByName($oForm, "result[0].col[0].stringVal")
MsgBox(0,"Form", $oKey)

Is there any reason why

; Get Link to Modify User
Local $oKey = _IEFormElementGetObjByName($oForm, "result[0].col[0].stringVal")
MsgBox(0,"Form", $oKey)

Would not be working?  I get a 0 when I see the MsgBox.  I should see a very long key.

Link to comment
Share on other sites

lol let me show you what I am dealing with.

</select></td><td class='cuesTableFilterAreaTd'><input id='searchString9' onkeypress='javascript:onEnterKey(event)' value='' name='searchString9' type='text'/></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td></tr></table></div><table cellspacing='0' width='100%' class='cuesTableBg' border='0' summary='Find List Table Result'><tr class='cuesTableBg'><th id='check' align='absmiddle'><input value='true' class='content-nogroove' name='masterCheckBox' onclick='selectNamedRowsCheckbox(this)' type='checkbox'/></th><th id='User ID' align='left'><a href='javascript:onColumnFindSubmit("userid","false")' class='cuesToolbarLink'><span class='cuesTableColumnHeaderSorted'>User ID<img alt='Sort Descending' src='/ccmadmin/themes/VtgBlaf/SortAscending16.gif'/></span></a></th><th id='Last Name' align='left'><a href='javascript:onColumnFindSubmit("lastname","true")' class='cuesToolbarLink'>Last Name</a></th><th id='Manager' align='left'><a href='javascript:onColumnFindSubmit("manager","true")' class='cuesToolbarLink'>Manager</a></th><th id='Department' align='left'><a href='javascript:onColumnFindSubmit("department","true")' class='cuesToolbarLink'>Department</a></th><th id='CUP Enabled' align='left'><a href='javascript:onColumnFindSubmit("enablecups","true")' class='cuesToolbarLink'>CUP Enabled</a></th><th id='CUPC Enabled' align='left'><a href='javascript:onColumnFindSubmit("enablecupc","true")' class='cuesToolbarLink'>CUPC Enabled</a></th></tr><tr class='cuesTableRowEven'><td align='center'><input value='true' class='content-nogroove' name='result[0].chked' type='checkbox'/><input name='result[0].col[0].stringVal' type='hidden' value='DynamicKey'><input name='result[0].col[1].stringVal' type='hidden' value='UHRNUM'/></td><td align='left'><a href='capassignEdit.do?key='DynamicKey' class='cuesTextLink'>UHRNUM</a></td><td align='left'>Monarch</td><td align='left'></td><td align='left'>ANI</td><td align='left'><img src='/ccmadmin/themes/VtgBlaf/checkmark2.gif'/></td><td align='left'><img src='/ccmadmin/themes/VtgBlaf/checkmark2.gif'/></td></tr></table><table cellspacing='0' class='cuesTableButtonArea' border='0' cellpadding='0'><tr class='cuesTableButtonArea'><td><input onClick='onSelectAll(true)' class='cuesButton' id='1tbl' name='Select All' alt='Select All' value='Select All' type='button'><input onClick='onSelectAll(false)' class='cuesButton' id='2tbl' name='Clear All' alt='Clear All' value='Clear All' type='button'><input onClick='onAssign()' class='cuesButton' id='3tbl' name='Bulk Assignment' alt='Bulk Assignment' value='Bulk Assignment' type='button'></td><td align='right' style='vertical-align:middle'></td></tr></table>

As you can see, not pretty.  This is the Cisco Call Manager's output.  Very hard to navigate.  The line I am trying to get is:

<input name='result[0].col[0].stringVal' type='hidden' value='DynamicKey'>

 

Link to comment
Share on other sites

Update from yesterday......

By close of business yesterday, 4:30PM CST, I was able to get this far with this script.

; Start Jabber Setup
#include <IE.au3>

; Open Web Console and Wait for Load
Global $oIE = _IECreate("https://******************/ccmadmin/showHome.do")

; Send Username & Password
Local $oForm = _IEFormGetObjByName($oIE,"logonform")
Local $oUname = _IEFormElementGetObjByName($oForm, "j_username")
Local $oPwd = _IEFormElementGetObjByName($oForm, "j_password")
_IEFormElementSetValue($oUname, $uname)
_IEFormElementSetValue($oPwd, $pwd)
_IEFormSubmit($oForm)

; Navigate to Capabilities Assignment
_IENavigate($oIE,"https://******************/ccmadmin/capassignFindList.do")

; Set User HR Number and Search
Local $oForm = _IEFormGetObjByName($oIE,"capassignFindListForm")
Local $oText = _IEFormElementGetObjByName($oForm, "searchString0")
_IEFormElementSetValue($oText, $uhrnum)
_IEFormSubmit($oForm)

; Get Link to Modify User
_IELinkClickByText($oIE, $uhrnum)

; Verify CUP and CUPC are Enabled
Local $oForm = _IEFormGetObjByName($oIE,"capassignForm")
_IEFormElementCheckBoxSelect($oForm, 1, "",0,"byIndex")
_IEFormElementCheckBoxSelect($oForm, 1, "",1,"byIndex")
_IEFormSubmit($oForm)

; Navigate to List Phones
_IENavigate($oIE,"https://******************/ccmadmin/phoneEdit.do")

; Set Option to CUCSF and Submit
Local $oForm = _IEFormGetObjByName($oIE,"phoneForm")
Local $oSelect = _IEFormElementGetObjByName($oForm, "tkmodel")
_IEAction($oSelect, "focus")
_IEFormElementOptionSelect($oSelect, "503")
_IEFormSubmit($oForm)

; Set Device Name
Local $oForm = _IEFormGetObjByName($oIE,"phoneForm")
Local $oName = _IEFormElementGetObjByName($oForm, "name")
_IEFormElementSetValue($oName, "CSF" & $uext)

; Set Description
Local $oDesc = _IEFormElementGetObjByName($oForm, "description")
_IEFormElementSetValue($oDesc, "US5 " & $duname & " " & $uext)

; Set Device Pool
Local $oSelect = _IEFormElementGetObjByName($oForm, "fkdevicepool")
_IEAction($oSelect, "focus")
_IEFormElementOptionSelect($oSelect, "0f8019b9-0069-59f0-5e02-3a873e6bb2b6")

; Set Phone Button Template
Local $oSelect = _IEFormElementGetObjByName($oForm, "fkphonetemplate")
_IEAction($oSelect, "focus")
_IEFormElementOptionSelect($oSelect, "8e1a10fa-a52c-4435-a4ec-540d266c8c37")

; Set Calling Search Space
Local $oSelect = _IEFormElementGetObjByName($oForm, "fkcallingsearchspace")
_IEAction($oSelect, "focus")
_IEFormElementOptionSelect($oSelect, "8462f516-112b-b875-0b4d-9ac3f828655a")

; Set AAR Calling Search Space
Local $oSelect = _IEFormElementGetObjByName($oForm, "fkcallingsearchspace_aar")
_IEAction($oSelect, "focus")
_IEFormElementOptionSelect($oSelect, "60e4e653-5653-aa9d-9436-5c3ce97f4fc3")

; Set Media Resource Group List
Local $oSelect = _IEFormElementGetObjByName($oForm, "fkmediaresourcelist")
_IEAction($oSelect, "focus")
_IEFormElementOptionSelect($oSelect, "28d6ccdf-9114-28db-906c-4a1c7f7158fc")

; Set AAR Group
Local $oSelect = _IEFormElementGetObjByName($oForm, "fkaarneighborhood")
_IEAction($oSelect, "focus")
_IEFormElementOptionSelect($oSelect, "5efbf00a-fec9-3c0b-d6b7-4a319e697323")

; Set User Locale
Local $oSelect = _IEFormElementGetObjByName($oForm, "tkuserlocale")
_IEAction($oSelect, "focus")
_IEFormElementOptionSelect($oSelect, "1")

; Set Primary Phone
;Local $oSelect = _IEFormElementGetObjByName($oForm, "ikdevice_primaryphone")
;_IEAction($oSelect, "focus")
;_IEFormElementOptionSelect($oSelect, "a73e1e1d-fb5a-5424-af2f-e9b7e5f3e753")

; Set Device Security Profile
Local $oSelect = _IEFormElementGetObjByName($oForm, "fkSecurityProfile")
_IEAction($oSelect, "focus")
_IEFormElementOptionSelect($oSelect, "c6085e14-a32c-4c5e-a3d1-8daf60d81594")

; Set SUBSCRIBE Calling Search Space
Local $oSelect = _IEFormElementGetObjByName($oForm, "fkCallingSearchSpace_Restrict")
_IEAction($oSelect, "focus")
_IEFormElementOptionSelect($oSelect, "4c954640-da11-3b39-0619-829c21aad7ec")

; Set Device Security Profile
Local $oSelect = _IEFormElementGetObjByName($oForm, "fkSIPProfile")
_IEAction($oSelect, "focus")
_IEFormElementOptionSelect($oSelect, "d5e200ed-70cd-13fe-5c07-6ea8bbfd3f1a")

The section I have commented out I am having issues with.  That long key identifies individual phones and I have to choose it from a popup window.  I know I can get that key if I can set focus to the popup window.  Any suggestions?

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