Jump to content
Macro Express Forums

paul

Members
  • Posts

    1,049
  • Joined

  • Last visited

Everything posted by paul

  1. Why then, it's correctly documented, isn't it? If it does nothing (and I get the same results as you), then why on earth should Insight document it?
  2. Oh, that's easy! Try this code: Program Launch: "notepad.exe" (Normal) Parameters: Variable Set Handle %hNotepad% from a window with the title, "notepad" Delay: 10 seconds Window Activate: %hNotepad% <PROGRAM LAUNCH Path="notepad.exe" Mode="\x00" Default_Path="TRUE" Wait="1" Get_Console="FALSE"/> <VARIABLE SET HANDLE Option="\x01" Info="notepad" Partial="TRUE" Wildcards="FALSE" Destination="%hNotepad%"/> <DELAY Flags="\x01" Time="10"/> <WINDOW ACTIVATE Title="%hNotepad%" Exact_Match="FALSE" Wildcards="FALSE" _IGNORE="0x0006"/> My understanding (probably wrong!) is that a handle variable can be used anywhere where you might otherwise use a window or control name. But I don't think it helps with MDI windows. AutIt provides more granular control over MDI windows, but it's not straight-forward.
  3. I must say I lost interest as soon as I read that you haven't tried the suggested workarounds and tests. If you describe a problem and get specific suggestions on how to solve it, then I don't see any purpose in you seeking more help until you've tried the already suggested solutions. Since you've already failed to take the proffered advice, what on earth could anyone in this forum do further that they haven't already done?
  4. I'll rewrite your first sentence above as follows! I see a demand for add-on programs for users to make up for the shortcomings in MEP.
  5. Almost the first thing I do when installing Windows is to disable screen-savers, get rid of wallpaper, themes, etc. In other words, almost all candy floss! In fact, of the performance options available, I use only "Show window contents while dragging" and "Smooth edges of screen fonts". So, no, I'm not affected by this restriction.
  6. When I'm really desperate for a particular application to gain focus (in the example I'm using Foobar2000), I do this: Repeat Until %n[1]% Does not Equal "%n[1]%" If Window "foobar2000" is focused Repeat Exit End If Window Activate: foobar2000 End Repeat You could generalize this so that a shared variable contains the window name, then you could simply initialize the shared variable with your desired window name and call the macro as a subroutine. You could also add a timeout, perhaps displaying a timed message if you can't focus on the desired window in the specified time.
  7. I think running means "active" - in other words, the screen-saver is in charge. And yes, I think the restriction is global.
  8. It is possible, but it involves writing a total of 39 macros (most of which are almost identical)! See Detecting Keys Pressed for details.
  9. What an extraordinarily stupid response this is. If a facility is provided in order that you may request a new feature, and you choose to ignore that facility, then why on earth would you expect anyone to take any notice of you; to say nothing about the remarkable lack of manners you choose to exhibit.
  10. I certainly welcome this new release, especially since Insight rarely seems to contribute to this forum these days. But it is disappointing that a bug I reported quite a long time ago has not been addressed. Has no-one else encountered this problem?
  11. Do you have any evidence that Insight still exists?
  12. I don't think I agree with this. Consider a procedural method of processing customers, where one simply starts at the top and plods through the code, dealing with customers according to their needs, restarting at the top for each new customer. Conceptually, a customer is represented by fields in one or more tables, and processed by any number of functions, e.g. add, modify, delete, report, archive. Now consider an OO system where one might very easily decide to create a new customer object instance, perhaps asynchronously, for each of several customers due for processing. Now that seems to me an entirely different model. Conceptually, a customer is represented by its object instance, therefore appearing as a black box to the outside world, with selected methods and attributes made public as the designer sees fit, e.g. add, modify, etc.
  13. I can't see any reason why you can't simply paste the code as desired. Of course, the original macro makes calls to several others, all of which use values in the registry that were originally set up when you installed the product. I don't see that any of these values are needed, but you'll have to work out alternative locations and/or alternative methods in order to circumvent them.
  14. I personally recommend using AutoIt (which is one of the script languages supported by MEP) AutoIt because it has the most comprehensive set of user-developed functions (50) for working with Internet Explorer I have ever seen. Mind you, the amount of work involved to understand and learn the supplied functionality would be prodigious, although getting it to work with MEP would be quite easy.
  15. In the PGM Library, which you can now download for free and which contains source code that is now available to you, is a function { Date Time - Span of Days } which appears to meet your needs.
  16. Well, I'm certain it's not my macros! These macros are centuries old, and I've never seen these errors until very recently. And it happens with any macro.
  17. I assume these are the preferences that are stored in the registry? I know my machine has a few problems at the moment, none of which I have been able to resolve. This is why I'm currently busy working on a complete reinstall. And it's so much fun!
  18. I should have said these error messages are not macro error messages, they seem to be directly from Macro Express Professional itself. They are occurring about once in 3 macro executions, and they appear for any macro. I have reinstalled MEP, but this had made no difference. I'm hoping someone from Insight will read this and comment.
  19. Has anyone seen this before? From time to time when running MEP macros (and by no means every time I run a macro), I get 6 error messages which I have to dismiss by clicking on OK for each: SetPrefString: Error writing to preferences: SetPrefString (this appears twice) SetPrefInteger: Error writing to preferences: SetPrefInteger (this also appears twice) SetPrefBinaryProc: Error reading binary from preferences: SetPrefBooleanProc ClosePref: Error: ClosePref I do have full read/write access to the HKCU Macro Express 4 key and all its subkeys and values.
  20. Try this - you may have to experiment: Assume the macro you want to run is called M1 Using the built-in Windows 7 Task Scheduler, create a new scheduled task: Trigger: Begin the task: On an event Basic Log: System Source: WindowsUpdateClient Event ID: 1 Action: Start a program Program/script: C:\Program Files (x86)\Macro Express Pro\MeProc.exe /AM1 As you can see, there are a lot of trigger log values, and Sources, and Event IDs. I've simply taken a guess that this may work. Let me know.
  21. What's wrong with using the DOS method you describe, but prompt for the specific criteria you need to apply, as in: Variable Set String %tChar1%: Prompt If Variable %tChar1% Equals "" Macro Return End If Program Launch: "cmd.exe" (Normal) Parameters: /c dir %temp%\%tChar1%*.mus /b /-p /-w >%temp%\inmain.txt <VARIABLE SET STRING Option="\x01" Destination="%tChar1%" Prompt="Enter character to filter against" Mask="FALSE" OnTop="FALSE" Left="Center" Top="Center" Monitor="0"/> <IF VARIABLE Variable="%tChar1%" Condition="\x00" IgnoreCase="FALSE"/> <MACRO RETURN/> <END IF/> <PROGRAM LAUNCH Path="C:\\Windows\\System32\\cmd.exe" Mode="\x00" Parameters="/c dir %temp%\\%tChar1%*.mus /b /-p /-w >%temp%\\inmain.txt" Default_Path="TRUE" Wait="1" Get_Console="FALSE"/>
  22. Can you provide the macro code (or relevant part thereof) please?
  23. Is what you're asking for the same as counting all the files in a given path? After all, in Explorer you can filter out unwanted file types, leading to a different result.
  24. Here's something to get you started. Please note I wrote this in MEP, so it's possible, but not likely, that I've used commands that are not available in ME3. In any case, you will have to change the variable names to the ME3 standards! All variables are integer. You need to adjust for the following situations: - My 3 monitors (1280 x 1024) are arranged: #3 on the left, #1 (primary) in the middle, #2 on the right. This means that my screen coordinates are: #1) -1280, 0 to -1, 1023 #2) 0, 0 to 1279, 1023 #3) 1280, 0 to 2559, 1023 - Yours are probably different, so you need to change lines 5 - 13 - I haven't bothered with determining whether the current window is maximized or not, so its final state is restored - I assume all monitors have the same width Variable Set Integer %nScreens% to 3 ' set this to the number of monitors; if other than 3, ' you'll have to add or subtract the conditional logic in lines 5 - 13. Variable Set Integer %nWidth%: Set to the Screen Width Variable Set Integer %nLeft%: Set to the Current Window's Left Variable Set Integer %nTop%: Set to the Current Window's Top If Variable %nLeft% Is Less Than "0" Variable Modify Integer: %nLeft% = %nLeft% + %nWidth% Else If Variable %nLeft% Is Less Than "%nWidth%" Variable Modify Integer: %nLeft% = %nLeft% + %nWidth% Else Variable Modify Integer: %nLeft% = %nLeft% - %nWidth% Variable Modify Integer: %nLeft% = %nLeft% - %nWidth% End If End If Window Restore: <Current Window> Window Reposition: <Current Window> Position: %nLeft%, %nTop%
×
×
  • Create New...