Jump to content
Macro Express Forums


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by kevin

  1. Paul and Arek, my apologies. What was I thinking? You are correct, there is a rounding error with negative numbers. I was getting confused with how Macro Express rounds numbers that end in 5 (1.5, 1.05, 1.005, etc.). After taking a few days to look at this issue further, I finally realized what is going on. We are working on a fix. In the meantime, enabling Bankers Rounding will fix the issue with rounding -9.600001. It will, however, round numbers that end in 5 differently. To enable Bankers Rounding create this Windows Registry setting: HKLM\Software\Insight Software Solutions\Macro Express 4\AdvOptions\Bankers Rounding and give it a DWORD value of 1.
  2. I do not have time right now to create a sample macro but you could try something like this: - Use a 'Repeat with folder' loop to get the name of each folder. - Create a loop to process through each character of the folder name copying only the valid ASCII letters to another variable. - Use the If Variable command to see if the variable containing the original name and the new name are different. - If different, use those variables in the Rename File or Folder command to rename the folder.
  3. Cool hack Cory. You posted this while I was composing my (longer) solution.
  4. There is no direct way that I am aware of. This sample macro will do it. // Initialization Variable Set String %SearchFor% to "Hello" // Enter the string to search for Variable Set Bool %Done% to "False" // Initialize Done flag Variable Modify String %sTemp%: Copy Whole Text (%Text%) // Make a copy of your original string Variable Set Integer %Count% to 0 // Count the instances of %SearchFor% in %sTemp% Repeat Until %Done% Equals "True" Variable Modify String: Replace "Hello" in %sTemp% with "" // Do not check the 'Replace All Instances' box Variable Modify Integer %Count%: Increment // See if we're done If Variable %sTemp% Contains "Hello" Variable Set Bool %Done% to "True" End If End Repeat I am curious if someone else has an easier/shorter/faster way.
  5. Create two macros, each with a separate hotkey. Inside each macro put a Macro Run command that calls the main macro you want. Easy, simple. Submit feature requests here: Request a Feature.
  6. It depends on what you want to do. <WIN>+B switches focus to the program that displayed a message in the notification area. <WIN>+T cycles focus through programs on the taskbar. Microsoft has an article that documents keyboard shortcuts for Windows 7.
  7. Did you change the Timer Interval setting found under Options, Preferences, Activations, Scheduler tab? This is set to 10 seconds, by default. Try setting it to 1 second.
  8. = Equal to <> Not equal to < Less than > Greater than >= Less than or equal to <= Greater than or equal to
  9. Macro Express Pro supports macros in multiple files. The macro and file handling is more complicated than that of Macro Express 3 and thus, it may take longer to process Macro Enable and Macro Disable commands. We recently made some changes to the routines that handle enabling and disabling macros. In our testing based on your description of the problem, the changes we made improved enabling and disabling macros. We have made two suggestions: 1. Put a small delay between each Macro Enable or Macro Disable command. 2. Put your macros in separate files. You can load and unload separate macro files containing macros using the Load New Macro File and Close Macro File commands. If you need further help with this issue then contact our Support people. Be prepared to give them your license number or other proof of purchase.
  10. Macro Express Pro uses a common dialog box to allow you to navigate to a file or folder. Windows remembers the last folder you navigated to via the Browse button. Click File, New File or File, Open File and click the Browse button. Navigate where your macro files are located. The next time you do these steps the default file will be the last folder accessed. However, it will be set to another value if you later navigate to a different folder.
  11. Try putting a 2 second delay between the attempt to open each new site in Internet Explorer. When spending time evaluating and modifying the Define Word Take 5 I discovered that the amount of delay needed to make the macro reliable varied dramatically between browsers. On my computers Firefox needed 0.01 second delay, Opera 1, Safari 0.75, Chrome 0.01 but IE 2.0 needed 2.0 seconds. This behavior is a result of how each browser works. It is not related to Macro Express itself. The Define Word Take 5 macro determines which browser is in use and adjusts the delays accordingly. Feel free to download and modify it for your needs.
  12. As I said, Delphi and other development environments round up. Java rounds up. In Excel "Fix() rounds towards 0 (up in the absolute sense, but down in terms of absolute magnitude). Fix(-3.5) is -3.5." But "Int() rounds away from 0 (up in terms of absolute magnitude, but down in the absolute sense). Int(-3.5) is -4." Open office's calc rounds up. Spend some time with an Internet search and you will see all kinds of differing opinions. At any rate, Macro Express rounds negative numbers up.
  13. Alan's suggestion is good but stops the repeat loop. If you want to skip macro commands for certain conditions but continue with the repeat loop you can do something like this: Repeat with Variable: Repeat %N1% times If Variable %N99% Not Equal "0" // (any condition you choose) <do other macro commands here> End If End Repeat As Paul mentioned, Macro Express Pro has a Continue command to make this easier.
  14. While we might think that the method of rounding a number is a simple decision there are actually many definitions of how to round a number (as illustrated by spending some time searching the Internet). Macro Express supports two rounding methods, Asymetric Arithmetic Rounding and Bankers Rounding. By default, Asymetric Arithmetic rounding is used. You may set Macro Express to use Bankers Rounding with a Registry entry. In either case, Macro Express always rounds up. That is, it rounds to a higher number. In the case of -9.600001, the value -9.5 is the next higher number. Rounding to -9.6 would be rounding to a smaller number. There are different methods of rounding and different opinions about which is the 'correct' one. An argument could be made for rounding to the next higher absolute value but the decision was made to always round up. This decision was actually made for us. Macro Express is written in the Delphi development environment. This is the way that Delphi (and other development environments) round by default. You can use macro commands to alter the rounding method. These commands round to the next higher absolute value: // Perform absolute rounding If Variable %Dec% Is Less Than "0" Extended Math%Dec%=Abs(%Dec%) Variable Modify Decimal: Round %Dec% to 4 decimal places Variable Modify Decimal: %Dec% = %Dec% * -1 Else Variable Modify Decimal: Round %Dec% to 5 decimal places End If
  15. When a macro is running, Macro Express sends keystrokes and mouse events to Windows and Windows sends them to the application that has focus. When Windows is locked, if you minimize a remote session or if you disconnect a remote session, Windows stops sending the keystrokes and mouse events to the application. The macro continues to run but Windows discards the keystrokes and mouse events. There is a work-around. If you can use Window Controls to send text and mouse clicks, the macro will continue to run when the workstation is locked.
  16. Welcome back Steve! As you have noted, all of the tasks you have outlined can be automated by Macro Express. For other ideas, have you read through the case studies on the How Customers Use Macro Express page? (Be sure to click through to the details). These contain real-world examples of how Macro Express has saved other companies and organizations time and money. The Customer Comments page also contains descriptions of how much Macro Express saves organizations. This is one example: Send me a personal email or call me if you would like a few more details about this example.
  17. Try putting this at the beginning of your macro: Variable Set String %LastFocusedWin% to topmost window title And this at the end: Window Activate: %LastFocusedWin%
  18. Warnings in the program discourage having more than one global macro with the same activation. I am not sure what happens if you bypass the warnings. Have you tried it?
  19. If you have the same hotkey assigned to a Global macro and a Window or Program Specific macro, the Window or Program Specific one will run when you are in the specific program. If you are not in that program, the global macro will run. This works as intended. Suppose you have a global macro activated by the F5 hotkey that looks to see which window is on top and enters a password (see Easy Login). Now suppose that you have another program that does not accept passwords and within that program you want the F5 key to open a dialog box and enter information into it. You can do this with Macro Express Pro because Window Specific and Program Specific macros take precedence over Global macros with the same hotkey activation.
  20. Are you sure that Macro Express Pro is doing something with the Win+L keystroke or is the change in behavior due to Windows 7? Try terminating Macro Express Pro and repeating your test.
  21. These occasionally slip through the protections in place. Today there was one poster today who posted 5 messages. I would hardly say that is commonplace. Spam messages are removed as soon as the moderators read them but the moderators are not in your time zone.
  22. Macro Express Pro will only perform a backup if the macro file has changed since the last backup. Make sure Macro Express Pro is running at 2:20 am. Make sure that your login has complete read/write access to the folder where your backup files are located.
  • Create New...