shreeks Posted June 3, 2011 Share Posted June 3, 2011 Hi,I need to click on Steel Wheels folder in Pentaho user console. Please refer the attached snap shot.But all the folders are having same colour code.Is there any other options other than PixelsearchFollowing is my code.#include <IE.au3>ShellExecute ("iexplore.exe", "http://ctsintcospsbo1:8080/pentaho/Home")sleep(4000);WinActivate('Pentaho User Console');WinWaitActive('Pentaho User Console - Login')$iPos = WinGetPos('Pentaho User Console')$iPos = PixelSearch($iPos[0], $iPos[1], $iPos[2] + $iPos[0], $iPos[3] + $iPos[1], 0xFDE00C, 1)If Not @error Then MouseMove($iPos[0], $iPos[1])MouseClick("left")MouseClick("left")sleep(2000)$iPos = WinGetPos('Pentaho User Console')$iPos = PixelSearch($iPos[0], $iPos[1], $iPos[2] + $iPos[0], $iPos[3] + $iPos[1], 0xF2C66E, 1)If Not @error Then MouseMove($iPos[0], $iPos[1])MouseClick("left")MouseClick("left")Source Code is <html> <head> <title>Pentaho User Console</title> <meta name="gwt:property" content="locale=en_US"> <link rel="shortcut icon" href="/pentaho-style/favicon.ico" /> <link rel='stylesheet' href='mantle/MantleStyle.css'/> <link rel="stylesheet" href="content/data-access/resources/gwt/datasourceEditorDialog.css"> <script type="text/javascript" src="mantle/nativeScripts.js"></script> <script type="text/javascript"> if(window.opener && window.opener.reportWindowOpened != undefined){ window.opener.reportWindowOpened(); } var dataAccessAvailable = false; //Used by child iframes to tell if data access is available. /* this function is called by the gwt code when initing, if the user has permission */ function initDataAccess(hasAccess) { dataAccessAvailable = hasAccess; if(!hasAccess){ return; } if(typeof(addMenuItem) == "undefined"){ setTimeout("initDataAccess("+hasAccess+")", 1000); return; } else { addMenuItem("manageDatasourcesEllipsis","manage_content_menu", "ManageDatasourcesCommand"); addMenuItem("newDatasource","new_menu", "AddDatasourceCommand"); } } var datasourceEditorCallback = { onfinish : function(val, transport) { }, onerror : function(val) { alert('error:' + val); }, onCancel : function() { }, onReady : function() { } } // This allows content panels to have PUC create new datasources. The iframe requesting // the new datasource must have a function "openDatasourceEditorCallback" on it's window scope // to be notified of the successful creation of the datasource. function openDatasourceEditorIFrameProxy(windowReference){ var callbackHelper = function(bool, transport){ windowReference.openDatasourceEditorCallback(bool, transport); } openDatasourceEditor(new function(){ this.onerror = function(err){ alert(err); } this.onCancel = function(){ } this.onReady = function(){ } this.onfinish = function(bool, transport){ callbackHelper(bool, transport); } }); } </script> </head> <body oncontextmenu="return false;"> <div id="loading"> <div class="loading-indicator"> <img src="mantle/large-loading.gif" width="32" height="32"/>Pentaho User Console is Loading...<a href="http://www.pentaho.com"></a><br/> <span id="loading-msg">Please Wait</span> </div> </div> <!-- OPTIONAL: include this if you want history support --> <iframe id="__gwt_historyFrame" style="width:0px;height:0px;border:0;display:none"></iframe> </body> <script language='javascript' src='mantle/mantle.nocache.js'></script> <script language='javascript' src='content/data-access/resources/gwt/DatasourceEditor.nocache.js'></script> </html>Please help me on this.thanks. Learning is Lifelong! Link to comment Share on other sites More sharing options...
FastFrench Posted June 8, 2011 Share Posted June 8, 2011 An easy (but dirty) way : get the exact position of the pixel, relative to the Window, using Autoit v3 Window Info. And then simply click on that pixel (no search). As long as your folder is the last one, you also can force PixelSearch to scan from bottom to top (check PixelSearch help to find how to do that). Hope it helps, FF 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