monarch684

Sending commands to popup form

3 posts in this topic

I need to input text and submit a form that popups.  Here is what I got so far but it is not working.

; Find Phone Popup
$pIE = WinGetTitle("[Active]")
$oForm = _IEFormGetObjByName($pIE,"phoneFindListForm")
$oSelect = _IEFormElementGetObjByName($oForm, "searchField0")
_IEAction($oSelect, "focus")
_IEFormElementOptionSelect($oSelect, "numplan.dnorpattern")

When this runs I get the following error.

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

--> IE.au3 T3.0-1 Error from function _IEAction(focus), $_IESTATUS_InvalidDataType

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

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

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

--> IE.au3 T3.0-1 Error from function _IEAction(focus), $_IESTATUS_InvalidDataType

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

I am thinking my issue is getting the _IEFormGetObjByName() correct and the rest of the script will work.  Once the form is submitted the focus should go back to the original form.

Share this post


Link to post
Share on other sites



Any chance we can access this form, so that we may get a better idea of the situation?


Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Share this post


Link to post
Share on other sites

Unfortunately not.  My company does not allow outside access to anything on the network.  I can, however, post the html.

<html lang="en" dir="ltr"> 

    <head>
        
        
            <link href="/ccmadmin/themes/VtgBlaf/vtgblaf_percent.css" type="text/css" rel="stylesheet" title="JLF - Preferred" > 
            <link href="/ccmadmin/themes/VtgBlaf/admin-menu.css" type="text/css" rel="stylesheet" title="JLF - Preferred" >

            <style type="text/css">
                .content { padding: 0px }
            </style>
            
            <script type="text/javascript" src="/ccmadmin/javascripts/common/style-menu.js"></script>
        

        <script type="text/javascript" src="/ccmadmin/javascripts/common/statusbox.js"></script>        

        <script type="text/javascript" src="/ccmadmin/javascripts/common/udm-control.js"></script>
        <script type="text/javascript" src="/ccmadmin/javascripts/common/menu.js"></script>
        <script type="text/javascript" src="/ccmadmin/javascripts/common/onlinehelp.js"></script>
        <script type="text/javascript" src="/ccmadmin/javascripts/common/collection-actions.js"></script>
        <script type="text/javascript" >
            // These are the messages used in the Standard.js Javascript functions. 

var msgNotUnique = '- must be unique. Please specify a unique value and try again.';
var msgIsRequired = '- is Required.  Please specify a value and try again.';
var msgNotNumeric = '- must be a number.';

var msgMACTooShort = '- must be exactly 12 characters long. ';
var msgMACCharacters = '- can contain only hexadecimal characters.';
var msgInvalidInstanceID='- may only contain 1-128 alphanumeric characters, dot(.), dashes (-), and underscores (_).';

var msgMultiDeviceResetNoDevices ="There are no associated devices to restart.";
var msgValidCharacters = "@ contains one or more invalid characters. Valid characters for @ are \n#";
var msgConjunction = "and  ";
var msgOtherValidChars = "the following character(s): \n\n";
var msgInvalidCharacters = "@ contains one or more invalid characters. Characters which are not valid for @ are \n#";
var jsErrInvalidDescription = '@ contains invalid characters. @ may not contain ampersand (&), double quotes ("), \nbrackets ([ ]), less than (<), greater than (>), nor the percent sign (%).';
var lblDescription = "Description";
var lblAnItem = "An item";
var lblNextSetOfItems = "--- Next group of items ---";
var lblPrevSetOfItems = "--- Previous group of items ---";
var jsErrDuplicate = "'#' is already in use. Please enter a unique value for @ to continue.";
var jsErrIsRequired = "@ is a required field. Please enter the value for @ to continue.";
var jsErrIsTooLong = "@ cannot contain more than # characters. Please correct the value for @ to continue.";
var jsErrOutOfRange = "@ must be a value from # to % (inclusive). Please correct the value for @ to continue.";
var jsMsgDNDependency = "The following Directory Numbers used by @ are in Pilot Hunt Groups: \n \n%list%\nYou must remove the Directory Number(s) above from the listed Pilot Hunt Group(s) before deleting this device.";
var jsMsgUsedin = "used in ";
var msgDeleteConfirm = "You are about to permanently delete this @. \nThis action cannot be undone.\n \nContinue?";
var jsErrDeleteInUse = "@ could not be deleted because it is in use. \nClick the Dependency Records link to view its dependencies.";
var jsErrDeleteInUse_List = "@ could not be deleted because it is in use. Click on @ \nand then click the Dependency Records link to view its dependencies.";
var jsErrSpecialIP = "Value for @ is a special IP Address which is not valid. Do you want to continue with this value?";
var jsErrDNSInvalidFirstChars = "The first character of a Host Name can only be a letter.\nPlease adjust your entry for @ to continue.";
var jsErrDNSInvalidLastChars = "The last character of Host Name can only be a letter or a number.\nPlease adjust your entry for @ to continue.";
var jsErrInvalidIP = "Value entered for @ is not a valid dotted-decimal IP address.\nIP Address should have four 8-bits numbers(Octets) separated by periods \n(Ex: 192.0.0.26). The value of each octet should be between 0 and 255.\nPlease adjust your entry to continue.";
var jsErrDNSInvalidChars = "Value entered for @ contain invalid characters.";
var jsErrCouldNotResolveDNS = "Value entered for @ could not be resolved to an IP Address from DNS. Do you want to continue?";
var msgScriptInjection = "Searching using JavaScript keywords are not allowed.";

        </script>
        <script type="text/javascript" src="/ccmadmin/javascripts/common/standard.js"></script>
        <script type="text/javascript" src="/ccmadmin/javascripts/common/newstandard.js"></script>
        <script type="text/javascript" src="/ccmadmin/javascripts/common/menubar.js"></script>


        <title>
            




    Find and List Phones    
    


        </title>
        
        
        <script>

            function nsOnResize()
            {
                try {
                    var windowHeight;
                    var windowWidth;

                    if (!(/MSIE/i.test(navigator.userAgent))) {
                        windowHeight = window.innerHeight;
                        windowWidth  = window.innerWidth;
                    }
                    else {
                        windowHeight = document.body.clientHeight;
                        windowWidth  = document.body.clientWidth;
                    }

                    var tnb = document.getElementById('topnavbar').offsetHeight;
                    document.getElementById("contentautoscroll").style.height = windowHeight - tnb - 2 + "px";  
                    document.getElementById("contentautoscroll").style.width = windowWidth - 2 + "px";
                    document.getElementById("topnavbar").style.width = windowWidth + "px";                    
                } 
                catch (e) {
                    window.status = e.message;
                }
            }    
        </script>

        </head>
        <body id='mainbody' class='layout' style= "overflow: hidden" dir="ltr" onresize='nsOnResize()'>
        <a href="#navskip" style='display:none'><img src="/ccmadmin/themes/VtgBlaf/s.gif" width="400" height="0" border="0" alt="skip to main content"></img></a>


        <div id="topnavbar" style="width:100%">

                    

                    <table class="menubar" width="100%" cellpadding="0" cellspacing="0" border="0" summary='Menu Bar Layout Layout'>
                        <tr>
                            <td class="menubar-title" nowrap>
                                
                            </td>
                        </tr>
                    </table>

                    <table class="titlebar" width="100%" cellpadding="0" cellspacing="0" border="0" summary='Title Bar Layout Layout'>
                        <tr>
                            <td class="titlebar-title">
                                




    Find and List Phones    
    


                            </td>
                            
                                <td class="titlebar-jumpmenu">
                            
                                



 



    <span class="label">Related Links:</span>
    <select  id='menu1' name='menu1'>
        <option  value='/gendeviceLoginFindList.do'>
            Actively Logged In Device Report
        </option >
        <option  value='/gendeviceRemoteLoginFindList.do'>
            Remotely Logged In Device
        </option >

    </select >
    <input name="goButton" value="Go" onclick="MM_jumpMenuGo('menu1','window','/ccmadmin', 1)" type='button'>

                            </td>
                        </tr>
                    </table>

                    



 



    
<!-- ******* TOOLBAR : Start of GENERATED HTML ******* -->

<div class="toolbar" style="height:4px">
    <table border="0" cellpadding="0" cellspacing="0" 
           summary='<bean:message key="table.summary.toolbar"/> Layout' >
        <tr><td>
        </td></tr>
    </table>
</div>

<!-- ******* TOOLBAR : End of GENERATED HTML ******* -->





                </div>

                <A name="navskip" id="navskip" ></A>
                <table class="content" width="100%" height="100%" cellpadding="1" cellspacing="0" border="0" summary="Content Main Layout">
                    <tr>
                        <td valign="top">
                            <div id="contentautoscroll" class="content-auto-scroll">
                                







 





  


    
   <form name="phoneFindListForm" method="post" action="/ccmadmin/phoneFindList.do"><div><input type="hidden" name="org.apache.struts.taglib.html.TOKEN" value="a9a2f471b79adfada5cdbda2ec34aba8"></div>
   
    
        
        

    
    

  


 
    
        <br>
<!-- ******* FINDLIST : Start of GENERATED HTML ******* -->

<table id='t12' cellspacing='0' width='100%' class='cuesTableTitleBg' border='0' summary='Find List Table Title'><tr class='cuesTableTitleBg'><td align='left' class='cuesTableTitleButtonRow'><span style='vertical-align:middle' class='cuesTableTitle'>Phone</span><span style='vertical-align:middle' class='cuesTableTitleItem'></span></td><td></td></tr></table><div class='cuesTableFilterArea'><input name='rowsVisible' type='hidden' value='1'/><table id='cuesTableFilter' cellspacing='0' cellpadding='0' summary='Find List Table Search Criteria'><tr id='filterRow0' style='display:'><td class='cuesTableFilterAreaTd'>Find&nbsp;<input name='primaryTable' type='hidden' value='device'/><input name='dispCols' type='hidden' value='pkid#name#description#fkdevicepool#tkDeviceProtocol#fkcallingsearchspace#tkCertificateOperation#tkCertificateStatus#authenticationString#fksecurityprofile#tkProduct#mgcpid#fkcommondeviceconfig'/></td><td class='cuesTableFilterAreaTd'>Phone&nbsp;</td><td class='cuesTableFilterAreaTd'>where&nbsp;</td><td class='cuesTableFilterAreaTd'><select onchange='getUtilityListValues(this, "PhoneFindListForm", updateUtilityList)' size='1' id='searchField0' name='searchField0'>
<option value='device.name'>Device Name</option>
<option value='device.description'>Description</option>
<option value='numplan.dnorpattern'>Directory Number</option>
<option value='callingsearchspace.name'>Calling Search Space</option>
<option value='devicepool.name'>Device Pool</option>
<option value='TypeProduct.name'>Device Type</option>
<option value='pickupgroup.name'>Call Pickup Group</option>
<option value='TypeCertificateStatus.name'>LSC Status</option>
<option value='device.authenticationString'>Authentication String</option>
<option value='TypeDeviceProtocol.name'>Device Protocol</option>
<option value='securityprofile.name'>Security Profile</option>
<option value='commondeviceconfig.name'>Common Device Configuration</option>
</select></td><td class='cuesTableFilterAreaTd'><select id='searchLimit0' name='searchLimit0' size='1'>
<option value='beginsWith'>begins with</option>
<option value='contains'>contains</option>
<option value='endsWith'>ends with</option>
<option value='isExactly'>is exactly</option>
<option value='isEmpty'>is empty</option>
<option value='isNotEmpty'>is not empty</option>
</select></td><td class='cuesTableFilterAreaTd'><input id='searchString0' onkeypress='javascript:onEnterKey(event)' value='' name='searchString0' type='text'/></td><td class='cuesTableFilterAreaTd'><input value='Find' class='cuesButton' name='findButton' onclick='javascript:onPopupFind()' type='button'/></td><td class='cuesTableFilterAreaTd'><input value='Clear Filter' class='cuesButton' name='clearFilterButton' onclick='javascript:clearFilter()' type='button'/></td><td class='cuesTableFilterAreaTd'><button class='cuesButton' style='width:30px' onclick='javascript:addFilterRow()' type='button'><img alt='Add Search Parameter' src='images/Add16T.gif'/></button></td><td class='cuesTableFilterAreaTd'><button class='cuesButton' style='width:30px' onclick='javascript:removeFilterRow()' type='button'><img alt='Remove Search Parameter' src='images/Subtract16T.gif'/></button></td></tr><tr id='filterRow1' style='display:none'><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'><select onchange='getUtilityListValues(this, "PhoneFindListForm", updateUtilityList)' size='1' id='searchField1' name='searchField1'>
<option value='device.name'>Device Name</option>
<option value='device.description'>Description</option>
<option value='numplan.dnorpattern'>Directory Number</option>
<option value='callingsearchspace.name'>Calling Search Space</option>
<option value='devicepool.name'>Device Pool</option>
<option value='TypeProduct.name'>Device Type</option>
<option value='pickupgroup.name'>Call Pickup Group</option>
<option value='TypeCertificateStatus.name'>LSC Status</option>
<option value='device.authenticationString'>Authentication String</option>
<option value='TypeDeviceProtocol.name'>Device Protocol</option>
<option value='securityprofile.name'>Security Profile</option>
<option value='commondeviceconfig.name'>Common Device Configuration</option>
</select></td><td class='cuesTableFilterAreaTd'><select id='searchLimit1' name='searchLimit1' size='1'>
<option value='beginsWith'>begins with</option>
<option value='contains'>contains</option>
<option value='endsWith'>ends with</option>
<option value='isExactly'>is exactly</option>
<option value='isEmpty'>is empty</option>
<option value='isNotEmpty'>is not empty</option>
</select></td><td class='cuesTableFilterAreaTd'><input id='searchString1' onkeypress='javascript:onEnterKey(event)' value='' name='searchString1' type='text'/></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td></tr><tr id='filterRow2' style='display:none'><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'><select onchange='getUtilityListValues(this, "PhoneFindListForm", updateUtilityList)' size='1' id='searchField2' name='searchField2'>
<option value='device.name'>Device Name</option>
<option value='device.description'>Description</option>
<option value='numplan.dnorpattern'>Directory Number</option>
<option value='callingsearchspace.name'>Calling Search Space</option>
<option value='devicepool.name'>Device Pool</option>
<option value='TypeProduct.name'>Device Type</option>
<option value='pickupgroup.name'>Call Pickup Group</option>
<option value='TypeCertificateStatus.name'>LSC Status</option>
<option value='device.authenticationString'>Authentication String</option>
<option value='TypeDeviceProtocol.name'>Device Protocol</option>
<option value='securityprofile.name'>Security Profile</option>
<option value='commondeviceconfig.name'>Common Device Configuration</option>
</select></td><td class='cuesTableFilterAreaTd'><select id='searchLimit2' name='searchLimit2' size='1'>
<option value='beginsWith'>begins with</option>
<option value='contains'>contains</option>
<option value='endsWith'>ends with</option>
<option value='isExactly'>is exactly</option>
<option value='isEmpty'>is empty</option>
<option value='isNotEmpty'>is not empty</option>
</select></td><td class='cuesTableFilterAreaTd'><input id='searchString2' onkeypress='javascript:onEnterKey(event)' value='' name='searchString2' type='text'/></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td></tr><tr id='filterRow3' style='display:none'><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'><select onchange='getUtilityListValues(this, "PhoneFindListForm", updateUtilityList)' size='1' id='searchField3' name='searchField3'>
<option value='device.name'>Device Name</option>
<option value='device.description'>Description</option>
<option value='numplan.dnorpattern'>Directory Number</option>
<option value='callingsearchspace.name'>Calling Search Space</option>
<option value='devicepool.name'>Device Pool</option>
<option value='TypeProduct.name'>Device Type</option>
<option value='pickupgroup.name'>Call Pickup Group</option>
<option value='TypeCertificateStatus.name'>LSC Status</option>
<option value='device.authenticationString'>Authentication String</option>
<option value='TypeDeviceProtocol.name'>Device Protocol</option>
<option value='securityprofile.name'>Security Profile</option>
<option value='commondeviceconfig.name'>Common Device Configuration</option>
</select></td><td class='cuesTableFilterAreaTd'><select id='searchLimit3' name='searchLimit3' size='1'>
<option value='beginsWith'>begins with</option>
<option value='contains'>contains</option>
<option value='endsWith'>ends with</option>
<option value='isExactly'>is exactly</option>
<option value='isEmpty'>is empty</option>
<option value='isNotEmpty'>is not empty</option>
</select></td><td class='cuesTableFilterAreaTd'><input id='searchString3' onkeypress='javascript:onEnterKey(event)' value='' name='searchString3' type='text'/></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td></tr><tr id='filterRow4' style='display:none'><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'><select onchange='getUtilityListValues(this, "PhoneFindListForm", updateUtilityList)' size='1' id='searchField4' name='searchField4'>
<option value='device.name'>Device Name</option>
<option value='device.description'>Description</option>
<option value='numplan.dnorpattern'>Directory Number</option>
<option value='callingsearchspace.name'>Calling Search Space</option>
<option value='devicepool.name'>Device Pool</option>
<option value='TypeProduct.name'>Device Type</option>
<option value='pickupgroup.name'>Call Pickup Group</option>
<option value='TypeCertificateStatus.name'>LSC Status</option>
<option value='device.authenticationString'>Authentication String</option>
<option value='TypeDeviceProtocol.name'>Device Protocol</option>
<option value='securityprofile.name'>Security Profile</option>
<option value='commondeviceconfig.name'>Common Device Configuration</option>
</select></td><td class='cuesTableFilterAreaTd'><select id='searchLimit4' name='searchLimit4' size='1'>
<option value='beginsWith'>begins with</option>
<option value='contains'>contains</option>
<option value='endsWith'>ends with</option>
<option value='isExactly'>is exactly</option>
<option value='isEmpty'>is empty</option>
<option value='isNotEmpty'>is not empty</option>
</select></td><td class='cuesTableFilterAreaTd'><input id='searchString4' onkeypress='javascript:onEnterKey(event)' value='' name='searchString4' type='text'/></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td></tr><tr id='filterRow5' style='display:none'><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'><select onchange='getUtilityListValues(this, "PhoneFindListForm", updateUtilityList)' size='1' id='searchField5' name='searchField5'>
<option value='device.name'>Device Name</option>
<option value='device.description'>Description</option>
<option value='numplan.dnorpattern'>Directory Number</option>
<option value='callingsearchspace.name'>Calling Search Space</option>
<option value='devicepool.name'>Device Pool</option>
<option value='TypeProduct.name'>Device Type</option>
<option value='pickupgroup.name'>Call Pickup Group</option>
<option value='TypeCertificateStatus.name'>LSC Status</option>
<option value='device.authenticationString'>Authentication String</option>
<option value='TypeDeviceProtocol.name'>Device Protocol</option>
<option value='securityprofile.name'>Security Profile</option>
<option value='commondeviceconfig.name'>Common Device Configuration</option>
</select></td><td class='cuesTableFilterAreaTd'><select id='searchLimit5' name='searchLimit5' size='1'>
<option value='beginsWith'>begins with</option>
<option value='contains'>contains</option>
<option value='endsWith'>ends with</option>
<option value='isExactly'>is exactly</option>
<option value='isEmpty'>is empty</option>
<option value='isNotEmpty'>is not empty</option>
</select></td><td class='cuesTableFilterAreaTd'><input id='searchString5' onkeypress='javascript:onEnterKey(event)' value='' name='searchString5' type='text'/></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td></tr><tr id='filterRow6' style='display:none'><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'><select onchange='getUtilityListValues(this, "PhoneFindListForm", updateUtilityList)' size='1' id='searchField6' name='searchField6'>
<option value='device.name'>Device Name</option>
<option value='device.description'>Description</option>
<option value='numplan.dnorpattern'>Directory Number</option>
<option value='callingsearchspace.name'>Calling Search Space</option>
<option value='devicepool.name'>Device Pool</option>
<option value='TypeProduct.name'>Device Type</option>
<option value='pickupgroup.name'>Call Pickup Group</option>
<option value='TypeCertificateStatus.name'>LSC Status</option>
<option value='device.authenticationString'>Authentication String</option>
<option value='TypeDeviceProtocol.name'>Device Protocol</option>
<option value='securityprofile.name'>Security Profile</option>
<option value='commondeviceconfig.name'>Common Device Configuration</option>
</select></td><td class='cuesTableFilterAreaTd'><select id='searchLimit6' name='searchLimit6' size='1'>
<option value='beginsWith'>begins with</option>
<option value='contains'>contains</option>
<option value='endsWith'>ends with</option>
<option value='isExactly'>is exactly</option>
<option value='isEmpty'>is empty</option>
<option value='isNotEmpty'>is not empty</option>
</select></td><td class='cuesTableFilterAreaTd'><input id='searchString6' onkeypress='javascript:onEnterKey(event)' value='' name='searchString6' type='text'/></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td></tr><tr id='filterRow7' style='display:none'><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'><select onchange='getUtilityListValues(this, "PhoneFindListForm", updateUtilityList)' size='1' id='searchField7' name='searchField7'>
<option value='device.name'>Device Name</option>
<option value='device.description'>Description</option>
<option value='numplan.dnorpattern'>Directory Number</option>
<option value='callingsearchspace.name'>Calling Search Space</option>
<option value='devicepool.name'>Device Pool</option>
<option value='TypeProduct.name'>Device Type</option>
<option value='pickupgroup.name'>Call Pickup Group</option>
<option value='TypeCertificateStatus.name'>LSC Status</option>
<option value='device.authenticationString'>Authentication String</option>
<option value='TypeDeviceProtocol.name'>Device Protocol</option>
<option value='securityprofile.name'>Security Profile</option>
<option value='commondeviceconfig.name'>Common Device Configuration</option>
</select></td><td class='cuesTableFilterAreaTd'><select id='searchLimit7' name='searchLimit7' size='1'>
<option value='beginsWith'>begins with</option>
<option value='contains'>contains</option>
<option value='endsWith'>ends with</option>
<option value='isExactly'>is exactly</option>
<option value='isEmpty'>is empty</option>
<option value='isNotEmpty'>is not empty</option>
</select></td><td class='cuesTableFilterAreaTd'><input id='searchString7' onkeypress='javascript:onEnterKey(event)' value='' name='searchString7' type='text'/></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td></tr><tr id='filterRow8' style='display:none'><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'><select onchange='getUtilityListValues(this, "PhoneFindListForm", updateUtilityList)' size='1' id='searchField8' name='searchField8'>
<option value='device.name'>Device Name</option>
<option value='device.description'>Description</option>
<option value='numplan.dnorpattern'>Directory Number</option>
<option value='callingsearchspace.name'>Calling Search Space</option>
<option value='devicepool.name'>Device Pool</option>
<option value='TypeProduct.name'>Device Type</option>
<option value='pickupgroup.name'>Call Pickup Group</option>
<option value='TypeCertificateStatus.name'>LSC Status</option>
<option value='device.authenticationString'>Authentication String</option>
<option value='TypeDeviceProtocol.name'>Device Protocol</option>
<option value='securityprofile.name'>Security Profile</option>
<option value='commondeviceconfig.name'>Common Device Configuration</option>
</select></td><td class='cuesTableFilterAreaTd'><select id='searchLimit8' name='searchLimit8' size='1'>
<option value='beginsWith'>begins with</option>
<option value='contains'>contains</option>
<option value='endsWith'>ends with</option>
<option value='isExactly'>is exactly</option>
<option value='isEmpty'>is empty</option>
<option value='isNotEmpty'>is not empty</option>
</select></td><td class='cuesTableFilterAreaTd'><input id='searchString8' onkeypress='javascript:onEnterKey(event)' value='' name='searchString8' type='text'/></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td></tr><tr id='filterRow9' style='display:none'><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'></td><td class='cuesTableFilterAreaTd'><select onchange='getUtilityListValues(this, "PhoneFindListForm", updateUtilityList)' size='1' id='searchField9' name='searchField9'>
<option value='device.name'>Device Name</option>
<option value='device.description'>Description</option>
<option value='numplan.dnorpattern'>Directory Number</option>
<option value='callingsearchspace.name'>Calling Search Space</option>
<option value='devicepool.name'>Device Pool</option>
<option value='TypeProduct.name'>Device Type</option>
<option value='pickupgroup.name'>Call Pickup Group</option>
<option value='TypeCertificateStatus.name'>LSC Status</option>
<option value='device.authenticationString'>Authentication String</option>
<option value='TypeDeviceProtocol.name'>Device Protocol</option>
<option value='securityprofile.name'>Security Profile</option>
<option value='commondeviceconfig.name'>Common Device Configuration</option>
</select></td><td class='cuesTableFilterAreaTd'><select id='searchLimit9' name='searchLimit9' size='1'>
<option value='beginsWith'>begins with</option>
<option value='contains'>contains</option>
<option value='endsWith'>ends with</option>
<option value='isExactly'>is exactly</option>
<option value='isEmpty'>is empty</option>
<option value='isNotEmpty'>is not empty</option>
</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><td class='cuesTableFilterAreaTd'></td></tr><tr id='utilityListRow'><td colspan='5'></td><td colspan='100%'><select onchange='updateSearchString()' name='utilityList' size='1'>
<option>Select item or enter search text</option>
</select></td></tr></table></div><table cellspacing='0' width='100%' class='cuesTableBg' border='0' summary='Find List Table Result'><tr class='cuesTableBg'><th id='message'>No active query.  Please enter your search criteria using the options above.</th></tr></table><!-- ******* BEGIN OF GENERATED JAVASCRIPTS (FindListSearch) ******* -->
<script language="JavaScript" type=text/javascript>
<!-- Begin 
function onPopupFind()
{
  var myaction = "phoneFindList.do?whereClause=device.tkClass=1&colCnt=13&recCnt=0&lookup=true&multiple=false";
  document.forms[0].action = myaction;
  document.forms[0].submit();
}

function onClose()
{
   window.close();
}

//End -->
</script>
<!-- ******* END  OF GENERATED JAVASCRIPTS (FindListSearch) ******* -->
<!-- ******* BEGIN OF GENERATED JAVASCRIPTS (FindListSearch) ******* -->
<script language="JavaScript" type=text/javascript>
<!-- Begin 
function selectNamedRowsCheckbox(myCheck)
{
   if (myCheck.checked == true) {
      onSelectAll(true);
   } else {
      onSelectAll(false);
   }
}

function selectAll(form, regex, state) {

 for (var i = 0; i < form.length; i++) {
   if ( (form.elements[i].name != null) && (form.elements[i].name.match(regex)) ) {
    form.elements[i].checked = state;
   }
 }
}

function onSelectAll(state) {
 var regex = /^result\[(.*)\].chked/;
 selectAll(document.forms[0], regex, state );
}

function onColumnFindSubmit(sortColumn, sortAscend) {

  var pageNumber = document.getElementById("pageNumber");
  if( pageNumber != null )
  {
    pageNumber.value = 1;
  }
 if (document.forms[0].action.indexOf("?") > 0) {
  document.forms[0].action += "&sortColumn=" + sortColumn + "&sortAscend=" + sortAscend;
 } else {
  document.forms[0].action += "?sortColumn=" + sortColumn + "&sortAscend=" + sortAscend;
 }
  document.forms[0].action = "phoneFindList.do?whereClause=device.tkClass=1&colCnt=13&recCnt=0&lookup=true&multiple=false&sortColumn=" + sortColumn + "&sortAscend=" + sortAscend;
  document.forms[0].submit();
}

var req;
function initRequest() {
     if (window.XMLHttpRequest) {
          req = new XMLHttpRequest();
     } else if (window.ActiveXObject) {
          req = new ActiveXObject("Microsoft.XMLHTTP");
     }
}

function updateSearchString() {
     f = document.forms[0];
     var currentRow = (f.rowsVisible.value - 1); 
     var currentLimitValue = getValue(eval("f.searchLimit"+currentRow)); 
     if (currentLimitValue == "isEmpty"||currentLimitValue == "isNotEmpty") {
          eval("f.searchString" + currentRow).value = "";
     }
     else if (f.utilityList.selectedIndex != 0) {
            if (getValue(f.utilityList) != "") {
               var el = eval("f.searchString" + currentRow);
               el.value = f.utilityList[f.utilityList.selectedIndex].text;
          }
     }
}

function getUtilityListValues(element, classname, cbfunction) {
  var lookup = getValue(element);
  var url = "/ccmadmin/populateUtilityListAction.do?classname=" + classname + "&lookup=" + lookup;
  initRequest();
  // set the callback for the request execution
  req.onreadystatechange = cbfunction;
  req.open("GET", url, true);
  req.send(null);
}

function updateUtilityList() {
     var f = document.forms[0];
     // clear the list/n     f.utilityList.selectedIndex = 0;
     f.utilityList.length = 1;     updateSearchString();
     if (req.readyState == 4) {
          if (req.status == 200) {
               f.utilityList.options[0] = new Option("Select item or enter search text", '');
               if (req.responseXML.getElementsByTagName("result")[0].childNodes.length > 0) {
                   var result = req.responseXML.getElementsByTagName("result")[0].childNodes[0].nodeValue;
                   var list = result.split(",")
                   for (i = 0; i < list.length; i++) {
                        f.utilityList.options[i+1] = new Option(list[i], list[i]);
                   }
               }
          }
     }
}

function onEnterKey(e) {
 var keycode;
 if (window.event) {
     keycode = window.event.keyCode;
 } else if (e) { 
     keycode = e.which;
 } else {
    return true;
 }
 if (keycode == 13) {
    onPopupFind();
   return false;
 } else {
   return true;
 }
}

//End -->
</script>
<!-- ******* END  OF GENERATED JAVASCRIPTS (FindListSearch) ******* -->
<!-- ******* BEGIN OF GENERATED JAVASCRIPTS (Search within Search DHTML) ******* -->
<script language="JavaScript" type=text/javascript>
<!-- Begin 
// Global variable for keeping track of visible rows.
var rowsVisible = document.forms[0].rowsVisible; // this comes from form

// Global variable for max rows to show.
var maxRows = 10;

//Grab text in td elements that are to the right of the pattern text box and save for later.
var firstRow = document.getElementById('cuesTableFilter').rows[0].cells;
var startTdIndex = 6;

// save off td data for later
var savedTdData = new Array();
for (var i=startTdIndex; i < firstRow.length; i++) {
     savedTdData[savedTdData.length] = firstRow[i].innerHTML;
}

// show buttons for last row if more than one row
if (rowsVisible.value > 1) {
     removeButtonTds(0);
     addButtonTds(rowsVisible.value - 1);
}

function addFilterRow() {
     if (rowsVisible.value < 10) {
          var style = document.getElementById('filterRow' + rowsVisible.value).style;
          style.display = '';
          removeButtonTds(rowsVisible.value - 1);
          addButtonTds(rowsVisible.value);
          rowsVisible.value++;
          if (window.getUtilityListValues) {
              getUtilityListValues(document.getElementById('searchField' + (rowsVisible.value - 1)), "PhoneFindListForm", updateUtilityList);
          }
     }
}

function removeFilterRow() {
     if (rowsVisible.value > 1) {
          var style = document.getElementById('filterRow' + (rowsVisible.value - 1)).style;
          style.display = 'none';
          rowsVisible.value--;
          removeButtonTds(rowsVisible.value);
          addButtonTds(rowsVisible.value - 1);
          if (window.getUtilityListValues) {
              getUtilityListValues(document.getElementById('searchField' + (rowsVisible.value - 1)), "PhoneFindListForm", updateUtilityList);
          }
     }
}

function clearFilter() {
     while (rowsVisible.value > 1) {
          var style = document.getElementById('filterRow' + (rowsVisible.value - 1)).style;
          style.display = 'none';
          rowsVisible.value--;
          removeButtonTds(rowsVisible.value);
     }
     addButtonTds(rowsVisible.value - 1); // should be row 0
}

function removeButtonTds(rowIndex) {
     var index = startTdIndex;
     var currentRow = document.getElementById('cuesTableFilter').rows[rowIndex].cells;
     for (var i=0; i < savedTdData.length; i++) {
          // show td contents on current row
          currentRow[index].innerHTML = '';
          index++;
     }
}

function addButtonTds(rowIndex) {
     var index = startTdIndex;
     var index = startTdIndex;
     var currentRow = document.getElementById('cuesTableFilter').rows[rowIndex].cells;
     for (var i=0; i < savedTdData.length; i++) {
          // show td contents on current row
          currentRow[index].innerHTML = savedTdData[i];
          index++;
     }
}


//End -->
</script>
<!-- ******* END  OF GENERATED JAVASCRIPTS (Search within Search DHTML) ******* -->

<!-- ******* FINDLIST : End of GENERATED HTML ******* -->



    

    
    
    

 
    

    
    
    

    
    

    
    
    

    
    

    
    
    

    
    
    
    

            
    

    
    
    
    
    
    
</form>


<form name="resetForm" method="post" action="/ccmadmin/reset.do?devices=formPost" target="newTarget"><div><input type="hidden" name="org.apache.struts.taglib.html.TOKEN" value="a9a2f471b79adfada5cdbda2ec34aba8"></div>
    <input type="hidden" name="pkid" value="">
    <input type="hidden" name="supportedResetType" value="">
</form>

<form name="resetForm" method="post" action="/ccmadmin/resetApplyConfig.do?devices=formPost" target="newTarget"><div><input type="hidden" name="org.apache.struts.taglib.html.TOKEN" value="a9a2f471b79adfada5cdbda2ec34aba8"></div>
    <input type="hidden" name="pkid" value="">
</form>




    <!-- ******* BEGIN OF GENERATED JAVASCRIPTS (BUTTONS) ******* -->
<script language="JavaScript" type=text/javascript>
<!-- Begin 


  window.onload = initPage;

  function initPage() {
     document.forms[0].action += "?recCnt=" + 0 + "&colCnt=8" ;
}

  function onAddNew(){
    window.location ="/ccmadmin/phoneEdit.do";
}

function onDeleteSelected() {
   var count = getSelectedCount(document.forms[0]);
     if (count == 0) {
        alert('There are no Phone currently selected. Click one or more checkboxes to select Phone and try again.');
     }
    else if (confirm('You are about to permanently delete one or more Phones.  This action cannot be undone.  Continue?')) {
        document.forms[0].action = "phoneFLDeleteSelected.do?recCnt=" + 0 + "&colCnt=8" ;
        document.forms[0].submit();
    }
}

function onRefresh() {

}

function onAddSelected()
{
    var els = document.forms[0].elements;
    var txt = null;
    var val = null;
    var multiple = null
    var numCheckboxes = -1;

    // scan checkboxes for selected rows
    for (var i = 0; i < els.length; i++)
    {
        if ( (els[i].type == "checkbox") && (els[i].name.slice(0,6) == "result") )
        {
            if (els[i].name.indexOf("result") == 0)
            {
                numCheckboxes++;
                
                if (els[i].checked)
                {
                    // extract the hidden values for this row from form
                    var elName = "result[" + numCheckboxes + "].col[1].stringVal";
                var elValue = "result[" + numCheckboxes + "].col[0].stringVal";
                    
                    val = els[elValue].value;
                    txt = els[elName].value;
                    
                    // set value in caller
                    if (window.opener)
                    {
                        if (txt != null && val != null)
                        {
                            window.opener.addCurrentSearchItem(txt, val);
                        }
                    }
                    
                    if (multiple == false)
                    {
                        break;
                    }
                }
            }
        }
    }
        
    if (txt == null & val == null)
    {
        return;
    }
        
    closeWin();
}

function onResetSelected() {

resetSelected(0,1,'There are no Phone currently selected. Click one or more checkboxes to select Phone and try again.');

}
function onApplyConfigSelected() {

applyConfigSelected(0,'There are no Phone currently selected. Click one or more checkboxes to select Phone and try again.');

}
//End -->
</script>
<!-- ******* END  OF GENERATED JAVASCRIPTS (BUTTONS) ******* -->
 



<script language="JavaScript" type="text/javascript">


window.onload = initPage;
    
function initPage() {
    document.forms[0].action += "?lookup=true&multiple=false&whereClause=device.tkClass=1" + "&recCnt=" + 0 + "&colCnt=17";
        getUtilityListValues( document.getElementById('searchField' + (rowsVisible.value - 1)),"PhoneFindListForm", updateUtilityList);
}
    

function onResetSelected() {
    resetSelected(0,0,'There are no phones currently selected.  Click one or more checkboxes to select phones and try again.');
}

// Reload the form
function doRefresh()
{
  var val = document.forms[0].searchField.value;
  document.forms[0].action = "phoneFindList.do?updateCookie=true&lookup=true&multiple=false&whereClause=device.tkClass=1";
  document.forms[0].submit();
}

// Reload the form
function doSearchUpdate()
{
  var val = getValue(document.forms[0].additionalsearch);
  document.forms[0].searchString.value = val;
}

</script> 
 
                            </div>
                        </td>
                    </tr>
                </table>

            <script>

            try {
                var objStatus = document.getElementsByTagName("LEGEND")[0];
                if ("Status" == objStatus.innerText) {
                    objStatus.parentNode.focus();
                }
            } catch(e) {
                //alert(e.message);
            }

            // Set the timeout to a variable, so we can cancel by calling the clearSecurityTimeout function defined below.
            // This can be used  by ajax to cancel the timeout function
            // need to convert SESSION_TIMEOUT value from minutes to milliseconds
            var timeout = 30*1000*60;
            var SECURITY_TIMEOUT = setTimeout('logout()', timeout);

            function clearSecurityTimeout() {
                if (SECURITY_TIMEOUT) {
                    clearTimeout(SECURITY_TIMEOUT);
                }
            }


            function logout()
            {
                if ( window.opener != null) {
                   alert('Your session has timed out.  Select OK to close this window.');
                   window.close();
                }
                else{
                      window.top.location = "/ccmadmin/logoff.do";
                    }
            }

        </script>
        <script>nsOnResize();</script>

    </body>
</html>

Bare in mind that I have no control over this HTML so it cannot be changed.  All HTML output is via a network device.

Share this post


Link to post
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

  • Similar Content

    • lbsl
      By lbsl
      Greetings fellows,
       
      I have an issue that is bothering me for quite some time now (Since Autoit3 V3.3.8.0 and still not solved in 3.3.14.0) and i have not found any clue how to solve this particular problem regarding the control of popup-menus for specific controls. I have been searching using many keywords in the hope to find a similar posted issue either on the internet or here on this forum but did not yet stumbled upon it so i have no other option than to post the question (Sorry if there would exist an earlier topic).
      Below is an example that demonstrates the issue very clearly if you follow the steps to reproduce:
      #include <GuiMenu.au3> #include <GUIConstantsEx.au3> #include <ListViewConstants.au3> #include <WindowsConstants.au3> $TestWindow1 = GUICreate("TestWindow1", 353, 277, 100, 80) $ListView1 = GUICtrlCreateListView("", 8, 8, 338, 262) $ListView1_0 = GUICtrlCreateListViewItem("TestItem1", $ListView1) $ListView1_1 = GUICtrlCreateListViewItem("TestItem2", $ListView1) $ListView1_2 = GUICtrlCreateListViewItem("TestItem3", $ListView1) GUISetState(@SW_SHOW) $TestWindow2 = GUICreate("TestWindow2", 353, 277, 100 + 400, 80) $ListView2 = GUICtrlCreateListView("", 8, 8, 338, 262) $ListView2_0 = GUICtrlCreateListViewItem("TestItem1", $ListView2) $ListView2_1 = GUICtrlCreateListViewItem("TestItem2", $ListView2) $ListView2_2 = GUICtrlCreateListViewItem("TestItem3", $ListView2) GUISetState(@SW_SHOW) GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") Local $MenuContext, $MenuContext2 Local $ahLVMenu[3] Local $ahLVMenu2[3] For $i = 0 To 2 $ahLVMenu[$i] = GUICtrlCreateDummy() $ahLVMenu2[$i] = GUICtrlCreateDummy() Next While 1 Local $nMsg = GUIGetMsg(1) Switch $nMsg[0] Case $GUI_EVENT_CLOSE If $nMsg[1] == $TestWindow2 Then GUISetState(@SW_HIDE, $nMsg[1]) Else Exit EndIf Case $ahLVMenu[0] ConsoleWrite("Dialog 1, Item 1" & @CRLF) Case $ahLVMenu[1] ConsoleWrite("Dialog 1, Item 2" & @CRLF) Case $ahLVMenu[2] ConsoleWrite("Dialog 1, Item 3" & @CRLF) Case $ahLVMenu2[0] ConsoleWrite("Dialog 2, Item 1" & @CRLF) Case $ahLVMenu2[1] ConsoleWrite("Dialog 2, Item 2" & @CRLF) Case $ahLVMenu2[2] ConsoleWrite("Dialog 2, Item 3" & @CRLF) EndSwitch WEnd Func WM_NOTIFY($hWnd, $Msg, $wParam, $lParam) #forceref $hWnd, $Msg, $wParam Local $hWndFrom, $iIDFrom, $event, $tNMHDR, $hWndListView, $hWndListView2, $tInfo $hWndListView = $ListView1 $hWndListView2 = $ListView2 Local $tMsgFilter, $hMenu If Not IsHWnd($ListView1) Then $hWndListView = GUICtrlGetHandle($ListView1) If Not IsHWnd($ListView2) Then $hWndListView2 = GUICtrlGetHandle($ListView2) $tNMHDR = DllStructCreate($tagNMHDR, $lParam) $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom")) $iIDFrom = DllStructGetData($tNMHDR, "IDFrom") $event = DllStructGetData($tNMHDR, "Code") Switch $hWndFrom Case $hWndListView2 Switch $event Case $NM_RCLICK ; Sent by a list-view control when the user clicks an item with the right mouse button _LV_PopUpMenu2() ; Show popup context menu in Pharmacist article list EndSwitch Case $hWndListView Switch $event Case $NM_RCLICK ; Sent by a list-view control when the user clicks an item with the right mouse button _LV_PopUpMenu() ; Show popup context menu in Pharmacist article list EndSwitch EndSwitch $hWndFrom = 0 $iIDFrom = 0 $tNMHDR = 0 $hWndListView = 0 $hWndListView2 = 0 $tInfo = 0 $tMsgFilter = 0 $hMenu = 0 Return $GUI_RUNDEFMSG EndFunc ;==>WM_NOTIFY Func _LV_PopUpMenu() $MenuContext = _GUICtrlMenu_CreatePopup(40) _GUICtrlMenu_InsertMenuItem($MenuContext, 0, "Dialog 1, item 1", $ahLVMenu[0]) _GUICtrlMenu_InsertMenuItem($MenuContext, 1, "Dialog 1, item 2", $ahLVMenu[1]) _GUICtrlMenu_InsertMenuItem($MenuContext, 2, "Dialog 1, item 3", $ahLVMenu[2]) _GUICtrlMenu_TrackPopupMenu($MenuContext, $TestWindow1) _GUICtrlMenu_DestroyMenu($MenuContext) Return $GUI_RUNDEFMSG EndFunc ;==>_LV_PopUpMenu Func _LV_PopUpMenu2() $MenuContext2 = _GUICtrlMenu_CreatePopup(40) _GUICtrlMenu_InsertMenuItem($MenuContext2, 0, "Dialog 2, item 1", $ahLVMenu2[0]) _GUICtrlMenu_InsertMenuItem($MenuContext2, 1, "Dialog 2, item 2", $ahLVMenu2[1]) _GUICtrlMenu_InsertMenuItem($MenuContext2, 2, "Dialog 2, item 3", $ahLVMenu2[2]) _GUICtrlMenu_TrackPopupMenu($MenuContext2, $TestWindow2) _GUICtrlMenu_DestroyMenu($MenuContext2) Return $GUI_RUNDEFMSG EndFunc ;==>_LV_PopUpMenu2
      I have two window dialogs and two listview controls defined.
      Each listview control has its own popup menu and menu items.
      The code above works fine as long as both window dialogs are visible.
      You can right-click on each listview control and you get the designated menu popped up and if you select an item, the message for the specific item is being written into the console frame for it.
      However, if you close window 2, and attempt to trigger the options in the popup menu for window 1, you will notice that the notification messages are no longer being triggered at all.
      The popup menu becomes visible if you right-click the area and disappears if you select an option, but the control item no longer sends a notification which means that the attached events for the trapping are no longer being executed.
      Now if you switch the code snippets of the window frames being generated, you will notice you can achieve the same issue the other way round, which means that context menu item notifications are being received and trigger an event routine as long as window 1 would then in that case remain open.
      So it seems that whichever window is generated the last, that window somehow seems to get attached to the notification messages that are being send by the dummy controls for the context menu items.
      Do i misinterpret something here, is there a fix for this issue or did i encountered some kind of bug inside Autoit3?
       
    • careca
      By careca
      Hi there, this is supposed to work as a toast, called by functions and such. Kinda looks like the windows 10 notification, as intended,
      and the only problem is that i can't find a way to hide the taskbar button.
       
      Opt("WinSearchChildren", 1) #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> HotKeySet("{ESC}", "Terminate") Local $hParentWin, $hChildWin, $aMsg $hParentWin = GUICreate("Parent GUI", 200, 100) GUISetState(@SW_SHOW) $hChildWin = GUICreate("Child GUI", 360, 65, @DesktopWidth + 400, @DesktopHeight - 106, $WS_POPUP, $WS_EX_APPWINDOW+$WS_EX_TOPMOST) GUISetBkColor(0x1F1F1F, $hChildWin) GUICtrlCreatePic(@ScriptDir&'\Info.bmp', 8, 8, 48, 48) $Title = GUICtrlCreateLabel('Title', 70, 10, 250, 25) GUICtrlSetFont($Title, 14, 900, 0, 'Arial', 5) GUICtrlSetColor($Title, 0xFFFFFF) GUICtrlSetBkColor($Title, 0x1F1F1F) $Text = GUICtrlCreateLabel('Text', 70, 35, 250, 25) GUICtrlSetFont($Text, 10, 600, 0, 'Arial', 5) GUICtrlSetColor($Text, 0x707070) GUICtrlSetBkColor($Text, 0x1F1F1F) GUISetState(@SW_SHOW) Show() Func Show() WinMove($hChildWin, '', @DesktopWidth - 360, @DesktopHeight - 106, 360, 65, 1) ConsoleWrite('Show - ' & @MSEC & @CRLF) EndFunc ;==>Show Func Hide() WinMove($hChildWin, '', @DesktopWidth + 400, @DesktopHeight - 106, 360, 65, 1) ConsoleWrite('Hide - ' & @MSEC & @CRLF) EndFunc ;==>Hide While 1 Sleep(300) WEnd Func Terminate() Exit EndFunc ;==>Terminate  
      Info.bmp
    • xuzo
      By xuzo
      I need to populate my website, and I use {tab}{tab}{tab}{tab} to get to the fields and then fill them with text.
      But I find it a unreliable, is there a way to "Paste" text in all the fields in one shot?
      A little like password managers like Roboform and Last Pass do?
      I there a way to target the field from it's html handle?
       
    • BobSherman
      By BobSherman
      I am attempting to enter the logon ID and password into the form below and submit it.
      But, I am experiencing an error in IE.au3 whether I use _IEAction to submit a click (which does submit the form) or _IEFormSubmit (which does not submit the form before it errors out).
      The form seems rather simple:
      <form method="post" action="logon_submit.php">
                             <input type="hidden" name="visit" value="sRhvMItOu1hNV_y9t4iB7xhns2UJ0pUIYmpJyy3CivjvGYv0ST1QHY40QP9H5UPTqonadminkin_65dvtXxSIXDPwyFFI6WPVQFmgFtba8vW3OH">
      <table width="100%" border="0" cellpadding="0" align="center" cellspacing="0">
                          <tr>
                            <td valign=top><table width="100%" border="0" cellpadding="4" cellspacing="1">
                                <tr>
                                  <td align="Right"><b>Username: <span class="style1">*</span></b></td>
                                  <td width="80%"><input type="TEXT" name="user" style="width: 90%;">
                                  </td>
                                </tr>
                                <tr>
                                  <td align="Right"><b>Password: <span class="style1">*</span></b></td>
                                  <td><input type="password" name="pass" style="width: 90%;">
                                  </td>
                                </tr>
                                <tr>
                                  <td align="Right">&nbsp;</td>
                                  <td><input type="submit" name="Submit" value="Submit Form">
                                  </td>
                                </tr>
                                <tr>
                                  <td align="Right">&nbsp;</td>
                                  <td><a href="resetpw.php?visit=sRhvMItOu1hNV_y9t4iB7xhns2UJ0pUIYmpJyy3CivjvGYv0ST1QHY40QP9H5UPTqonadminkin_65dvtXxSIXDPwyFFI6WPVQFmgFtba8vW3OH" class=white>Forgot your password ?</a></td>
                                </tr>
                              </table>
                                <p>&nbsp;</p>
                            </td>
                          </tr>
                        </table>
                      </form>
       
      My function to perform the logon is:
       
      Func StartUp()
         _IELinkClickByText ( $oIE, "Log On" )
         Sleep(2000)
         Local $oForm = _IEFormGetCollection($oIE)
         Local $iNumberOfForms = @extended
         For $iForm = 0 To $iNumberOfForms - 1
           $oForm = _IEFormGetCollection($oIE, $iForm)
           Local $oQuery = _IEFormElementGetCollection($oForm)
           Local $iNumberOfFormElements = @extended
           For $iElement = 0 to $iNumberOfFormElements - 1
               Local $oFormElement = _IEFormElementGetCollection($oForm, $iElement )
               If $oFormElement.name = 'user' Then
                  _IEFormElementSetValue ( $oformElement, "xxxxx", 0)
               elseif $oFormElement.name = "pass" Then
                  _IEFormElementSetValue ( $oFormElement, "yyyyy", 0)
                  ; Sleep for 2 seconds.
                  Sleep(2000)
                  Local $oSubmit = _IEGetObjByName($oIE, "Submit")
                  _IEAction($oSubmit, "click")
                  Sleep(3000)
               EndIf
            Next
         Next
      EndFunc
       

      After the submission of the form completes and goes to the next page I'm getting the following error as a popup from AutoIt:
       

      Line 970 (File "D\Program Files (x86)\AutoIt3\Include\IE.au3"):
      Case $iIndex > -1 And $iIndex < $oObject.elements.length
      Case $iIndex > -1 And $iIndex < $oObject^ ERROR
      Error: The requested actions with this object has failed.

      It's hard to imagine that such a simple form is causing so many problems.
      Any help would be appreciated.
       
       
       
    • trampjuicerocks
      By trampjuicerocks
      You get a full set of results in the webpage - as intended. (The search form part of the code works fine) then you do a _IEloadWait after the _IEAction form Submit.
      But nothing changes in the AutoIt HTML.
      Ok - Found Solution. I mean this must be a common problem.
      Use _IEAttach("Title page")
      That will wait for the results properly. And you can now access them in code.