Jump to content
Macro Express Forums

Leaderboard

Popular Content

Showing content with the highest reputation since 02/22/2013 in all areas

  1. Also remember to check out the a&ccelerator key things... from the help file (bottom of "Multiple Choice Menu" page): =========== Multiple Choice Tips Make one of the Multiple Choice selections the Default Let's say you want option B to be your default selection. Use the Variable Set String command and select the Set Value Now option. Set the value of variable T1 to B. Insert this command before your Menu command in the macro script. When the macro runs, option B will display as the default selection. Allow users to select a menu item with the keyboard instead of clicking wi
    3 points
  2. Preselect a value in the multiple choice by setting the result value to that value before showing the menu. IE when the multiple choice pops up one will already be selected. Then you can arrow up and down to select different values. Enter to accept.
    3 points
  3. In general, you will be better off learning how to use the keyboard to do things in a web page and use TextType to automate. Each control, including links in a webpage should be a tab-stop. All my later macros before I started writing programs were all based on the number of tabs it takes to get to any control in a web page. I have written hundreds of macros to automate web pages and found the overall effort and lines of code about 10% of that trying to use the mouse. Mouse moves is the road less travelled. And, BTW, that means it's the one you don't want to take 🙂 List boxes you can tab
    2 points
  4. 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 trave
    1 point
  5. You can still use Text File Process to loop through the text. Each line of a text file used by Windows ends with CR followed by LF referred to as CRLF. The Text File Begin/End process reads a line of text up to the CRLF. For convenience in your macro the string read by Text File Process does not include the CRLF. However, in your case, you know that each line originally had the CRLF. So, to determine the number of CRLF's just count the lines. Something like this: Variable Set Integer %N99% to 0 Text File Begin Process: "ansisavedcopy.txt" Variable Modify Integer: Inc
    1 point
  6. I think it's just Import > Import Text File ... It's been a decade probably since I've messed with this. BTW you could also create a macro to modify those lines 🙂
    1 point
  7. This sounds like a good Macro Express project. The instructions you will probably need are: Variable Set String %ProgramName% to topmost program name and/or Variable Set String %WindowTitle% to topmost window title
    1 point
  8. Note that you don't have to use parameters. BTW Kevin's example on the support page illustrates that only a space shoudl be between the values. I know this is the same in .NET and other languages and programs. To be clear, if your value was 9 and you used that comma the JScript would receive a parameter "9," (numeral nine and a comma) which can only be used as text. I'm guessing what you did using the Number() function was to create an invalid cast exception. I don't have time to research it now, but what you saw returned "-1.#IND" is an exception code. I found this article for IEEE
    1 point
  9. Be kind. He has been told this three times now across two or three threads. I think he's a newbie trying to get a feel for ME, so best not to scare him away. When I think of the questions I asked when I started using ME, most people must have assumed I was a total moron. Happily most of those posts are lost in the mists of history, but I could come up with more at any time. 🤔
    1 point
  10. I suspect your "Challenges" are really you just getting people to write macros for you. 🙂 Anyway, Tom Sawyer, I wrote a macro for this ages ago and I was just working with Terry on it. I don't like how many people want to dive into the GUI on something like this, it's just a mess. It's much easier to export the macro information to a file and process the text file. Search and report on macro text.mex
    1 point
  11. Great idea for a cartoon. I wish I could draw. First panel shows a man carrying the head end a long snake. Another man behind him carrying more of the snake. Second panel two more men carrying more and more of the snake. Third panel two more men with more snake, but one of the men is carrying a sign that says, "The End is Near." Last panel a man carrying the tail end. OK, I'll keep my day job. Besides, somebody's probably done it already.
    1 point
  12. We can cut your nine lines down to eight, if we eliminate Variable Set String %b% to "%a%" and then do all operations on %a%. That should help us finish before the universe either collapses or squirts through a black hole into somebody else's universe. I tried all day to figure out how to use Terry's CRLF idea, just because I wanted so badly to use the Strip feature. Couldn't come up with a reasonable way to deal with even-length space strings. I did find that my version runs considerably faster if I precede my Repeat loop with the following series -- but only i
    1 point
  13. I'm thinking Terry has us both beat. Should be a two-line macro: Replace all spaces with CRLF. Variable Modify String [Strip CR/LF]. Bedtime now, but I'll try it tomorrow. EDIT: Well, so much for my midnight enthusiasm. In the light of day, I can't see how it would work. The following would ALMOST work: 1) Replace any existing CRLF by x'01' 2) Replace all spaces by CRLF 3) Strip all CRLF 4) Restore original existing CRLF by replacing x'01' by CRLF But that would remove ALL spaces, and not leave one space where each
    1 point
  14. You could also restore syntax checking by running the MacDef.exe program in the c:\Program Files (x86)\Macro Express 4 folder. But, if you do that, all of your preferences will be reset to their default values.
    1 point
  15. ... For responses, I have had good luck by clicking "Follow" at top-right, and selecting the option to get an email whenever there is activity. Strangely enough, just because you originated a topic, doesn't mean you are automatically enrolled to "follow" it.
    1 point
  16. This might work: Step 1: Replace all CR/LF with "!@#$%^&" or some other such visible (or non-printable) string that will never occur naturally. Step 2: Instead of replacing "-A" with a blank, replace "-A!@#$%^&" with a blank. In this way, only [what used to be] CR/LF attached to unwanted text will be eliminated, along with the unwanted text. Step 3: Replace all remaining "!@#$%^&" with CR/LF.
    1 point
  17. 2D 41 0D 0A 2D 42 0D 0A 2D 43 0D 0A 2D 44 0D 0A 2D 45 THis is how your text actually looks like to the computer internally. Each of those pairs is a hexadecimal representation of the binary. Each represents a byte, 8 bits, of data. By applying the ASCII encoding, you will get the letters and such that you are used to seeing. Click here to see a table of the value, E.G. 2D is a hyphen, 41 is "A". I think it helps people if they can see what it's happening behind the scenes. And in binary. How it actually is in memory or on disk. Cut those into chunks of 8 and you can manually d
    1 point
  18. When you do the replace, include a newline set. A newline in Window is two non-printing characters carriage return and line feed. 0x0d and 0x0a. That's what gives you the line break. Click here for my instruction on how to create them in MEP. You will want to add them to the end of the string you want to replace.
    1 point
  19. To run any macro posted to you in the form that I did, you you can either: 1. Type the commands into a new macro of your own, but changing anything that needs it. In this case you don’t have a folder called "c:\users\Terry\Test" so create one of your own and enter that instead. 2. Copy the code and paste it into a new macro, then make the same change.
    1 point
  20. Your approach gave me an idea of another way to handle the input data, but without using the clipboard. Create a plain text file that consists of one line. I used Notebook to create the file. I inserted a string of 600,000 characters on one line. (PS: I typed 10 characters, selected everything and copied, and pasted ten times. Then I repeated the process until there are 1000 characters, then 10,000, then 100,000. It takes but a minute to generate hundreds of thousands, or millions, of characters.) Then the script uses "Text File Begin Process." I specified the variable
    1 point
  21. There are thousands of hotkeys. For example, there are about 750 hotkey assignments in Microsoft Word alone. So if you're into the macro scripting game, you will, in time, face situations where you find yourself "expropriating" built-in hotkeys. Most of the time, my philosophy can be summed up as, "built-in hotkeys be damned!" If there is a task that I need to automate via macros, and the hotkey I have in mind is consistent with other hotkeys, if it's memorable, if it's logical, and if the user has no use for the built-in hotkey and/or isn't aware it exists, then that's the key ass
    1 point
  22. It looks like there is a difference between a Floating menu and a Popup menu. When I click to choose the Menu Style for a popup menu I see: When I click to choose the Menu Style for a floating menu I see: It looks like the "Nickname and Scope" choice is only available for a Popup menu.
    1 point
  23. The easiest way I found was: Create the special character Carriage Return or Line feed. (Newline) Copy the text of the first variable to a second variable. Remove all instance of the CR or LF from the second string variable. Subtract the number of characters of the second string variable from the original variable. The difference is the number of newlines. Add 1 to that value. You may want to trim the original text first to ensure there is not a trailing newline set.
    1 point
  24. It's nearly impossible without seeing all of your code. You have a loop or condition out of order someplace. Bear in mind that the line number it cites is often not the one that is out of whack. I find in cases like this about 50% of the time a line of code not even in the errors is the culprit. If you don't want to share your code then I recommend starting a new macro. Copy over only the loops and conditions with dummy code to track your progress. Work it out there to find your error. Also I will sometimes print my code and with a pencil write brackets tho the left of all the condition
    1 point
  25. I requested a feature to find and replace in multiple macros.
    1 point
  26. This will remove the name that is contained in %T[2]% from variable %[T3]%. Variable Modify String: Replace "%T[2]%" in %T[3]% with "" // Leave the "Replace Text With" box empty
    1 point
  27. Increment an integer counter each time through the Repeat loop. Then test the counter value. For example, if your delay command specifies 1 second delay after checking pixel value, then when the counter reaches 120 the macro has been waiting about two minutes. If you use a half-second delay, check counter for 240 rather than 120; etc. When the counter reaches 120, click on the refresh button and reset the counter to zero to wait some more. You may be able to press the F5 key to refresh rather than using the mouse. Get pixel color Set counter = 0 Repeat until pixel color Wait
    1 point
  28. I think this will work: Repeat with Folder (folder E:\Temp, putting file name only into text variable T1) Use Variable Modify Text commands to copy T1 to T2 and strip off the file extension from T2 Create Folder: "C:\%T2%" Wait for Folder Exist: "C:\%T2%" Copy File or Files: "E:\Temp\%T1%" (destination C:\%T2%\%T1%) Repeat End
    1 point
  29. I hope this is ok being posted like this. A review of the forum guidelines didn't stand out to me as such, but I am tired and could have easily missed it. So if this isn't allowed, admins, please delete and I'll rephrase the request. Here's the short and sweet. I'd like to have someone review a video of a macro running I've developed for a client that's the first of many projects that we have to do through the rest of the year. I want to have a discussion about what's viewed at the 10,000 foot level with maybe the occasional 10 foot level. I don't need a bullet list of what's wrong an
    1 point
  30. I threw together a macro using ASCII File Process. Hope this helps. BTW, i'm using ME3 not MEP but there shouldn't be any differences here. This file process seems to ignore blanks. Hope this helps! How this works is that each loop it moves down a line. So data from A4 = %t1%, B4 = %t2%, ect. When it loops A5 = %t1%, B5 = %t2%, ect. That is why you would only need %T1% // Save a text file called asc processing file.txt // Have a spread sheet called Microsoft Excel - Book 1 Temp open Activate Window: "Microsoft Excel - Book 1 Temp" Text Type: <F5> Delay 0.5 Seconds Text Type: S
    1 point
  31. My German is worse than your English, so I won't even try. I don't know if this will work or not. It depends whether the multiple choice menu is seen by Macro Express as a window. The multiple choice menu has a title. Start a second macro based on the menu's window title appearing. In the second macro, wait for a keystroke (any key) making the choice. In the second macro, type ENTER or use the mouse to click the OK key. The original macro that displayed the multiple choice menu should then continue. I can't test this because I have Macro Express 3, not Pro, and ME3 doesn't al
    1 point
  32. I wonder if one can exclude the MEP executable from scrutiny as with other security software and if that would help.
    1 point
  33. Attached is a sample macro file for you. Below is the text for cursory reference. You should be able to at least understand the approach here. Also good to save this as a macro you can call later in other applications. Here I snab the text values for day, month, and year and convert them. Then tweak them and add them to the default value of a DateTime variable. Before I used this method I tried to to do the math but it's hell once you start considering all the leap year rules and so forth. I did it but it was very complicated. In VB.NET this is a simple cast command. I hope someday ISS will ad
    1 point
  34. The most important thing to know about dates is that they're internally stored as decimal values. 1 = 1/1/1990. And each date is a unit value of one. Time within a day is a decimal amount. EG. 0.5 = noon. So really all you'e wanting to do is set a date value and modify it to remove 90 days. Then compare that date to your date to determine if it's less than it. So create a variable called DateThreshold or something like that. Subtract 90 days from it. Now compare that to the suspect date..
    1 point
  35. I'm with Rberg on this one, you should at least have a small delay otherwise it will do it millions of times a second and could pack up the system. I would try that first. Next I would log what the color actually is in each iteration of the loop and see if it's actually ever seeing that color. The color you have specified is very specific and these days with blends, shadows, and textures of graphic components you need to be more flexible. I was trying to detect the green in a progress bar once but I counted hundreds of shades of green. I wrote about this on the forum and may still have a w
    1 point
  36. I frequently struggle with this limitation of MEP. I even offered to write a generic .NET add-on program to create a multiple-input form on the fly for users. But there was no interest. The best advice I can think of for you is to use a multiple choice menu but use the multiple choice option instead of the single choice. However this will only work if you have Boolean responses. Another option might be to have a Text Box with multiple lines that would act as a display that you leave up. Then use a variable Set form user input box to affect it. I'm thinking you could enter a line number fol
    1 point
  37. Acutally it seems simple but somehow i can´t figure it out. I want to have a macro timespecific while the current date doesn´t matter. The date should be ignored. For time calculations i convert the date/time variable into an decimal variable, right? So for the 19. of June Time 10:45 i get 42174,4479166667. The number left from the comma is the date. The number right from comma is 10:45. How can create a date/time variable without the date portion? Or how can i delete that portion in the according decimal variable? Thanks a lot Alex
    1 point
  38. Hi Cory I just published a preliminary video on my pgmacros website. It's about an MXPro multiple field utility close to its initial release. Something that was done by myself and good 'ol Floyd way way way back when was not really suitable for today, so it is something new and completely different from what we did for MX3. Maybe there would be some good ideas in it for your .net project. Joe
    1 point
  39. Out of curiosity I decided to see how quickly I could write a macro to calculate elapsed time. Here is my sample macro: // Get Starting time Date/Time: Set %StartTime% to the current date/time Variable Set Integer %RandomDelayTime% to a random value between 0 and 15 Delay: %RandomDelayTime% seconds // Get Ending time Date/Time: Set %EndTime% to the current date/time // Calculate elapsed time Variable Modify Date/Time: %ElapsedTime% = %StartTime% - %EndTime% Variable Modify Date/Time: %decElapsedTime% = %EndTime% - %StartTime% Variable Modify Decimal: %ElapsedSeconds% = %decElapsedTi
    1 point
  40. Click the "A" icon to modify the Accelerator...
    1 point
  41. Hi All, Can any one suggest on how to export the Macro POP UP along with inside MEX files to another user Machine. I have created the Categories ( like department wise ) and under that created Macros and Macro Pop up for each category. In my system Icon tray macro pop up displaying the macro files which are lying under that macro pop up. So, now i want to export the same Macro pop up along with macro files to another machine on single click( or export). In another User machine also if I import the (Exported) .MEX file or Playable file that should import all the .mex files along with Macro PO
    1 point
  42. You might want to consider using named variables in MEP instead of the old ME3 variable arrays. I'd like to suggest that in the future you create a succinct example for review that produces the behavior you wish us to consider. Also you might consider putting your code in Code tags. Thanks for attaching an MEX. Repeat Until %N1% Equals "1" Variable Set Integer %N1% to 1 End Repeat Distilled I see this for the repeat exit logic. And in fact it iterates only once. This means your condition isn't being met. I suggest you put a breakpoint at line 26 (If N5 equals) and look at what the variabl
    1 point
  43. I don't know. Generally parameters can be passed in any order as long as their formatted correctly. But I don't know in this specific case. I actually specify the MEX file in the registry. In fact I don't use the 'load on start up' option which puts an icon in the system tray but rather opt to add teh MEX start up to the Run section of the Windows registry. More complex and I have a macro to self manage the files listed but it was necessary to make it work in my case.
    1 point
  44. You don't know how to edit a text file? Well OK.... I'll do it for you. See attached. WCFG file edited by Cory.zip
    1 point
  45. Hi All, Is there any way we can crack the password protected macro. I've couple of macro's which i need to modify but i can't open these macros. Even you can't disable or delete these macro from the Macro Express. Any suggestions ? Thanks in advance Gagan
    1 point
  46. If you install Macro Express without the Editor the only way "a tech savvy user can work around" it would be to reinstall Macro Express with the Editor. To "lock down a full installation" you would assign a password to a macro file that prevents a user editing any of the macros in that macro file. (Look in the help and search for 'password' for more information.) All the macros are stored in a file. The default macro file is saved in the user's My Documents folder. To replace this file simply copy your version of macex.mex over the existing macex.mex. (Macro files can have any nam
    1 point
  47. Proposal - Macro Express Community on Stackexchange Q&A Hi all, Sorry to intrude, but I just started a new stack exchange Q&A area for macro express and would like everyone to pitch in and help get this proposal passed. I'm an avid macro express user, but its really hard to find a good place to get questions answered besides this forum. Please help support the growing macro express community: http://area51.stackexchange.com/proposals/49648/macro-express-windows-automation-tool?referrer=BusOzT0bacooh9wd2t83TA2 Thanks!
    1 point
  48. Windows allows windows to be hidden or visible. (Check out the Window Hide and Window Show macro commands.) Some applications do not remove windows but hide them. Other times there are both hidden and visible copies of a specific window. Since Macro Express gets the list of windows from Windows itself it can seem to be confused. You might be able to do something with the Repeat with Windows command. That command can return only visible windows. Maybe something like this: Variable Set String %T2% "" Repeat with Windows: Place title in %T1% If Variable %T1% contains "Information" Bre
    1 point
  49. I am trying to run a hotkey that will copy the value into a variable from a excel cell.. perform a 'IF End' test function and the test function will replace the abbrivation of whatever the variable contains and then write it back to the cell.. Other than my 'AIR CANADA' and BANK OF NOVA SCOTIA' cells, the macro is giving me unpredictable results. There are times where it does replace the cell at all and at times will replace the cell with something that is not even in any of my test conditions. If I open up notepad and highlight the same words and run the macro, it behaves fine. Below is
    1 point
  50. Ahhhhh ShortKeys. No wonder I couldn't find anything about it on Google. I started with Keyboard Express a very long time ago but I've never used ShortKeys as I assumed all the functionality was included in ME. Is this not the case?
    1 point
×
×
  • Create New...