Jump to content
Macro Express Forums

ol3ears

Members
  • Posts

    7
  • Joined

  • Last visited

ol3ears's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. If you are using IE and have access to a web server (eg you are on XP Pro or you have another server in your company that can serve up an interface page) then refer to an earlier post of mine about talking to web pages directly using javascript. You fashion your self a tool bar which displays the one line interface page. You then use macro express to issue/receive javascript commands to/from the tool bar/interface page for objects on your target web page The target web page can come from anywhere and be secure or not. No modification of the target page is required for this technique to work. This works very well and solves the problem of interacting with html or javascript content.
  2. "The search is currently quite slow, up to 6 seconds for a 360 x 300 grid on a P4 2.8GHz PC. The bigger the search area, the slower it takes. But this is version 1.0, so I hope to speed it up later." Search for the 'most unique' pixels first. IE those pixels unique in colour or relative geometry. This will allow you to do a quick high level scan before committing yourself to a slow grid scan.
  3. Hi Joe Screen view will scan the whole screen unless you give it a set of constraints All .txt coordinates are relative to the top left of the .bmp file The return coordinates are also relative to the position of the top left of the .bmp file per the screen position the image was found at. Screen view returns the height and width of the bitmap so that the api can calculate the centre position of the bitmap (ie the centre position of a button is usually more useful than its top left corner) Is the OffCross pattern a 3x3 pattern that compares the 4 points on the corners? Yes and the cente point What are the details of the Star pattern? combination of cross and offcross 9 points in a 3*3 block Is the "delta" parameter of the HLine and VLine patterns the line length? Yes (base 0 numbering) so line length +1 It doesn't matter if you go off the boundaries of the screen or the .bmp A lot of the commands were from early versions before I put the block command in. They are there to minimise the time ScreenView spends scanning irrelevant regions of the screen. For most fast PC's it might be easier to forget them and just use a point command for a key colour to get you in the neighbourhood and then use the block command. Although I understand the how for the BGRrange, I don't understand the why This was to solve a problem I had reading a yellow javascript menu on a graduated blue background. While it was possible just to read the yellow text, without the background colour giving the text context it was too easy to get false positives. However there was no guarantee what the background colour would be in the various menu states. Hence the bgrrange command This stands for blue green red range - it takes two 24 bit bgr values as decimal integers. Range low and range high. The mechanism to tell screen view to use the range value or not is that all points already defined that fall within the bgrrange are determined to be bgrrange colours and will return true in comparisons if the points fall within the colour range Regards Bruce
  4. Hi To efficiently scan a screen try...www.users.on.net/~brae/ There is a screen view application that I have written to do just this I use if for web and citrix applications I would however recommend you refer to the Me and Javascript thread and simply call the onclick function directly. Regards
  5. Hi all, this is in response to the 'Serious Consideration For The Me Development Team ' thread. I have started a new thread in order to give it a better title. The following is the process I have (just) started using to interact with web pages at a javascript level under ME control. Goto www.besttoolbars.net and download their toolbar studio application. This allows you to create IE toolbars that support embedded pages (either as banners or click to display 'bubbles'). These pages embedded into the toolbar are able to interact with the target web page without incurring the hassles that framing might introduce. As an example banner page here is the start point of a work in progress. On hitting the "Go" button, the banner page reads a line of text from the clipboard in the format(s) Set||theformname|fld=val|fld=val Get||theformname|fld|fld EVLWebPage.theformname.submit(); FNCSomeFunctionName('param1', 'param2') URL It returns a value to the clipboard and also leaves a visible copy of the return values in the banner text box (for debugging). This is a faster and more accurate process than click and count and is great for those long drop down list boxes. <html> <head> <script type="text/javascript"> var WebPage; function DocumentComplete(tool) { WebPage=tool.explorer; // created on page load complete } function ExecuteJavascript() { var rtn=''; if(window.clipboardData && WebPage!=null) { rtn=clipboardData.getData('Text'); switch(left(rtn,3)) // read the cmd { case 'Set': rtn=SetData(rtn); break; case 'Get': rtn=GetData(rtn); break; case 'EVL': rtn=''+eval(rtn.substring(3)); break; case 'FNC': rtn=''+WebPage.parentWindow.execScript(rtn.substring(3), 'JavaScript'); break; } } else rtn='Error'; if(window.clipboardData) clipboardData.setData('Text', rtn); document.jsfm.rxjs.value=rtn; } function SetData(cmdstr) { var x,y; var frms=cmdstr.split('||'); for(x=1;x<frms.length;x++) { var frmdta=frms[x]; var cmds=frmdta.split('|'); var frm=WebPage[cmds[0]]; for(y=1;y<cmds.length;y++) { var z=cmds[y].indexOf('='); var fld=frm[left(cmds[y],z)]; var val=cmds[y].substring(z+1); switch(fld.type) { case 'checkbox': if(val==fld.value) fld.checked=true; else fld.checked=false; break; default: fld.value=val; break; } } } return cmdstr; } function GetData(cmdstr) { var x,y; var rtn=new String('Got'); var frms=cmdstr.split('||'); for(x=1;x<frms.length;x++) { var frmdta=frms[x]; var cmds=frmdta.split('|'); rtn=rtn.concat('||',cmds[0]); var frm=WebPage[cmds[0]]; for(y=1;y<cmds.length;y++) { var fld=frm[cmds[y]]; switch(fld.type) { case 'checkbox': rtn=rtn.concat('|',fld.checked); break; default: rtn=rtn.concat('|',fld.value); break; } } } return rtn; } function left(str, n){ if (n <= 0) return ""; else if (n > String(str).length) return str; else return String(str).substring(0,n); } function right(str, n){ if (n <= 0) return ""; else if (n > String(str).length) return str; else { var iLen = String(str).length; return String(str).substring(iLen, iLen - n); } } </script> </head> <body bgcolor="#b0b0ff"> <form name="jsfm"> <span style="position:absolute;top:0;font-family:Arial;font-weight:700;"> <font color="#808080" >Javascript Interface</font> <input type="Button" name="exjs" value="Go" onClick="ExecuteJavascript()"> <input type="Text" name="rxjs" style="Background-Color:#b0b0ff;" size="90"> </span> </form> </body> </html>
  6. Grark: Are you still looking for a solution? We have implemented screen scraping and classification with macro express It now reliably controls web and citrix applications You may be able to use elements of it in your application
  7. Had the same problem at work with web based interfaces to things Wrote a "ScreenView" application and a Macro Express API Refer... http://www.users.on.net/~brae/MacroExpress/
×
×
  • Create New...