Jump to content
Macro Express Forums

joe

Members
  • Posts

    1,002
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by joe

  1. er, delete? You mean this topic?
  2. You missed the Macro Stop line between the If and End If lines If Window Title "Request" is running Macro Stop End If
  3. This can be done using an external script written in VBScript or Javascript and controlled by Macro Express. You would need to know the web page and which one of the many, many, many, many tables contains the data. An external script can parse the DOM (Document Object Model) to find TABLE tags, but these tags can also be used to format a web page.
  4. I am not sure this is possible. Only a single macro can run at any one time, so the "repeatable" macro won't fire if the "time display" macro is running.
  5. Interesting. I've never noticed that the log format is proprietary. And one cannot cut-and-paste from the Options->Preferences->E-Mail Settings->View Log summary dialog either. A solution might be to determine the MailLog.txt format and parse it with a macro.
  6. The short answer is yes, your macro will not run. It is unclear as to what you are trying to do. Do you want to exit the repeat loop when any window with "Request" in the title starts running or should it exit only for a specific "Request xxxxxxx" window? Also, the Macro Playback Speed command need only be placed once in a macro, so remove it from the loop and place it at the beginning of you macro.
  7. Another option, of course, is to simply use Macro Express. Here is a sample macro that renames files in my c:\xtemp folder to a sequence beginning with 0001.bmp and displays each change in Notepad. You will need to change it to suit your specific requirements (folder and sequence range). And it wouldn't hurt to test it on a dummy folder either. Window Minimize: "Macro Express - " Activate or Launch: "notepad" OR "notepad.exe" Variable Set Integer %N1% to 1000 Change Directory/Folder: "c:\xtemp" Repeat with Folder Variable Modify Integer: Inc (%N1%) Variable Modify Integer: Convert %N1% to text string %T2% Variable Modify String: Delete Part of %T2% Activate Window: "notepad" Text Type: %T1% -->> %T2%.bmp<ENTER> Rename File or Files: "%T1%" Delay 250 Milliseconds Repeat End Macro Stop <WMIN:Macro Express - ><LAUNCHYES3:0:0112notepad<LAUNCH:notepad.exe><REM2:><IVAR2:01:01:1000><DOFILE:01:NN:c:\xtemp>><REM2:><REP3:07:000001:000001:0001:0:01:c:\xtemp><NMVAR:08:01:0:0000001:0:0000000><NMVAR:05:01:0:0000002:0:0000000><TMVAR2:11:02:00:001:001:><REM2:><ACTIVATE2:notepad><TEXTTYPE:%T1% -->> %T2%.bmp<ENTER>><REM2:><DOFILE:06:NN:%T1%>%T2%.bmp><MSD:250><ENDREP><MSTOP>
  8. This sounds fairly simple if you are going to use a single folder and a range of numbers for file names, say 0000.gif through 9999.gif. When you are ready to save a file, use the Repeat with Folder command to find the largest file number used to-date, add 1 to it, and then use the Text Type command to enter the name in the prompt field.
  9. I am lost as to how a web page being "dynamic and internal" presents a problem with the Wait for Web Page command. What is happening that makes the command unusable?
  10. What did you do to solve it Oded?
  11. Macro Express is specifically designed to do this simple task. You are running a 5-line macro that checks for the pixel color and then clicks the mouse when found. On my computer, which is old, this macro runs 30,000 loops in a single second and then clicks the mouse. Much, much faster than needed, eh? Forget the game for the moment. Create a loop timing test for yourself (or use the one below) and run it to see how fast it is on your computer. The T1 string holds the start time within 1/1000 of a second. The T2 string is the ending time. Compare the two in the Debug window after the macro runs. Date/Time: Save "hh.mm.ss.zzz" into %T1% Repeat Start (Repeat 30000 times) Get Pixel: Screen Coords: 227,725 into %N6% Repeat End Mouse Left Button Click Date/Time: Save "hh.mm.ss.zzz" into %T2% Macro Stop <DT:hh.mm.ss.zzzT:01:1:><REP3:01:000001:000001:30000:0:01:><GETPX:6:S:000227:000725><ENDREP><LCLK><DT:hh.mm.ss.zzzT:02:1:><MSTOP>
  12. Hello ol3ears! I've downloaded and have been looking through the ScreenView executable documentation and library. Specifically the Hot.bmp and Hot.txt example. I understand the concept of what you are doing, but some of the details escape me. Please correct me if I have any of this wrong: ScreenView takes its comparison instructions from the Hot.txt file, one line (instruction) at a time. In your example it scans the whole screen looking for a pixel that matches the color of the point at 8,7 in the Hot.bmp file. When it finds it, it then attempts the next comparison, looking for a "cross" shape on the screen (relative to the point it just found) that matches the cross at 31,14 in the Hot.bmp file. This cross shape is a 3x3 pattern that demands a comparison of 5 pixels. The center of the cross being at 31,14. It then compares another cross at a different set of coordinates, and finally it compares 330 pixels in a 30x11 "block" shape at coordinates 3,5. If each comparison is true, then ScreenView found what it is looking for and returns the X and Y screen coordinates to a Registry string along with the width and height values of the graphic contained in the Hot.bmp file. Some other questions: Is the OffCross pattern a 3x3 pattern that compares the 4 points on the corners? What are the details of the Star pattern? Is the "delta" parameter of the HLine and VLine patterns the line length? One more thing. Although I understand the how for the BGRrange, I don't understand the why. Is there something that tells ScreenView that the pixel it is comparing is a background pixel as opposed to a foreground pixel?
  13. joe

    3.5e.

    Hello Randall! Something may have been changed. The following two notes are in the WhatsNew.txt file.
  14. Hello Nevada! Repeat Start (Repeat 10 times) If Window Title "Calculator" is running Repeat Exit End If Delay 1 Seconds Repeat End <REP3:01:000001:000001:00010:0:01:><IFOTH:04:1:Calculator><EXITREP><ENDIF><DELAY:1><ENDREP>
  15. The default abort hotkey is Scroll Lock+Pause, which are right next to each other on your keyboard. You can change the default to a different key, or key combination, from the Options->Preferences->Playback window.
  16. Hello vvkp One idea would be upgrading to the latest Macro Express release. Version 3.5e.
  17. Hello Cory! Not sure what your code looks like, but testing for an empty string variable does work. Here is an example: <IFVAR2:1:01:1:><TBOX4:T:4:CenterCenter000250000125:000:Empty Variable Variable T1 is empty!><ENDIF> There is a difference between an "empty" string and a NUL string in Macro Express as in all other programming languages, script or otherwise. NUL is a real character (ASCII 0) and it can be counted. If you have a string of 10 NUL characters, then the string length would show as 10.
  18. Hello Cory! You can do this with version 3.5d or later. Here is an explanation from a different post (thanks Kevin!): ---------- Variable Evaluation Level This feature allows the use of one variable to access another one. Consider, for example, the statement: %T%N1%% In Macro Express version 3.5c and earlier, if N1 contains 10 then the result will be %T10%. But, the content of T10 will not be accessed. The value will remain %T10%. But, with the Variable Evaluation Level feature in version 3.5d and later, you can tell Macro Express to evaluate each statement that contains a variable multiple times. Thus, in our example, the first evaluation will result in %T10% and a second evaluation will retrieve the content of %T10%. If N1 contains 1, then this will become %T1%. If N1 contains 99, then this will become %T99%. If N1 contains 101 then ... I don't know what will happen. Because this multiple evaluation level has the potential of breaking existing macros, it is not enabled by default. To enable it, you need to enter a value in the registry. Create a REG_DWORD registry value 'Variables Evaluation Level' in the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Insight Software Solutions\Macro Express\AdvOptions -or- HKEY_CURRENT_USER\SOFTWARE\Insight Software Solutions\Macro Express\AdvOptions You may need to create the AdvOptions registry key. To know whether to put the registry value in HKLM or HKCU you need to understand how Macro Express stores preferences. By default, Macro Express tries to store its preferences in HKLM. However, if the logged in user does not have access privileges to write to HKLM or if the ‘All users use the same settings’ option (found in Options, Preferences, Miscellaneous) is unchecked, then the preferences are stored in HKCU. Set the Variables Evaluation Level to a number greater than 0. I have mine set to 5 but a value of 2 may be fine for your needs. The value you set determines how many times the variable evaluation is repeated. If you have a complex statement that would require multiple passes to resolve, then you may want to set the Variables Evaluation Level to a larger number. But avoid very long loops, do not set this to a very large number. All of this can be handled with a simple macro to enable this feature. This macro determines where in the registry (HKLM or HKCU) this option should be located and sets it. Try this: <VSETMISC:T1:Preferences Registry Key><IVAR2:01:01:2><REGWINT:1:%T1%\AdvOptions\Variables Evaluation Level> ---------- Attached is an example so you can see how this works. SampleVariableEvaluationLevel.mex
  19. It will be pretty fast. I used the book as a test. Copied the whole thing (16,000 lines) to the clipboard, set T1 from the clipboard, replaced all commas with nothing, and finally saved it back out to a file. The whole process took under a minute.
  20. There is not a real limit to the length of a text string. The longer they are, however, the longer it takes to process them. I suggest that you create a test on a real, real, real long string. Try something like searching for a character, or counting characters in a loop. You will be pleasantly surprised!
  21. Cory - From the book:
  22. Hello Cory! We have no experience importing and exporting using QuickBooks IIF format file, even though it is one of the accounting packages we use. But there is probably information about its structure on the net. Try searching for something like "QuickBooks IIF structure".
  23. What you see is a Macro Express command line in its native mode. How it is used is called "dynamic processing". By placing a native command line in a string variable and then running the variable, we can change the value of a setting in the command line each time through a loop. In this case, we are decrementing %T1% from "today" until the first day of the month is reached.
  24. Hello KeyBored! Here is a thread that looks into this subject and contain a couple of possible work-arounds.
  25. Hello HeyJim! Another option (something I've done in the past) is to use Find and Replace (Ctrl+H) instead of just Find. See the attached picture. By setting the Search field to "All", every instance of a comma will be changed to a CR/LF at once in the document.
×
×
  • Create New...