Jump to content
Macro Express Forums

Leaderboard

Popular Content

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

  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 with the mouse Let's look at the Multiple Choice Menu image above. There are four entries in the Menu List. We want to set this up so that when the menu is displayed, the user can press a keystroke rather than click on their choice with the mouse. To do so we would modify the Menu List to look like the following: A &Go to Macro Express web site B &Run Notepad C &Insert email tagline D &Connect to FTP site You'll notice that an ampersand "&" has been placed in front of each item in the menu list. When the list is displayed during playback of the macro, the letter following the ampersand "&" will be underlined. The user can then press the underlined letter for the choice they want. This will highlight their choice. Pressing the Enter key will perform the macro selection chosen. The ampersand may be placed anywhere in the text string. It doesn't need to be placed before the first letter as in the example above. For example, we could set item A to read as follows: Go to &Macro Express web site. In this case the M will be underlined and pressing the "M" key during playback will highlight this menu option. Note 1: Be careful not to duplicate the underlined letters. Otherwise the first duplicate letter will be the default choice each time the letter is pressed. Note 2: If you are using the If Variable Contains command with the Multiple Choice Menu and you have “Save Item Text” checked, be sure to change the text you are comparing so that it includes the ampersand "&". For example, change “If Variable %T1% contains "Choice One" to “If Variable %T1% contains "&Choice One". Note 3: To insert an ampersand in the text that is not used as an accelerator, such as a menu item of "This & That", insert two ampersand symbols. Write the menu item as "This && That", so that it displays correctly when the macro runs.
    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 to them then arrow down or start typing to highlight an item. Do yourself a favor and look up a list of keyboard shortcuts available for your browser and try to use them first.
    2 points
  4. I don't know as I use .NET, but I am guessing you can. You will need to create some objects and populate them. In .NET I have a WebBrowser object which I can navigate to an address. When it downloads the text of the HTML, it renders it into the DOM object. All elements become objects within the DOM object. WebBrowser Document. Then in there one can iterate though the element object or search for elements by ID. I'm guessing an equivalent could be found in JavaScript and you could command that from MEP. I'm sorry I don't know specifically and I'm not answering your question. I just thought I'd share how it works with other languages and that most languages have equivalent objects. https://www.w3schools.com/js/js_htmldom.asp
    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 (%N99%) // If the line is empty then stop the Text File loop If Variable %T1% = "" Break End If Text File End Process // Here: %N99% contains the number of times through the loop. This is also the number of CRLF's found. This sample does what you described. I counts the number of CRLF's found and it stops when the line is blank. There are some file formats that use only CR or only LF. If that were the case then you would have to read the entire file into a variable and parse through it. But, since Notepad+ indicates the file is ANSI format we know that each line of your file ends with CRLF.
    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. 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 codes in C++ which look similar. I didn't read it, but it might be a clue for you here. You should use exception handling in your scripts and macros to avoid exceptions.
    1 point
  8. Here's my version, which works OK here. It's heavily commented so hopefully easy to follow, but post if anything unclear. // These variables will be used to end each line of the edited file Variable Set to ASCII Char 13 to %CR% // Set CR Variable Set to ASCII Char 10 to %LF% // Set LF Variable Set String %CRLF% to "%CR%%LF%" // Set combined CRLF // Split each the line into as many parts as the max expected (up to 99). I've used 10. Text File Begin Process: C:\Users\terry\Dropbox\Macro Express (Sundry)\Parsing-1.txt // Test if line is blank. If Variable %tLine% Equals "" // Include a blank line and bypass the split. Variable Set String %tArray[1]% to "" Goto:AfterSplit End If // If there is no comma in the line AND it is not blank, ignore it and go to the next. If Variable %tLine% Does not Contain "," AND If Variable %tLine% Does not Equal "" Continue End If // Otherwise proced to parse. Split String "%tLine%" on "," into %tArray%, starting at 1 // But only use the first element, tArray[1]. Ignore the rest. // Build the result, stating with an empty new file. // Add a new line. :AfterSplit Variable Modify String %tEditedFile%: Append Text String Variable (%tArray[1]%) // Add the EOL characters Variable Modify String %tEditedFile%: Append Text String Variable (%CRLF%) Text File End Process Variable Modify String: Save %tEditedFile% to "C:\Users\terry\Dropbox\Macro Express (Sundry)\EditedFile.txt" Beep: Save %tEditedFile% to "C:\Users\terry\Dropbox\Macro Express (Sundry)\EditedFile.txt" // End of macro, so edited file sholud be ready. Full code: <COMMENT Value="These variables will be used to end each line of the edited file"/> <VARIABLE SET TO ASCII CHAR Value="13" Destination="%CR%" _COMMENT="Set CR"/> <VARIABLE SET TO ASCII CHAR Value="10" Destination="%LF%" _COMMENT="Set LF"/> <VARIABLE SET STRING Option="\x00" Destination="%CRLF%" Value="%CR%%LF%" NoEmbeddedVars="FALSE" _COMMENT="Set combined CRLF"/> <COMMENT Value="Split each the line into as many parts as the max expected (up to 99). I've used 10."/> <TEXT FILE BEGIN PROCESS Filename="C:\\Users\\terry\\Dropbox\\Macro Express (Sundry)\\Parsing-1.txt" Start_Record="1" Process_All="TRUE" Records="1" Variable="%tLine%"/> <COMMENT Value="Test if line is blank.\r\n"/> <IF VARIABLE Variable="%tLine%" Condition="\x00" IgnoreCase="FALSE"/> <COMMENT Value="Include a blank line and bypass the split."/> <VARIABLE SET STRING Option="\x00" Destination="%tArray[1]%" NoEmbeddedVars="FALSE"/> <GOTO Name="AfterSplit"/> <END IF/> <COMMENT Value="If there is no comma in the line AND it is not blank, ignore it and go to the next.\r\n"/> <IF VARIABLE Variable="%tLine%" Condition="\x07" Value="," IgnoreCase="FALSE"/> <AND/> <IF VARIABLE Variable="%tLine%" Condition="\x01" IgnoreCase="FALSE"/> <CONTINUE/> <END IF/> <COMMENT Value="Otherwise proced to parse."/> <SPLIT STRING Source="%tLine%" SplitChar="," Dest="%tArray%" Index="1"/> <COMMENT Value="But only use the first element, tArray[1]. Ignore the rest."/> <COMMENT Value="Build the result, stating with an empty new file."/> <COMMENT Value="Add a new line."/> <LABEL Name="AfterSplit"/> <VARIABLE MODIFY STRING Option="\x07" Destination="%tEditedFile%" Variable="%tArray[1]%" NoEmbeddedVars="FALSE"/> <COMMENT Value="Add the EOL characters"/> <VARIABLE MODIFY STRING Option="\x07" Destination="%tEditedFile%" Variable="%CRLF%" NoEmbeddedVars="FALSE"/> <TEXT FILE END PROCESS/> <VARIABLE MODIFY STRING Option="\x11" Destination="%tEditedFile%" Filename="C:\\Users\\terry\\Dropbox\\Macro Express (Sundry)\\EditedFile.txt" Strip="FALSE" NoEmbeddedVars="FALSE"/> <BEEP _COMMENT="End of macro, so edited file sholud be ready."/>
    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. Simpler than mine. Hardest part of making the macro is looking up the Excel keyboard shortcuts.
    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. 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 string of spaces originally existed. No prize yet, Terry, unless you can see your way out of this. 🙄 EDIT AGAIN: Actually the above ALMOST works, if (step 2) all DOUBLE spaces are replaced by CRLF. But some strings of spaces have an even number of spaces, and some have an odd number of spaces. The above logic leaves odd-number strings with a single space, as desired. But it completely removes even-number strings. Have to find a way around that -- still thinking.... It runs pretty fast, though. Have to go work in the garden. I'll probably plant the flowers upside down if my mind is on this problem.
    1 point
  13. 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
  14. ... 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
  15. 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
  16. 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
  17. My processor is Intel Core i3-2370M CPU @ 2.40GHz 2.40GHz. I don't know what that means. Here's the ME routine I tested with. I built a Notepad document so I could easily modify the number of characters for tests. The first couple lines, copying to clipboard, took no more than a second or so, even with 500,000 characters. Setting string T1 from the clipboard took many seconds, maybe 15 or 20 seconds, with 500,000 characters. Very fast with only 5,000 characters. Displaying the "release" text box allows estimating the actual scan time (your code) -- that is, from the time I hit ENTER to close the "release" box, until either the "contains" or "contains none" box appears. So, to finally answer your question, your code runs almost instantaneously whether I start with 5,000 characters or with 500,000. I used Macro Return rather than Macro Stop like you did, but I doubt that matters much. // Text Type: <CTRLD>a<CTRLU> Macro Run: 0_Generic_Copy_To_Clipboard Variable Set String %T1% from Clipboard Text Type: <END> Text Box Display: release to start process Variable Set Integer %N1% to 0 Repeat Until %N1% > 9 If Variable %T1% contains "%N1%" Text Box Display: contains Macro Return Else Variable Modify Integer: Inc (%N1%) End If Repeat End Text Box Display: contains no digits Macro Return //
    1 point
  18. 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 assignment I'm going to favour.
    1 point
  19. 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
  20. Or, if you are just looking for number of RECORDS (as you say in the title of your posting) -- use Text File Begin Process, which transfers the records one at a time into a variable, and you can add to a counter each time through.
    1 point
  21. How many words in each name? Or does the number of words vary? If it's a fixed number of words, then selecting the names and copying them may be straightforward. Part of your script might look like this, assuming each name is two words long. (This is in pseudocode, but it's similar to Macro Express code Type "<CONTROL>f" // Find Type "@<ENTER>" // Search for @ and initiate the search Type "<ESC> // Cancel the search Type "<CONTROL><SHIFT><RIGHT> // Select the 1st word Type "<CONTROL><SHIFT><RIGHT> // Select the 2nd word Type "<CONTROL>c" // Copy to the clipboard In many text editors, pressing F3 repeats the previous search. In Microsoft Word, the hotkey is Shift + F5. Knowing these factoids might help simplify the project.
    1 point
  22. Sixteen IF statements in all, to place a displayable text character into a text variable: If Variable %N1% = 0 Variable Set String %T10% "0" End If If Variable %N1% = 1 Variable Set String %T10% "1" End If .... If Variable %N1% = 10 Variable Set String %T10% "A" End If .... If Variable %N1% = 15 Variable Set String %T10% "F" End If
    1 point
  23. You can include end of line character(s) when saving information to a text file. You should be able to save the end of paragraph character once you identify what that character is. The end of line character(s) differ depending on what computer system you are using. For Windows this would be CR followed by LF or CRLF. However, if your destination computer is Linux this may be LF and for Apple this may be only either CR. I will leave it to you to determine which specific character(s) you need for end of paragraph or end of line. To include these characters in your macros use the "Variable Set to ASCII Char" command. This is a sample from my macros that sets variables for CR, LF and TAB. Variable Set to ASCII Char 13 to %CR% Variable Set to ASCII Char 10 to %LF% Variable Set to ASCII Char 9 to %TAB% For more information about ASCII Characters enter "ASCII characters" into your preferred search engine.
    1 point
  24. I requested a feature to find and replace in multiple macros.
    1 point
  25. 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
  26. I have done the same as Cory on some screens. Sometimes on a web page I will start with Alt-d to highlight the URL, because that also positions the cursor at the URL and gives a known starting point for tabbing. Of course, whoever maintains the page might also change the number of tabs needed. But you can diagnose and fix that fairly quickly when it happens, with the judicious use of Macro Stop statements inserted temporarily to see where the tabbing has left off. Sometimes if I can position the mouse fairly close above or below where I know the button will be, I write a short Repeat loop to move the mouse down or up a few pixels at a time, checking after each move to see if the mouse pointer has changed from an arrow to a finger. That works pretty well but sometimes fails due to timing, Windows busy doing something else so not changing the pointer quickly enough for example.
    1 point
  27. * Example of one line of data, in variable T1. In your macro the Text File Process will populate the text variable, rather than the Set String command. Variable Set String %T1% " X:1701 Y:580" * Set integer to position of "X:" within the data Variable Set Integer %N1% from Position of Text in Variable %T1% * Bump position up by 2 characters so N1 is pointing to the first digit instead of to "X:" Variable Modify Integer: %N1% = %N1% + 2 * What Cory said -- move four digits from the data to another variable Variable Modify String: Copy Part of %T1% to %T2% [starting position N1, number of digits 4] * Display the extracted digits to verify the extraction is working properly Text Box Display: %T2% Of course in your actual macro, you would move the extracted digits to the array instead of Text Box Display.
    1 point
  28. I would use Text File Process command if it's a file. Then in the loop I would use the Variable Modify String with the Copy Part of Text option. Simple. Assuming the X coordinate is always 4 digits of course. As per your sample.
    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 and what should be changed, rather I'm looking for a back-and-forth conversation about the project, the macro, the approach, etc. I've worked with this client before, they were impressed with ME and now we're really getting deep with it. To prevent any liability, though, I'd have to have the person reviewing the video of the macro and the macro itself sign an NDA, limiting the liability just to anything to do with this particular client. As such, I'm looking for an individual who would be interested in working for me likely as a 1099 employee but possibly a w-2 employee. The work would be specific to this client to start, hence the value of reviewing what we are doing and giving input on this particular macro. It also likely wouldn't require assistance until later this year, start of Jan/2017 and might not be needed at all - however I do anticipate there still to be work as the pipeline is starting to get filled quite quickly to the point where I'm concerned I won't have the bandwidth to handle it. I wouldn't have anyone sign anything first. Instead, feel free to contact me and we can discuss your experience and see if it's something you're interested in before we even talk about signing any sort of legal document. I also would not be opposed to any sort of partnership with other Macro Developers who have their own business and want to do a C2C or some other agreement. If that can't work, or if this post has to get deleted, then I will either record the video and scrub a lot of of in editing or I will send just the macro with much of it edited as well. But ideally I would like to have a no restrictions conversation about what the macro is doing and I really can't do that without the full thing being seen and an NDA being signed. PM me if interested. Flame me if this isn't allowed. Admin delete if you get to it first . Thanks, Doug
    1 point
  30. 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 allow multiple concurrent macros to run.
    1 point
  31. I messed with a few of those products but gave up on them. Now I interact by generating my own HTTP Requests and manually processing the HTTP Responses. It's sounds really complicated but it was much simpler than I thought. Think of sending a simple ASCII text file to the server and it responding with a simple ASCII traxt file. That's about it. In most cases I use my browser to manually do something like send a form result and capture it with Fiddler. Then I identify the variable part, say a name for instance, and make that a variable in my code. Then I create my own request trying to emulate it. Then capture the response and do what I need to with it. No web browsers involved and super fast and reliable. And since the code didn't run in the web page the measures they take against automation never get a chance to run. And there's no button clicking. If you're ever interested let me know. I give free half hour initial consultation calls as well. And if you take what I give you in 30 minutes and do something for your benefit and I never make any money I'm happy for it.
    1 point
  32. Thks alan and rberq i think this could help me to solve my problem But one more thing left how could i read time from other program running at system I dont want to use system time so that i can backtest any process runing in that program.....
    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 add an option to Variable Modify String to cast to DateTime. Alternatively one could make a simple JavaScript to do this instead. // Parse out the string values and cast Text Box Display: Default Date Value // Illustrate the zero date default value Variable Set String %strDoB% to "08/19/1968" // 'As sample I set the date to my birthday. This might be done with a clipboard instead. Variable Modify String: Copy a substring in %strDoB%, starting at 4 and 2 characters long to %strDoBDay% // Copy the day string Variable Modify String %strDoBDay%: Convert to Integer (%intDoBDay%) // Cast the day string to an integer value Variable Modify Integer: %intDoBDay% = %intDoBDay% + 1 // To align the day in 1900 12/30 plus 1 to be 12/31 Variable Modify String: Copy a substring in %strDoB%, starting at 1 and 2 characters long to %strDoBMonth% // Copy the month string Variable Modify String %strDoBMonth%: Convert to Integer (%intDoBMonth%) // Cast the month string to an integer value Variable Modify Integer: %intDoBMonth% = %intDoBMonth% - 1 // To make it zero based Variable Modify String: Copy a substring in %strDoB%, starting at 7 and 4 characters long to %strDoBYear% // Copy the year string Variable Modify String %strDoBYear%: Convert to Integer (%intDoBYear%) // Cast the year to an integer value Variable Modify Integer: %intDoBYear% = %intDoBYear% - 1900 // To align with the 1/1/1900 convention // Add the sample DoB value Variable Modify Date/Time: %dtDoB% = %dtDoB% + %intDoBDay% Days // Simply add the day integer Variable Modify Date/Time: %dtDoB% = %dtDoB% + %intDoBMonth% Months // Simply add the month integer Variable Modify Date/Time: %dtDoB% = %dtDoB% + %intDoBYear% Years // Simply add the year integer Text Box Display: Result CastDate.mex
    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 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 followed by a colon and take that input to run thou a tree logic again accumulating lines of string and display the results in the Text Box using the Update Text Box command instead.
    1 point
  36. 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
  37. 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
  38. 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% = %decElapsedTime% * 100000 // Display result Text Box Display: Result You can copy and paste this into your macro: <COMMENT Value="Get Starting time"/> <DATE/TIME Flags="\xB0" Date="7/3/2014 8:21:49 AM" Day_Offset="0" Month_Offset="0" Year_Offset="0" Hour_Offset="0" Minute_Offset="0" Second_Offset="0" Left="Center" Top="Center" Monitor="0" Variable="%StartTime%" IsDateVar="TRUE"/> <COMMENT/> <VARIABLE SET INTEGER Option="\x05" Destination="%RandomDelayTime%" Minimum="0" Maximum="15"/> <DELAY Flags="\x01" Time="%RandomDelayTime%"/> <COMMENT/> <COMMENT Value="Get Ending time"/> <DATE/TIME Flags="\xB0" Date="7/3/2014 8:21:49 AM" Day_Offset="0" Month_Offset="0" Year_Offset="0" Hour_Offset="0" Minute_Offset="0" Second_Offset="0" Left="Center" Top="Center" Monitor="0" Variable="%EndTime%" IsDateVar="TRUE"/> <COMMENT/> <COMMENT Value="Calculate elapsed time"/> <VARIABLE MODIFY DATE/TIME DateVar="%ElapsedTime%" Option="\x01" LeftVar="%StartTime%" RightVal="%EndTime%" UseInteger="TRUE" MathOpt="\x00"/> <VARIABLE MODIFY DATE/TIME DateVar="%decElapsedTime%" Option="\x01" LeftVar="%EndTime%" RightVal="%StartTime%" UseInteger="TRUE" MathOpt="\x00"/> <VARIABLE MODIFY DECIMAL Option="\x02" Destination="%ElapsedSeconds%" Value1="%decElapsedTime%" Value2="100000"/> <COMMENT/> <COMMENT Value="Display result"/> <TEXT BOX DISPLAY Title="Result" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs16 decElapsedTime: %decElapsedTime%\r\n\\par ElapsedSeconds: %ElapsedSeconds%\\f1 \r\n\\par }\r\n" Left="Center" Top="Center" Width="462" Height="133" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/> This may be the same or similar as the sample previously referenced. I did not open that sample to compare.
    1 point
  39. Alien - Not that it helps you any, but these are the problems that were fixed with Mouse Locator in the previous build 4.5.0.1 (Dec 2013): 9. The Mouse Locator now displays the pixel color in separate values for Red, Green and Blue. 10. The Mouse Locator now displays the hexadecimal value of the pixel color in BGR format instead of RGB to match what is normally used by programs that accept hexadecimal values for colors. 11. Pressing Ctrl-C in the Mouse Locator now copies the Screen Position and color values to the clipboard. 12. Made a change to the Mouse Locator to eliminate a problem where the pixel color could flicker on and off even if the mouse is not being moved. 13. Made a change to the Mouse Locator so the values displayed for the Pixel Color are updated if the color under the mouse changes even if the mouse does not move. I have seen no problems on my Vista-home, XP-pro, or Win7-64-pro ... one of these days, I'll get a Win 8.1
    1 point
  40. Greetings, Using Macro Express Standard. Win7 OS. I have a little over 12 million jpg image files which need to be sorted into predefined folders. Is there a way to script a way I can simply assign a destination folder to numpad1 on through numpad9 for 9 folders which I can have the mouse left click on the image thumbnail, cut, and paste the file into the predefined folder? Even if it's a simple copy/paste I am betting its possible to script a delete function to get rid of the originally copied file. I find it very slow to click/drag image files into appropriate folders or tag each image. If there is a way I can just use my numpad to speed through these files, sorting them, this would be great. If the answer is not with this scripting prog, please clue me in. Thanks so very much. Love MacEx, long time user. ~Rob.
    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 POP UP and in POP UP shold dispaly all the macros same as in developer system. deployment process of import /export of macro pop up with .mex files. Thanks, Rk
    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 variable value actually is. I bet it's not 16250871. The other thing you can do is enable logging for the macro and see where it's going.
    1 point
  43. First off stop using the old T variables. Name your variables. Second we have covered this before. I can't fathom why you're still stuck on this. In the external script command there is a field "Save console output to:" Where you specify the variable to errr... well... capture the console output. I can't think of how this could be more simple. See the attached macro. Run it and you should get "Gagan Test" in a message box. Does this make sense now? Also it would help if you provided a simple example of something you are having trouble with. Gagan Test.mex
    1 point
  44. 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
  45. 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
  46. 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
  47. 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 name and be stored in any location.)
    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" Break End If Variable Set String %T2% "Found" Repeat End If Variable %T2% <> "Found" Macro Stop End If
    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 my script: <DIS:<CLIPE><CLIPC><TVAR2:01:03:><TMVAR2:01:01:00:000:000:><IFVAR2:1:01:1:AIR CANADA><TMVAR2:21:01:00:000:000:AIR CANADAAC><ENDIF><IFVAR2:1:01:1:ABB INC.><TMVAR2:21:01:00:000:000:ABB INC.ABB><ENDIF><IFVAR2:1:01:1:ABB CANADA><TMVAR2:21:01:00:000:000:ABB CANADAABB><ENDIF><IFVAR2:1:01:1:BANK OF NOVA SCOTIA><TMVAR2:21:01:00:000:000:BANK OF NOVA SCOTIABNS><ENDIF><IFVAR2:1:01:1:ALBERTA EMPLOYMENT, IMMIGRATION AND INDUSTRY><TMVAR2:21:01:00:000:000:ALBERTA EMPLOYMENT, IMMIGRATION AND INDUSTRYAEII><ENDIF><IFVAR2:1:01:1:ALBERTA HEALTH AND WELLNESS><TMVAR2:21:01:00:000:000:ALBERTA HEALTH AND WELLNESSAHW><ENDIF><IFVAR2:1:01:1:AMERICAN EXPRESS - CANADA><TMVAR2:21:01:00:000:000:AMERICAN EXPRESS - CANADAAMEX><ENDIF><IFVAR2:1:01:1:ATB FINANCIAL - ALBERTA TREASURY BRANCHES><TMVAR2:21:01:00:000:000:ATB FINANCIAL - ALBERTA TREASURY BRANCHESATB><ENDIF><IFVAR2:1:01:1:Banque Nationale Du Canada (BNC)><TMVAR2:21:01:00:000:000:Banque Nationale Du Canada (BNC)BNC><ENDIF><IFVAR2:1:01:1:BELL CANADA><TMVAR2:21:01:00:000:000:BELL CANADABELL><ENDIF><TEXTTYPE:%T1%><TEXTTYPE:<ARROW DOWN>> any ideas would be greatly appricated..
    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...