Jump to content
Macro Express Forums

paul

Members
  • Posts

    1,049
  • Joined

  • Last visited

Posts posted by paul

  1. Try running a macro using the OS native scheduler. The command line will probably be:

    "C:\Program Files\Macro Express Pro\MeProc.exe" /AMacroName

    Change C: if your Program Files folder is on a different drive, and replace MacroName with the name of your macro - and you need the quotes.

     

    If that works, then your problem lies with Macro Express. If it doesn't work, your problem lies elsewhere.

  2. Thanks for your effort. I've also tried it on a second machine, and, like you, experienced no problems.

     

    The only thing to note is that the 1st machine has a strange collection of video cards on it:

    - the one supplied on the HP motherboard which I am unable to use

    - a Radeon dual-monitor card

    - an ancient Millennium card for the 3rd monitor, which is so slow that I must reduce its output to 16-bit

     

    ME's Explorer runs on the middle screen (Radeon); I can't run it on the left-hand screen (Millennium) because the x-coordinates are all below zero, and I therefore cannot edit existing macros (previously reported bug).

  3. Firefox v3.08 is now available. For those of you who check the pixel colour of the X in the navigation toolbar to determine if a particular page has completed loading, be aware that this no longer works (at least, not on my machine)! The mouse locator tool does not detect any mouse movement when the mouse is over either of these toolbars. And I am unable to detect a change in pixel colour of the X. Interestingly, AutoIt's equivalent to the mouse locator tool does work correctly!

     

    I am reverting to v3.07 immediately, which does work.

  4. Personally, I prefer <g> or :) (if that second one is right) - I actually entered colon right-bracket, and don't appreciate having my text converted.

     

    And I get quite irritated when I try and present a lettered list. You can see what I mean below - it should read (using Bee for the letter B )

    - A) point one

    - Bee) point two

     

    instead of which we get:

     

    - a) point one

    - B) not what I intended for point 2!

  5. I tried the same (displaying dialog boxes). Same Hotkey but two macros (one press, one release activated) Eventually i managed to run the press Macro on press. The release macro repeated most of the time endlessly. Even worse, MEX Pro crashed most of the time (I did sent some of the crash reports to Insight)

     

    What should i say? The great idea to distinguish between Key down / up is not yet ready to use?

    No, I don't agree! I think the macro runs perfectly on a hotkey press, just as long as:

    1) you don't include any Text Type commands

    2) you don't assign another macro to the same hotkey (but waiting until the keys are released)

     

    If you were to allow point 2 above, then every time you pressed the shared hotkey, both macros would run. I see no purpose in that!

     

    Kevin, would you have expected the Text Type command to work reliably in a macro activated by a hotkey as soon as it is pressed?

  6. I don't understand your problems with opening and closing Stiletto!

     

    I downloaded it and successfully did the following:

    - created a desktop shortcut to Stiletto.exe which works exactly the same as double-clicking on Stiletto.exe, i.e. "GUI" appears

    - Launched Stiletto from a macro using the Program Launch command

    - Closed Stiletto using the documented close command in another Program Launch command,

    e.g. Program Launch D:\stil19w\stiletto.exe

    Parameters stiletto.ini close

    If your .ini file is called something else, use that name, but don't supply the folder name as part of the .ini parameter

     

    Works perfectly for me!

  7. The problem with your sample macro lies with the Text Type command - I imagine pressing and holding the hotkey interferes with this command.

     

    I have M1 and M2, both of which display a texbox with different words so as to distinguish between them.

    M1 activates on Ctrl-H when pressed, M2 activates on Ctrl-I when released (I tried having both on Ctrl-H but M1 never fires).

     

    Pressing and holding Ctrl-H runs M1 once.

     

    Pressing and holding Ctrl-I does nothing while the hotkey is pressed; but as soon an it's released then multiple copies of M2 run at the same time (a bug I've already reported).

  8. I have a macro that simply displays a text box. It is triggered via a hotkey ALt-X (when released).

     

    If I press and release Alt-X, it runs. Before dismissing the text box, I press and release ALt-X again - as expected, the macro does not run again, because it's already running.

     

    Now I close the text box, and the macro stops running. All is well.

     

    But wait...

     

    I now press and hold down Alt-X. While I am holding these keys down, nothing happens. But as soon as I release them, multiple textboxes appear, and multiple icons in my taskbar, indicating the macro is running many times all at the same time. I must close each textbox separately until no more macros are running (I got 40 to run).

     

    This is presumably a bug?

  9. If I have these 2 commands in a macro:

    Text Box Display: Select a Server (Timed floating box or end of macro for 5 seconds)
    Delay: 5 seconds

    then the macro displays the message for up to 5 seconds and continues.

     

    However, if I put these 2 commands into a variable (using the Direct Editor and expanding all \ to \\), the text box displays more-or-less as expected (it actually needs more height when run from a variable), but does not close itself after 5 seconds.

     

    ???

  10. In ME4 we can display a message using rich text, e.g. we can bold certain parts of our message.

    And as in ME3, we can display variables, e.g. %T[1]%

    Now, can we store rich text in a variable and display that?

     

    So I want to display this message:

    Welcome

    Can I store this formatted string ("W" in bold, "elcome" in italic) in a variable and display it?

  11. [Revised 22nd March after testing for all 36 conditions simultaneously]

     

    Let's take it from the top.

     

    I use SQL Server's Query Analyzer many times a day. If loaded in vanilla mode, it asks you for a server. You can start it with a prespecified server, but as I have 4 servers, that's 4 menu choices. So...

     

    MACRO QAOpen
    	- Set a variable to my "menu" of 4 server names
    	- Initialize %hotkey% with a string of 4 unique letters - these are the bolded letters above, e.g. CGLV
    	- Run macro Keypress and wait for it to end
    	- Close the text box
    	- If registry value KeyPressReturned is empty, set it to L ((local)
    	- Load Query Analyzer for the selected server whose 1st letter is in registry value KeyPressReturned
    
    	MACRO Keypress
    	- Set registry value KeyPressRepeats to 2
    	- Set registry value KeyPressReturned to "*"
    	- Calculate length of %hotkey%
    	- Repeat HotkeyLength times  
    	  * Extract next character from %hotkey%
    	  * Run macro KeyPress + HotkeyCharacter (do not wait for it to end)
    	- Set registry value KeyPressReturned to "" (this causes all KeypressX macros to start processing)
    	- Display menu set by caller
    	- Multiply KeyPressRepeats by 4 (representing 250 milliseconds)
    	- Repeat (KeyPressRepeats x 4) times
    	  * Read registry value KeyPressReturned
    	  * If not empty Break
    	  * Delay 250 milliseconds
    
    	MACRO Keypress0 - KeypressZ (36 macros)
    	- Read registry value KeyPressRepeats
    	- Repeat until registry value KeyPressReturned <> "*" (this ensures all KeyPressx macros start simultaneously)
    	  * Timed Delay 20 milliseconds
    	- Repeat KeyPressRepeats times
    	  * Wait for key press 0-Z, depending on the macro (wait a maximum of 1 second)
    	  * If timeout occurs (using On Error)
    		 $ Read registry value KeyPressReturned
    		 $ If not empty, Macro return
    		 $ Continue
    	  * Set registry value KeyPressReturned to 0-Z (this line gets executed only if the key was pressed)
    	  * Break

     

    In this example, macros Keypress, KeypressC, KeypressG, KeypressL and KeypressV are all running.

     

    If nothing is entered within 2 seconds, these 5 macros will all end and KeyPressReturned will be empty (and then

    processed by QAOpened as if it were L).

     

    If any one of C, G, L or V is entered, these 5 macros will all end within a second, and the related server will be used.

     

    I have now tried this with all 36 choices and have revised my code as a result - it all works as intended.

     

    If needed, I can tune this by changing the 1st line of Keypress to a value other than 2 (which represents 2 seconds, and therefore 8 250-millisecond repeats for each macro); I can also vary the 250 milliseconds to some other value.

     

    There's another approach that I now know will work. I could present a ME menu of choices (running it as a separate macro not waiting for it to end), and simultaneously fire off an AutoIt script that handles the keyboard at a low level and returns whatever has been entered. So once any relevant menu key has been pressed, I can kill the menu macro via its window title and process accordingly.

  12. One good thing I did find after writing is we don't have to use OR statements to combine. The downside to that is that I can only use the OR condition to combine.

    I don't follow??

     

    Switch and Case are part of the same structure. Switch starts the structure, while Case denotes the individual components.

     

    Suppose I have a variable that can contain 1 of 3 values, and I want to take a different action for each.

     

      Switch MyVar
     Case "a"
       action a
     End Case
     Case "b"
       action "b"
     End Case
     Case "c"
       action "c"
     End Case
     Default Case
       Error!
     End Case
      End Switch

  13. While Word's Mailmerge utility can indeed be used to send emails, it does have plenty of problems, not least among which is the number of emails that can be sent at a time. In my work database applications, I allow the user to choose how many emails he/she wishes to send per batch. And there's a considerable difference between the Mailmerge features of Word 2000 and Word 2003, both in appearance and method of working.

  14. What a shame that you can't run the same macro more than once at the same time, thus denying the possibility of recursion.

     

    I've just designed a set of macros to allow me to present a "menu" of choices and respond to a single-letter response without having to press ENTER after making my choice. I could have done this in 2 macros if I had been allowed to run multiple instances of the same macro. Instead I end up with 37 macros, one master and 36 macros, one for each possible single-letter response (0-9, A-Z).

     

    Still, it does work nicely and quickly. I can now present myself with a menu of, say, 8 choices, 1-8, and respond as soon as any number from 1-8 is entered, just like the 4Nt Inkey command.

×
×
  • Create New...