Jump to content
Macro Express Forums

Samrae

Members
  • Content Count

    407
  • Joined

  • Last visited

  • Days Won

    20

Everything posted by Samrae

  1. The only reason I used the Variable Set to ASCII Char command is to allow the variables to line up in the Text Box Display command. It is purely for cosmetic purposes. You do not need it in your macro unless you too want to line up the variable results. This creates the variable %TAB% and sets it to the ASCII value for a TAB character. Variable Set to ASCII Char 9 to %TAB% // Initialize TAB Then, if the Text Box Display command contains this: Numerator:%TAB%%D[1]% Denominator:%TAB%%D[2]% Result:%TAB%%TAB%%D[3]% Fractional:%TAB%%D[4]% The results look like this: This is a decimal value
  2. You cannot check for a "." in a decimal variable. You could check for "." in a string variable. This is not valid: If Variable %D[3]% Contains "." I think this works the same as If Variable %D[3]% Contains 0.0 Use the "Variable Modify Decimal Remove Integer Portion" command. Like this: Variable Set to ASCII Char 9 to %TAB% // Initialize TAB Variable Set String %T[90]%: Prompt // Get numerator Variable Set String %T[91]%: Prompt // Get denominator Variable Modify String %T[90]%: Convert to Decimal (%D[1]%) // Convert numerator to a decimal variable Variable Modify String %T[91]%: Conv
  3. Having your macros in the same folder as the Macro Express program files is not a good idea if you are using a current version of Windows and if Macro Express is installed in a folder under one of the Program Files folders. This was okay for Windows XP but, beginning with Windows Vista, for security reasons, Windows tries to protect files by preventing changes to any of the files located in a Program Files sub-folder.
  4. Command line switches go in the Program Parameters field of the Program Launch command.
  5. It's a good idea to post both the "Command Text" and the macro code. The first, like you did, so it is easily read, and the latter so it is easily copied. To have the macro stop when the string contains something you will need to use the "If Variable Contains" command.
  6. It took me a few days to get the time to recreate your macro. In the future, you might get help sooner if you post your macro in a copyable form. You can do that opening a code box in this forum by clicking on the '<>' icon above. Then you can copy your macro and paste into the code box. I entered the macro code you provided into a new macro and ran it. It works correctly. When it runs %T[1]% contains the default value of BROWN & BROWN CHEV. If you click the OK button when that is displayed the repeat loop ends. Clicking Cancel halts the repeat loop but the macro continues. If,
  7. What is not working? What do you do, what do you expect and what do you see? You have duplicate "On Error" blocks. Does it help if you remove one of them?
  8. It is possible to add leading 0's to a number in a string variable. It is not possible to add leading 0's to a value in an integer variable.
  9. Here is another way: Variable Modify String %tNumberNew%: Pad Left (2) // Pad to two characters Variable Modify String: Replace " " in %tNumberNew% with "0"
  10. What version of Macro Express Pro are you using? With version 4.3.0.1 some of the commands were modified with the option "Don't process embedded variables". If you post a snippet of your code we may be able to make some better suggestions.
  11. This might work: Put a Macro Disable (of Macro 1) command at the end of Macro 1. Put a Macro Enable (of Macro 1) command at the end of Macro 2.
  12. To allow delays to be modified add something like this to the top of your macro: Variable Set Decimal %SmDelay% to 0.1 Variable Set Decimal %MedDelay% to 0.5 Variable Set Decimal %LgDelay% to 1.0 Then, where needed in your macro, add delay commands like this: Delay: %MedDelay% seconds
  13. Something like this may work as a starting point: Variable Set Integer %Idx% to 0 Get Array Length (%name_ban%) => %Max% Repeat Until %Idx% Is Greater Than or Equal To "%Max%" Variable Modify Integer %Idx%: Increment If Variable %name% Equals "%name_ban[%Idx%]%" // Do something special here End If End Repeat
  14. It doesn't. It would be a good idea to change the preferences to save the backup files on a different drive in case your main drive gets damaged. If you want backups stored in multiple locations you could have a macro do that. I like that Macro Express saves multiple backups though. If I edit Macro B (overwriting some of the backup files) and later decide I want to get an earlier version of Macro A, I can.
  15. gagangoomer: When you copied the macro and then saved, Macro Express Pro offered to create each variable in turn. When the variable %StringArray% was created did you make sure that it was defined as a string array variable? To fix it, open the macro in the Script Editor. Click the Variables tab. Click on the [+] next to Text variables. Look for StringArray. Double-click on it. Make sure "Create as an array" is clicked. Make sure the number of elements is high enough.
  16. If the application supports it you can read the content of a control via the "Get Control Text" command. I think the suggestion was to try to see if Window Control commands would work.
  17. 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
  18. Here is a sample macro Macro Timer that may do what you need.
  19. You can read about Window Controls in the Macro Express Pro help. The sample macro "Calc ulator and Note pad" in the samples.mex macro file demonstrates how to use Window Controls. This macro file is available in the folder where Macro Express Pro is installed or may be downloaded here.
  20. There is a sample macro, based on Floyd's work, that allows Multiple Inputs.
  21. Are you logged in as admin or are you running Macro Express as Admin? My Windows login is an admin login but Macro Express Pro runs with normal (non-admin) privileges. Reading the color under the mouse does not use the hooks. It may still be an issue with the hooks. Maybe you should create a bug report with Insight Software.
  22. One thing to try is to Run Macro Express as administrator. If that doesn't work it may be something intentional by the people who write Flash or Firefox. The Mouse Locator, and Macro Express itself, communicate via something called the "Windows Hooks". Using hooks requires cooperation between any program that also uses the hooks. One program can block access to the hooks for all other programs. An indication of the hooks being blocked is when the Mouse Locator stops updating the position of the mouse cursor and the color beneath it. Some programs have implemented security features to p
  23. That's a lot of photos! I have thousands but nowhere near millions of pictures. Whenever I need to do file manipulation I use the file commands in Macro Express. You can copy, delete, move and rename files and it doesn't require any tricky mouse positioning within Windows Explorer. You could use a free program like Irfanview to display the photo. Then you could press a key to display the next picture and move the previously displayed one to the correct folder. If I were using Windows Explorer I would install the Context Menu macro. This adds a macro name to your right-click menu. Y
  24. I haven't seen any errors visiting http://www.pgmacros.com. What are you seeing?
×
×
  • Create New...