Jump to content
Macro Express Forums

Cory

Members
  • Posts

    4,207
  • Joined

  • Last visited

  • Days Won

    61

Community Answers

  1. Cory's post in Multiple Choice Menu Default Value Not Working was marked as the answer   
    You are not using variable T1. Set %version% to "B" in your first line.
  2. Cory's post in %variable_a[%variable_b%]% was marked as the answer   
    That should work. But you might want to start a new topic. Maybe enclose a simple example macro.
  3. Cory's post in Start Macro express with mex file was marked as the answer   
    I forgot. If you look again in the help file or in the command list you will find a macro command
    "Terminate Macro Express"
  4. Cory's post in MEP call an API was marked as the answer   
    No. The best solution would be to run a script using the External Script command. Or write a simple parameterized command line program do do the API call. I could possibly help you with that if need be.
  5. Cory's post in Dynamic Array - What am I doing wrong? was marked as the answer   
    First off you should put your code in a code block.
     
    You're missing the concept her on the repeat. Delete the first and sixth line. I have no clue what you're doing here. Now when you set the array values for X and Y use the counter variable specified in the repeat command instead of the N variable. EG %MousePosX[%N[1]%]% should be %MousePosX[%ICTypeRepeatCounter%]%.
     
    Later if you want to go though them and click or something you can use the same repeat.
  6. Cory's post in need help to convert date format was marked as the answer   
    Like this.
    DateConvert.mex
  7. Cory's post in Help with date and time was marked as the answer   
    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
  8. Cory's post in Text Type Menu Key was marked as the answer   
    Yes. In the Text Type dialog box click the drop down for Misc Keys in the lower left and select "Application". That is the menu key. Just a different term for it.
  9. Cory's post in REPEAT UNTIL not working... was marked as the answer   
    I don't have time to consider this closely so I don't know if this helps but I think you misspelled a variable. Window Activate Title uses "persos" and the repeat control is "perso".
     
    On another note you really shouldn't ever use repeat this way. It's better to use two macros with activation.
     
    Also I consider it a bad practice to have a loop like this. It could process a million times a second and bog your CPU and make other apps unresponsive. It's better to put a small delay in. EG 100mS so it only iterates 10 times a second. Usually that's plenty.
     
    Finally I never make loops that have the risk of infinite recursion. In this case I'd make it a loop of finite number which results in a tolerable wait period. For instance if I believe it should never take more than 10 seconds and I'm having it delay 100mS each iteration then I'd loop 100 times. If it finished and never got a hit, controlled by a Boolean variable I'd display an error message to the user.
  10. Cory's post in Using Excel tables to define points on a curve was marked as the answer   
    Attached is a simple macro that will split 10 numbers in a column from Excel and display them. Make sure it's exactly 10 that you copy to your clipboard.
    Column Split.mex
  11. Cory's post in Internet Explorer 11 and Windows 8.1 issues was marked as the answer   
    I just tested and it appears that these issues are solved now.
  12. Cory's post in Unable to read data from a list box was marked as the answer   
    Nothing I can think would work in MEP easily. I use a WebBrowser control for these things in .NET but that's not going to be a useful suggestion to you. One thing I could think of doing is using OCR. I use Tesseract, a free command line OCR utility for some simple CAPTCHA challenge solutions and I could imagine capturing a screen region and running OCR on it effectively since the text is clean.
  13. Cory's post in add a tab into textfile was marked as the answer   
    You need to create a string variable and set it to the tab character.

    <VARIABLE SET TO ASCII CHAR Value="9" Destination="%Tab%"/>
×
×
  • Create New...