Jump to content
Macro Express Forums

Cory

Members
  • Content Count

    3,718
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Cory

  1. Console app = cmd.exe. Something that can run invisibly and can be configured to return (echo) results fo it's easy for MEP to continue with the resultant data. I rarely render a web page in a WebBrowser control and allow scripts to run. No events. That's all to complicated, troublesome, and slow. The majority of the time create my own HTTP request/response sessions with the server. If I want to get data from a web page I use a HTTPWebRequest, usually as a GET but sometimes POST method, and extract the information using RegEx. And often these days there's a base page that loads with some scripts. Then depending on user input, the script will make requests from a Db server. Often you can see this with auto-complete in a search dialog for instance. They don't download all the page, scripts, graphics, and such, they just get that little bit of data to fill out the form fields, data grid, or whatever. These are usually pretty JSON data packages. JSON is kind of what XML wanted to be, but different. Anyway there's a beautiful JSON deserializer in .NET which you point to your own custom class and BAM! You have a beautiful propagated data package object. No need for RegEx. This is also extremely fast. If I want to automate a user action I snoop the requests/responses in the browser debugger (F12 > Network in most browsers) and I just create what was sent. Let's say there's a form you need to fill out and submit. You could download the whole dang page, graphics, scripts CSS, and all that overhead. Then render it in a DOM and try to figure out how to fill in text, click a radio button or select from a drop-down. But that's a pain. What I do is manually do that once. Then when I hit the submit button, I look at the request sent. Usually it's a POST and the data package is a small string of data. Say "LastName=Jackson&FirstName=Cory&GenderMale=True". Usually URL encoded. Often JSON also. I skip all the rest of that jazz and use a Db table to drive the process to enter ten thousand names. No loading of pages, clicking things. Just send the end result directly. And something that size I can usually do about 10 a second depending on server location and performance. And I can even send them asynchronously and go faster. Ah. Here. I did a search on this web page for "Test". This is the POST data. "q=test&type=all&search_and_or=or&search_in=all". A better example. Many times I need to visit a base page first to pick up a cookie or a session token, especially for ASP sites. Sometimes I need to find and extra a token from each result and add it to the headers. But it's pretty easy most times. And..... Often when gathering data I find that I can do more then one can with the normal request. A good example is a web page that returns a search result for a maximum of 100 results at a time. That's being imposed in the scripts on the page, so I just change that value to a million in my POST data and get all of them and avoid downloading thousands of pages. And search criteria validation is usually in the form. Have you ever seen a page that requires you to type at least 4 characters in yoru search? Well often you can do as few as you want in the POST data and the server will give it to you. Even a blank string or a percent sign. A percent sometimes needs to be URL encoded but the cool thing there is if it's SQL on the their end that's a wildcard for all. Many tricks like this I have learned. Last collection of website I worked on I could directly pump all of the records in theri Db in one request and receive it in a single JSON package. Anyway... These techniques took a while to learn but it's much simpler. My point is that I don't mess with GUI form interactions anymore. It's much quicker and simpler to mimic their HTTP requests. If you ever want something like this, let me know. I'd be happy to do a demo for you. BTW I thank ISS/MEP for getting me into this. I don't use it for web automation anymore, but it got me started and learning. I wrote some huge web automation scripts in MEP for banks and hospitals so it was OK at the time for me.
  2. If you use the Windows Run dialog, do you see the same problem. Win+r
  3. I don't know. I looked into iMacros for Chrome for a spell, and I saw a huge learning curve that ultimately was still going to be a temperamental and limited 'black box'. Since I was learning .NET I figured my time was better spent learning to do it there and have ultimate control. I have often thought what it would take to make a program that automates web page interaction for people who don't want to learn to program and I can't imagine how difficult that would be. It's technical and really if you want to do effective automation, scraping, or whatever, you should learn to program or hire someone who can. Having said that I have wanted to make an extension for MEP that would do some of the simple things. After years of writing such programs I could cover 75% of the needs with a simple console program that would be easy to interact with in MEP. I also want to write one for basic WinForms and RegEx. I've posted here to see if there was any interest and I heard crickets. So I have given up on the idea.
  4. Nice to see you again, Joe. I agree, however I think it would be difficult. For one, malware likes to access content in a form also so there are many safeguards. The reason I learned to program again in .NET was because MEP didn't work well in a web browser control. Since I gave up I have written hundreds of scrapers and applications which automate interactions with web pages. If ISS were serisou about this, I think the key would be to create an application that has a web browser control. A Macro Express Browser. That way MEP could have better access and control from the inside of the process. I've made a few of these and they can often work wonderfully. Having said that, there are already extensions and applications that do this on the market.
  5. Is it a UWP program? For the most part, MEP doesn't work in UWP apps.
  6. Glad to hear you figured it out. That is what it sounded like, but you said it was the same program and worked on the remote machine when the remote machine was run in a local session. You can use a macro to close a window by title as soon as it appears. Create a new macro and choose a Window Title activation and use a Windows Close command. Alt+F4 usually works as well.
  7. Terry one reason one might not want to use Snip & Sketch is that it's UWP and many MEP functions don't work in UWP.
  8. I've tried to do things with Cortana and gave up on it. Most annoying is its insistence on using certain apps. If I ask it to start an email, it opens Windows Mail and not Outlook which I use. It looks good in the marketing material, but in real life it's a disappointment most of the time. Maybe you could use Windows dictation to type into a MEP box. The shortcut in Windows is Win+h.
  9. I have not. I messed with it for a spell but found I couldn't get it to work. There are APIs for them in the Windows.ApplicationModel.VoiceCommands Namespace, but only for UWP apps and I haven't messed with UWP yet. I think one would be better off with Dragon. Let me know what you find.
  10. There was some discussion long ago about some of the tray icons not being apparent. First thing I'd say is make sure you are running MEP as an administrator. But if that doesn't work, look back at the posts here about some of the icons not being available in the system tray.
  11. It is strange. I can't think of any reason it wouldn't work remotely. It's difficult for me to help you with this. This is one of those things I'd have to get my hands on to play with.But know that I've written hundreds of macros that run on a remote machine and are accessed via VNC or RDP. Also VNC uses the console session. If you're there, you see it on screen. I've never seen a macro fail like that on a machine I'm accessing via VNC. I think it's unlikely that the remote utilities are to blame. I'm guessing it's something on that remote computer. Maybe some security software. I would try installing ACT on another new machine with nothing else on it and see if it has the same problem.
  12. That sounds like a problem if the whole main area is a control. It's likely a web browser control or a UWP component in an Winform program or a UWP app. Maybe WPF. In any case these are difficult for MEP to control. I've done macros for such apps on several occasions any it was frustrating. I got the feeling that the main form (window) can be focussed, but not the control. You see this sometimes with web browsers. They're active but you have to do something in them like a blind click to activate the component therein. Plex for Windows desktop was like this for me and I finally gave up trying to make macros work reliably. Since it's a chromium control (Chrome web browser rendering engine) I snooped the HTTP requests and learned to do my automation that way. It's not something I recommend for you, I'm just demonstrating how much problem I've had with apps like this in the past and went to extremes without MEP to do the automation.
  13. Something else could be stealing focus. Add a command in there to grab the topmost window title when this runs and display it in a message box. Make sure it's Act. So much simpler using Windows Controls. 🙂 JK.
  14. Hmmmm... Maybe try some <Alt> commands in other applications like notepad? Maybe add before the ALT+i a command a debug to record what window is active? Or maybe a beep. Are you seeing the same problem with VNC?
  15. If you TextType the active control on the focussed window received. One reason I think Windows Control commands are superior is that they don't need to be focussed. In fact the window can even be invisible. By using the Windows Control commands instead, one eliminates all the constant checking to see if the desired window is focused. Also eliminates knowing all the shortcut keys, tabbing order, et al.
  16. If a window goes out of focus, it can't receive input. Only one window at a time can be focused in Windows. I've had this problem often and this is why it's important you ensure the window you want is focused before typing or whatever and not some other window. Also invisible windows can take focus and your window might even look like it has focus when it doesn't. I've known many utilities that are good at invisibly stealing focus. This is why you need to do Windows Activate commands before inputting. You should also scope your macros to the desired window or program to avoid it firing in the wrong application. Both of these topics are covered in the help file.
  17. Please confirm that MEP and the macro is running on the remote machine and not though the RDP connection.
  18. You don't need to be a programmer. I wasn't a programmer when I learned them. It's actually simple. All typical programs have a form. On that form are controls. Controls are, as they imply, things that users control. For the most part, anyway. To define the control it dead simple. ISS even gives you a little utility to pick the control. If I want to get the text from a control, I do a Get Control command and, well, get the text from the control. It takes 2 lines. What's also nice is that you have a built in flow control by adding aits for the controls. Also you're not slave to text typing delays and such. You simply set the controls text. Boom! Done. It does sound like you're using focus. I've mentioned scope and focus but I haven't heard you explain how you'e controlling focus yet. What are you doing. Sorry, I don't have time to read your macro.
  19. And you can manually use CTRL+i on the remote machine? It sounds like your window isn't focused to me. See earlier message. Scope and focus should be set. If you learn to use controls as I suggest, you can use the availability of the control to control flow. That way you can wait for the control to exist before sending text to it. Also it doesn't need to be focussed and you don't need scope. Controls are a little hard to understand at first, but they are much better. Have you considered importing these contacts into ACT instead of using a macro to create them? I don't know yet what you're doping, so it might not be a good suggestion.
  20. You will be even happier with the Windows Controls. There's a tutorial in the sample macros that installed with MEP using Window Calculator. There's a section in the help titled "Controls - Overview. I had trouble understanding for a time but then I learned something that made it all clear. The way I saw it the Get Control command seemed misnamed and it confused me. But when I learned how it works, it makes perfect sense. Windows control shave addresses they can be accessed by and MEP needs the address. But they are inconstant. So the Get Control command finds the control using a set of instructions, kind of like driving directions, to the location of the control then it gives one's control variable that address. If you want to save yourself a lot of time in the next year, learn to use Windows Controls. I'm sorry I don't have time to review your macros right now. I'll try later this afternoon. One question however. How are you handling the focus of the macro? Are you using "Activate Window" to start with? Also what scope have you been using?
×
×
  • Create New...