Jump to content
Macro Express Forums

Samrae

Members
  • Posts

    452
  • Joined

  • Last visited

  • Days Won

    22

Posts posted by Samrae

  1. 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, however, you type anything else, the repeat continues.

     

    This assumes you changed the "On Error" behavior in the "Variable Set String: Prompt" command so the error condition "The dialog was cancelled" is set to "Handle Error".

     

    you said:

     

    After it runs it comes up and asked me for the program name. After a bit of testing I figured it was looking for the macro name, "Copy Org ProCD Test". It's clear to me that I don't understand how the program is using "Copy Org ProCD Test" and "BROWN & BROWN CHEV". After it runs it comes up and asked me for the program name.

    I do not see anything in the macro you provided that could explain what you are seeing. Perhaps it is another portion of your macro?

     

    I hope you have everything working now.

  2. how does having 10 backups(the default in MEP) in the same place avoid data loss if that volume is destroyed or otherwise becomes corrupted?

    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.

  3. 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.

  4. 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.
    • Like 1
  5. I am running as admin.

    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.

     

    Also note that it is just the X,Y coordinates that stops working, the Color values continue updating. This seems to indicate it is not the application blocking the window hooks.

    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.

  6. 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 prevent other programs access to them. Much of what a macro program does such as watching for and sending keystrokes and mouse events are also typical of malware. So, in the interest of security, some programs block these things. What you are experiencing may be related to features in Firefox or Flash to protect from malware.

  7. 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. You could then right-click on the picture, choose the macro, and have a choice within the macro to direct it to the correct folder. (The right-click and choosing the macro can also be done using keystrokes.)

  8. If your macros are getting disabled then you are not copying the macro file. Create a new macro file, perhaps name it "Menu.mex". Put your macros in it. Create the popup menu macro. Then copy the file "Menu.mex" to your users. Do not Export any macros. Do not Import any macros. Copy the entire macro file.

  9. When a popup or floating menu macro is created, it stores the index number of the macros added to the menu. When you export macros and then import them into a new macro file they are assigned new, possibly (probably?) different, index numbers in the new file but the index numbers are not updated in the menu macro. After exporting and importing you will need to recreate your menu macro file.

     

    Instead of exporting/importing the macros you could copy the entire macro file containing the menu macro along with the macros it contains.

×
×
  • Create New...