Jump to content
Macro Express Forums

Samrae

Members
  • Posts

    452
  • Joined

  • Last visited

  • Days Won

    22

Everything posted by Samrae

  1. 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.
  2. 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: 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.
  3. 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?
  4. 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.
  5. Here is another way: Variable Modify String %tNumberNew%: Pad Left (2) // Pad to two characters Variable Modify String: Replace " " in %tNumberNew% with "0"
  6. 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.
  7. 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.
  8. 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
  9. 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
  10. 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.
  11. 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.
  12. 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.
  13. 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.
  14. Here is a sample macro Macro Timer that may do what you need.
  15. 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.
  16. Sometimes when <ALT>+<ARROW DOWN> doesn't work using <ALTD>+<ARROW DOWN>+<ALTU> will.
  17. There is a sample macro, based on Floyd's work, that allows Multiple Inputs.
  18. 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.
  19. 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.
  20. 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.)
  21. I haven't seen any errors visiting http://www.pgmacros.com. What are you seeing?
  22. You can activate a macro by a mouse click and then use the Delay command to wait one second. But I do not think you can check to see if the mouse button is still pressed.
  23. 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.
  24. 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...