Jump to content
Macro Express Forums

Cory

Members
  • Posts

    4,207
  • Joined

  • Last visited

  • Days Won

    61

Everything posted by Cory

  1. You might want to check out A-PDF or similar utilities. I use a few of them with my macros, especially the command line versions. I seem to remember one that would show the properties. Anyway it works great with MEP. I think I would do it a different way. I would open it in Acrobat and get the document properties (ctrl+d). You can use Get Control to get the number of pages.
  2. Good idea! Thanks. I too have run into macro files and synchronization services.
  3. When you're in the Script Editor editing commands you're in the Script tab. Change to the Scope tab. Use the Current Scope listbox and select Global.
  4. When in doubt, reboot! I reboot every morning... Saves a lot of hassles.
  5. Can you do something basic? If it were me I'd create a HotKey macro that did <TEXT TYPE Action="0" Text="<TAB>"/> and a beep. Type into the first field then activate that macro. Make it in a new macro. Don't try using controls. I don't think they will be useful in an application like this in any case. Make sure you don't have a scope problem by eliminating all scopes.
  6. According to their site "Enables you to record scripts in VB Script or Jscript to automate routine host activity". Why don't you use their automation facilities? A million years ago, I made myself very popular by creating automation scripts in ProComm which is a generic terminal emulator.
  7. UWP is a completely new architecture and doesn' tuse WinForms. Also it's designed not to let automation programs enter text and do thing to be more secure. Unfortunately the way some malware works is similar to MEP. This app doens't looke like UWP.
  8. I have it enabled and I haven't noticed any problems.
  9. What's the application? Post screenshot please. Or post a link to a video capture. A picture is worth a thousand words and a video is worth a million. My first advice is not to use the recorder. It's OK to get a general idea when you're beginning, but it will make unecessarly huge macros. Bicycle training wheels are an apt analogy. Get rid of them ASAP. Start using the direct editor now. When you run the macro in Notepad, are you seeing the tab? Make sure you're not using the clipboard option in the Text Type command. FYI Macros in UWP apps will usually fail. If it's a game, you will often run into macro countermeasures to prevent gaming bots. If you manually tab after typing text in the first field, will it move to the next field? That's all I can think of now. More information will help me help you.
  10. Samrae is right. If the frequency is more than about once a second, I tend to calculate and only do updates then. Sometimes as a percentage. Or maybe one ever hundred times. And if the period varies much I'll use a time variable. Like maybe add 5 seconds to the current time and compare each time until the current time is more than the saved time.
  11. If you save the coordinates as integers, it would be simple to multiply them by two for use. But I think you need to report this to ISS if you are using the current version.
  12. Yes. Use the Text Box commands. Start with Display then update it however often you want, then Close.
  13. I don't have the time to read all these posts now, but I would do it with RegEx in a VBScript. I've posted in the forum offering to create an accessory program to do custom winforms and RegEx before, but no one was interested.
  14. 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.
  15. If you use the Windows Run dialog, do you see the same problem. Win+r
  16. 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.
  17. 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.
  18. Is it a UWP program? For the most part, MEP doesn't work in UWP apps.
  19. 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.
  20. 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.
  21. 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.
  22. 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.
×
×
  • Create New...