monarch684 Posted April 28, 2015 Share Posted April 28, 2015 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 More sharing options...
Danp2 Posted April 28, 2015 Share Posted April 28, 2015 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! Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
monarch684 Posted April 29, 2015 Author Share Posted April 29, 2015 (edited) Here is the entire code:expandcollapse popup; 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 April 29, 2015 by monarch684 Typo Link to comment Share on other sites More sharing options...
monarch684 Posted April 29, 2015 Author Share Posted April 29, 2015 Just as a side note, I am running IE11. Link to comment Share on other sites More sharing options...
mLipok Posted April 29, 2015 Share Posted April 29, 2015 (edited) 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 useLocal $oIE = _IECreate(... _IENavigate($oIE , .... $oIeObj = _IEFormGetObjByName($oIE, ... _IEFormElementCheckBoxSelect($oIeObj, ... Edited April 29, 2015 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 Code * for 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 API * ErrorLog.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 TaskScheduler * IE 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 stuff * OnHungApp handler * Avoid "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" , 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 More sharing options...
monarch684 Posted April 29, 2015 Author Share Posted April 29, 2015 @mLipokCan you please explain? If your way is better I would love to use it because it is a lot shorter. Link to comment Share on other sites More sharing options...
Danp2 Posted April 29, 2015 Share Posted April 29, 2015 Using the Send command to interact with a web browser is not the recommended approach. Use the _IE commands as indicated by mLiipok. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
mLipok Posted April 29, 2015 Share Posted April 29, 2015 Here you can find more details:https://www.autoitscript.com/autoit3/docs/libfunctions.htm https://www.autoitscript.com/autoit3/docs/libfunctions/_IECreate.htmhttps://www.autoitscript.com/autoit3/docs/libfunctions/_IENavigate.htmhttps://www.autoitscript.com/autoit3/docs/libfunctions/_IEGetObjByName.htmhttps://www.autoitscript.com/autoit3/docs/libfunctions/_IEFormElementCheckBoxSelect.htm https://www.autoitscript.com/autoit3/docs/libfunctions/_IE_Example.htm try to play with it, and back with your first second code. 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 Code * for 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 API * ErrorLog.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 TaskScheduler * IE 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 stuff * OnHungApp handler * Avoid "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" , 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 More sharing options...
monarch684 Posted April 29, 2015 Author Share Posted April 29, 2015 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_InvalidDataTypeI 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 More sharing options...
Danp2 Posted April 29, 2015 Share Posted April 29, 2015 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. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
mLipok Posted April 29, 2015 Share Posted April 29, 2015 ; 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 Code * for 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 API * ErrorLog.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 TaskScheduler * IE 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 stuff * OnHungApp handler * Avoid "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" , 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 More sharing options...
monarch684 Posted April 29, 2015 Author Share Posted April 29, 2015 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 More sharing options...
Danp2 Posted April 29, 2015 Share Posted April 29, 2015 FYI -- The call to _IELoadWait after _IEFormSubmit is redundant unless you pass 0 for the 2nd parameter of _IEFormSubmit.Never seen a form object with this kind of naming. Are you sure those are the correct input fields? I suspect not because the have type=hidden in their definition. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
monarch684 Posted April 29, 2015 Author Share Posted April 29, 2015 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 More sharing options...
monarch684 Posted April 29, 2015 Author Share Posted April 29, 2015 Yay for me......I got this to work:; Get Link to Modify User _IELinkClickByText($oIE, $uhrnum) Link to comment Share on other sites More sharing options...
monarch684 Posted April 30, 2015 Author Share Posted April 30, 2015 Update from yesterday......By close of business yesterday, 4:30PM CST, I was able to get this far with this script.expandcollapse popup; 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 More sharing options...
monarch684 Posted April 30, 2015 Author Share Posted April 30, 2015 Ok well my original question was solved. Thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now