Jump to content
Macro Express Forums

Cory

Members
  • Posts

    3,957
  • Joined

  • Last visited

  • Days Won

    49

Everything posted by Cory

  1. There's a description it in the "Launch Mouse Locator" section of the help file. It's the decimal display of the hexadecimal value. So if you convert it to hex, you get 6 digits. The first two make 256 combinations because it's 16 squared and that's the value for how much blue. Normally we say "Red Green Blue" for RGB, but it's reversed here as BGR. 2 for blue, 2 for green, and 2 for red. This can be useful as many of the colors vary slightly. But if the blue varies only slightly, the integer value changes much. So one must parse it into the 3 values. I've done this before where I use mathematical operations to get the hex string then I parse the 3 hex values. Then I converted them back to decimal. Now I have distinct values 0-255 for the three component colors and I can apply a tolerance. For instance if the red, green, and blue values are within 2 of the ideal value, I can say I can accept that becasue the color will be visually close.
  2. <GET PIXEL COLOR Option="\x01" Rel_To_Screen="TRUE" X="500" Y="500" Destination="%Color%"/> <IF VARIABLE Variable="%color%" Condition="\x00" Value="16777215" IgnoreCase="FALSE"/> <MESSAGEBOX Caption="Result" Message="The color is %color%" Icon="0"/> <ELSE/> <MESSAGEBOX Caption="Result" Message="The color is %color%, not 16777215" Icon="0"/> <END IF/> This text you can paste into your macro. Create an integer variable %color% Get Pixel Color at (500, 500) Relative to Screen into %Color% If Variable %color% Equals "16777215" MessageBox: Result Else MessageBox: Result End If This is what it looks like in the scripting editor. In my case the desired color is 16777215. If the color at 500, 500 is that, it displays the first message. If it isn't, it displays the second message. This is how you use logic with a pixel color.
  3. No. Sorry. Those are MDI windows. Some apps will allow one to have SDI windows as an option however. Check your settings and documentation. Also look at the program documentation for navigation shortcuts. There may be a way within the program to navigate to the windows you want with keyboard shortcuts.
  4. Maybe see if you are launching too many processes. Maybe an infinite loop in the macro. Might also be that there are more processes running than MEP can enumerate? Yup. Contact ISS. Also it would help to know more about what your macro is doing. And have you tried removing parts and checking to see what part is causing the problem. Are you running MEP on the remote system or are you trying to run MEP through the remote connection from the client machine? Also don't forget that running MEP in a RDP session is often a bad idea. When you disconnect from it, the graphical portions disappear. All events, mouse clicks, keyboard typing, windows manipulations all cease to function. The only way around that is to use RDP to connect to the console session or to use an application like VNC.
  5. You're welcome. I find them useful for annotation but also for visually organizing my code.
  6. I gave you an example ­čÖé In the macro there are two ways to comment. In the macro command or by inserting a comment inline. It's not a command, but you insert and see them like a command. In my example "Line comment" is the comment. It's the second line in the macro. You can read about them in the help file on the page titled "Comment". I use them extensively but given some samples I've seen I think some macro writers might not be aware of it. Sometimes my commend will be a string of "=" to use as a visual divider even. In the future if you want comments to be exported, you might be able to put them there instead of in the macro command. But I do think I'd like to see MEP have an option to export them as well.
  7. It's like you didn't read my post. Hmff ­čÖé
  8. I think the OP is speaking of the comments tab in the command. A line comment will export, but one in the command from the "Comment" tab, does not. I don't think there is any intentional method in MEP to get these. Variable Set String %test% to "Test" // Command comment // Line comment Name: test Icon: (Default) Scope: Global <VARIABLE SET STRING Option="\x00" Destination="%test%" Value="Test" NoEmbeddedVars="FALSE"/> <COMMENT Value="Line comment"/>
  9. I would use VBA in Outlook for Exchange mailbox stuff.
  10. Bummer. I can't think of anything else, but if I do, I'll post. It was many things like this that led me away from MEP for web automation. MEP is great for windows apps, but it often is incapable of doing things like this. In order to meet my client's needs I went and learned .NET and have been doing all my web automation that way. Once I got over the learning period, I found that so many things that I struggled with were incredibly simple in .NET. Mostly I communicate directly with the web server with HTTP requests like your web browser issues. All the data you put into forms and selections you make will eventually be put into a simple string of text and sent to the server in a POST request. So I have my program create the string from my data source and fire off a bunch of those requests. Often I can do 10 or more a second. Or sometimes I'll create my own web browser program. Takes about 5 minutes. That way the WebBrowser control is an object I can programmatically interact with with ease while allowing for user observation and interaction. And timing issues are non-existent when done programmatically. But with .NET or any of the web automation tools, there's a lot of learning that needs to be done.
  11. Sorry. I clicked submit accidently. If there is a label to some kind of unique text near the TextBox you desire do a find for it. Ctrl+f > search for term > Escape > tab X times. When you hit excape the found term will be highlighted and the documents cursor position will remain there. So maybe you have a label left of the field you want named "Date of Hire". Find it, escape, it will now be highlighted, and tab once to get into your field. Will that work?
  12. Maybe you could go to the end and tab backward? Controls commands in MEP are for WinForm controls only. In your browser the rendered document is in one large WebBrowser control. Hence the MEP commands are worthless. I do not recommend pixel scanning.
  13. Truncate to Integer also works. There are many ways to do it. But I like acantor's method best. It's essentially like how I woudl use the modulus function in .NET. I also recommend making this a macro you can use as a function with Macro Run. Call it "Is Even" or something and return a Boolean. Anytime I have somehting like this which is an isolated nugget of functionality I make it a small macro I can use anytime as a subroutine or function.
  14. I use the .NET WebBrowser control to make my own automated browsers sometimes. This way it's all a model including the rendered DOM which I can interact with programmatically. I figured if I was going to learn a language, which most web automation tools like iMacros need, I woudl just learn how to do it in .NET and make a proper program. Most of the ones I do I use the HTTPWebRequest/Response objects as rendering the document takes time and the text is modified before rendering to 'fix' common problems. So I just grab the raw HTML and get what I need from it using RegEx. I can even travers though a series of pages that way picking up tokens and cookies or whatever needed to interact with the statefull... state. It's much faster than navigating and rendering each page. Also I often find tokens can be reused or steps skipped speeding the process. Also I often find that the navigation isn't necessary and that at the end there's a simple GET with URI parameters or a HTTP POST with parameters I can tweak. Say the web form search offers 10, 50, or 100 results per page. Well that's a parameter in the post data and I change it to 10,000. I can often get the entire results set in a single request. Seconds to get a boatload of data. I often avoid reCAPTCHA's too this way as they often only protect the form pages. In many cases the last step is a query in JSON from a script on the web page to a AWS server or somehting. The script takes that then propagates a table on the web page for instance. Well I just copy that request, tweak the parameters, and get huge JSON DataSets I can port directly into my MS SQL database using the JSON Deserializer. No HTML, no DOM. Just the data. And for pushing data though forms it's also similar. I analyze and make a stripped down process that just uses POST requests to push a bunch of data to their server. No filling out textboxes or clicking buttons. Just send the data like the Web Browser does.
  15. I assume you know that all scripting languages are ASCII strings. And one can save those in files. So in the macro I load that string into a variable from the file. Then in the box I use that variable. In this example I use Variable Set String using the Set Value From File option to load the contents into %SomeExternalScript%. This way I can modify the script file and not have to modify the macro. Also you can mix it up. I find passing parameters tricky sometimes, so I feel it's easier to put MEP variables in my script. When MEP executes that command, those variables become strings. Say you have a script to check the headers on a URI. You can make the URI a variable. I had a recent post with an example of that.
  16. The help file says JScript. To be sure, find somehting that is different between the two and make a sample script. The success or failure would confirm which it is. The scripts are just ASCII text. You can write the text into the macro command which is easiest for simple ones that never change. When I need them variable, I save them in text files and load them into a text variable in MEP and use the variable in the External Script command.
  17. AFAIK ISS support does not end at 2 years. If you have a traditional program with multiple 'windows' that's called MDI. Multiple Document Interface. Unfortunately the window focusing commands do not work on on windows that are the child like that. If you can make them external and independent, then they should work. In some applications this is an option. You would need to use whatever keyboard shortcuts there are in the program to switch child windows. Often there are key chords, often with a tab, that can do that. But even then it's difficult because the titles are not readable. And those would have no idea where or which you mouse clicked in. If you gave us more information like what the program was, screenshots, etcetera, we might be able to help. Otherwise the best we can do is guess.
  18. I don't know of anything specific to MEP, but ToolTips are flaky in Windows. Events drive them and hovering and focus of other windows often fouls them up. I know in WinForm applications I write, they're unreliable. Maybe MEP is experiencing a similar problem. Still you should start a support ticket with MEP.
  19. You said "Image", not "Text". And image is a graphic file. Well that was a waste of my time. Everything is a request. Hit F12 on your keyboard and watch the requests in the network tab. If it's a GET you can get the web page with the HTTP GET command. Then simply compare the parts from the previous GET and see if it changes. However I see they use reCAPTCHA so that might not work. I use the method even to get the JSON data packages they scripts on the web page use. Often I can tweak the parameters to get all sorts of things they didn't intend. I am guessing that after a period of time it automatically refreshes. There is text on the new page that is different than the pervious and you want to know when that occurs. Then simply do a CTRL+a and clipboard copy. All the visible text will be in there. The page you sent looks like this. Home Search Addon Language Register Login TTC will not be able to afford everyday server costs without Ads. If you like TTC and wish to keep our servers running, please support us by disabling Ads blocker or by adding TTC into whitelist. Thank you! Our data is collected by community. If you like our site please consider helping us by installing our Addon and client. Details Search Result rus├ę Advanced Search No trade matches your constraint PayPal - The safer, easier way to pay online! About | Help | Contact us | Terms of Service | Privacy Policy ┬ę 2015 by Steven Chen All rights reserved Tamriel Trade Centre was created using content and materials from The Elder Scrolls┬« Online: Tamriel UnlimitedÔäó ┬ę ZeniMax┬« Online Studios, LLC or its licensors. This site is not affiliated with ZeniMax Online Studios, and ZeniMax Online Studios is not responsible for any of the content on, or the privacy policy of this site. Windows┬«, Xbox┬« and their logos are registered trademarks of Microsoft Corporation Sony PlayStation┬« and its logo are registered trademarks of Sony Inc. But I am unsure of what you are trying to do.
  20. http://video-monitoring.com/construction/mdot/static/s20latest.jpg I used this image of a bridge construction as a test. It updates about every 30 minutes. You can see the Last-Modified and the ETag changed.
  21. Here's a macro to demonstrate. If I enter "http://bluepointdesign.com/images/logo.jpg" I can see these headers. Most of these can be useful. And I think the ETag header is essentially a version number. I know it's used on cache control so I think it's what you browser uses to decide if it needs to retrieve the file or if it can be loaded from cache. If so, you can use that to decide if the file, a graphic in this case, has changed. Content-Length: 37641 Content-Type: image/jpeg Last-Modified: Sun, 28 Feb 2021 00:24:18 GMT Accept-Ranges: bytes ETag: "c5be40d68dd71:0" Server: Microsoft-IIS/8.5 X-Powered-By: ASP.NET X-Powered-By-Plesk: PleskWin Date: Tue, 27 Apr 2021 17:44:01 GMT HTTP Headers.mex
×
×
  • Create New...