Jump to content
Macro Express Forums

kevin

Admin
  • Posts

    1,950
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by kevin

  1. You could use the debugger to step through your macro from within the Script Editor. Click Debug, Show Variable values to display the variables as you step through the macro. Or you can insert a Text Box Display command with "C:\McL\Admin\Scans\%T[1]%.pdf" in it to display the path. T1 and T[1] are not the same variable. You can use either but do not expect them to contain the same thing. T1 is a variable containing a string. %T[1]% is part of an array variable. You access individual elements of the array with an index like %T[2]% or %T[%Idx%]%. Note that %Idx% is an integer variable in this case. Instead of using T1 as a variable name you should consider using a name that reflects the purpose of that variable. You might use %NewFilepath%, for example.
  2. Try the Variable Set String %T1% from Window Title command.
  3. I confirmed this. It is interesting behavior. On Windows 7 the position of a maximized window is reported as -8, -8. This is because the borders around windows in Windows 7 are wider than Windows XP. I too am surprised that I have never heard of or noticed this behavior but it makes some sense. Macro Express gets the size and position of windows from Windows. It reports exactly what Windows reports.
  4. Thanks to Joe Weinpert and Professional Grade Macros the PGM Functions Library is now free.
  5. Macro Express Pro v 4.2.2.1 Macro Express Pro v 4.2.2.1 is now available. This version includes these changes: Fixed a problem where in some cases the name of a variable was copied instead of the content of the variable, Added the ability to edit a macro even if it's locked by another user. The errors in the 'Catch Error' dialog are now sorted alphabetically. When the macro error dialog is displayed, the user can now press Ctrl+C to copy the contents of the window to the clipboard. Fixed a bug in the 'Variable Modify String: Copy part of string' command where the source variable was not processed. The 'Variable Set From File path' command now returns the correct filename when the file extension is included twice in the filepath. The 'Encrypted Text' command now supports the 'Keystroke Speed' settings properly. For a complete list of changes, see the Macro Express Pro v 4.2.2.1 Release Notes. Download Macro Express Pro from the Macro Express download page. For more information, including tips and sample macros, we invite you to read the January 14, 2011 issue of the Macro Express News.
  6. 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.
  7. 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.
  8. Cool hack Cory. You posted this while I was composing my (longer) solution.
  9. 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.
  10. 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.
  11. 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.
  12. 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.
  13. = Equal to <> Not equal to < Less than > Greater than >= Less than or equal to <= Greater than or equal to
  14. 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.
  15. 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.
  16. 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.
  17. 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.
  18. 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.
  19. 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
  20. 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.
  21. 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.
  22. 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%
×
×
  • Create New...