Jump to content
Macro Express Forums

stevecasper

Members
  • Posts

    570
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by stevecasper

  1. Why the 2nd macro isn't running:

     

    My first guess is that you're trying to run a macro that doesn't exist.

     

    The name of the macro you said you're trying to run is Run away and heal

     

    Your posted code is: Macro Run: Heal

     

    You'll need to change the Macro Run command to Macro Run: Run away and heal

     

    Maybe I've misunderstood something, or maybe you have them named correctly in your actual macros, but what you've given us in this thread makes it look like this is the problem.

    __________________

     

    Once you get the second script to run, you may want to move the 5 second delays up one line each. That way you'll have:

     

    Mouse button down

    Delay 5 seconds

    Mouse button up

     

    This is, of course, assuming that the "mouse button down" command is what is causing you to run away. I don't know the game you're trying to automate, or its dynamics, so it is possible that clicking in one spot will cause your character to run to that spot, in which case your code is fine (though a "Mouse Left Click" command would be simpler in that case).

     

    But if the dynamic is that your character will only run as long as the button is held down (a very good reason to use the Mouse button down / Mouse button up combination), then you'll want to make the change shown above.

  2. Wow, no kidding. That's freaking awesome!

    It sort of blows my mind just trying to imagine how the different bits of code might work...

    I guess there must be a section of code for painting each shape. Must be a starting point at location [x,y] that advances to [x,(y+1)] and loops and "watches" for left/right arrow keys, changing [x+/-1] accordingly ... But didn't we determine that it's not possible to use individual key-presses in logic functions?????

    If you watch closely, it looks like the mouse pointer is following the blocks as they move down. The logic may be tied to Mouse Position. If the player moves the mouse left or right, the block moves accordingly. I could be wrong, of course, I'd kind of like to see the code, but I'm afraid to ask him :)

  3. Anyone know how to make a macro abort if mouse moves X amount of pixels? What do I need? Thanks.

    Well... my first thought was "It can't be done." Since there are no options for aborting if mouse moves.

     

    However, if you're not looking for a specific built-in abort, you could build a somewhat complex macro that occasionally checks the mouse position. Something like this.

     

    At the beginning of the macro perform a Get Mouse Location command. Store this info in, say, %N98% and %N99%.

     

    Then, periodically, perform another Get Mouse Location command, storing the information in %N96% and %N97%.

     

    Now compare N98 to N96. I'd use something like:

     

    If N98 > N96

    __Modify Integer N98 - N96 = N94

    Else

    __Modify Integer N96 - N98 = N94

    End If

     

    Do the same for N99 and N97 (saving the result to N95)

     

    Now do this (assuming 10 pixels is the threshold for the abort):

     

    If N94 > 10

    __Or

    If N95 > 10

    __Macro Stop

    End If

  4. So far `` works slick. I'm not a touch typist and it's easy to find without looking or key combos.

    Something I just thought of:

     

    The pinky is a weak finger. Mine tends to lock up on me from time to time (nothing dramatic, I just have to stop typing and straighten all my fingers and then ball into a fist).

     

    I'm not certain how common a problem that is for people, or if it would even matter, really. But the ` is just far enough away that as I stretch for it, I hit it fine, but when retracting my finger afterwards, I feel the "locking" trying to take me.

     

    Just something to consider.

  5. Stan recently suggested the use of suffix keys to Terry for SK activation and it got me to thinking which was better. Prefix keys are the default in MEP so that would suggest that ISS believes they are superior. But it seems like suffix keys would be much more flexible and useful. But I want to consider this carefully as this is not something would want to change down the road after users have gotten used to one or the other. Also the keys selected for prefix can be real words like "client" which would not be a good choice for a suffix so one would have to redefine them.

     

    At the moment I'm leaning toward suffix. The first big macro I've completed is a client ID search macro. Users often have to tag things with a CID so I wrote a macro that searches by a user string and returns the value. At the moment it seems really clever if they type "cid:?" and activate the macro which would return something like "CID:1328". This seems more intuitive than "##cid".

     

    So what do you all think? Are there pitfalls I haven't seen here? How do yo all do things?

    Well, I don't know that ISS thinks prefixes are superior. I don't believe suffix keys were an option in previous ME versions, so they just left the default in MEP as what ME users were used to.

     

    I personally have 0 experience with suffix keys, but - being a creature of habit - have continued to create only prefix-activated short-keys.

     

    That being said, as in your other post, your clients have no short-key habits to break, so if you think suffix activations are better, then I would think it best to go that direction. But again, I have no experience with them, so can't enlighten you on the potential drawbacks.

  6. I'm just starting to create some ShortKey activated macros and was wondering what other did and what they think of my idea. The most important thing I believe is having something that is not likely to trip an unintended activation hence the use of obscure keys. Next would be usability. The users in question have never used SKs so there will be no habits to break so that is not a concern. As I was developing this macro I found the default ## to be cumbersome as it required a shift and a look at the keyboard. I have switched my preference to the ' which is key left of the "1". To my knowledge no one ever uses this key and it is better than because it doesn't require a shift or a look being it's in the upper leftmost position. Can anyone find fault with this or does anyone with more experience offer their thoughts?

    For the past 9 years, I've used a double period (..) to activate my short-keys in Keyboard Express first, and later in Macro Express. ## is WAY too cumbersome, like you said. But . is pretty easy to reach, as anybody who spends time at a keyboard tends to use that key at least once per sentence, but is not likely to hit it twice in a row without meaning to.

  7. Are you saying that the Do Not Remove Keystrokes Typed option doesn't solve this?

     

    --

    Terry, East Grinstead, UK

    Well... sort of...

     

    You see, sometimes my short-keys are used in text-type situations (like the macro I use to insert the italics tags in this post).

    That's what I was going to say, but then I double-checked the activation and realized it does not have to be a universal setting.

     

    Thanks Terry, you just made my life a little simpler!

  8. I'd appreciate feedback from other users before submitting the following feature request please.

     

    I activate macros frequently with shortkeys. At present there's a serious limitation on their usefulness.

     

    For example, if I have assigned 'me' as an easy-to-type shortcut, then I cannot assign any others such as 'meb', 'mep', 'meet', etc. Thousands of possible shortkeys are excluded because I've already assigned that 2-letter shortkey 'me'. I think this could easily be fixed if ME Pro simply waited for a short period until all keystrokes had been entered before scanning its table of shortkeys. At a guess I'd think up to 500 ms for each character to be entered would be reasonable. I should be able to type two characters per second, even if I was feeling hungover and suffering from severe RSI. And if I didn't, it would fail, either running the wrong macro or none at all, just as it does at present, and I'd try again. For even greater flexibility, the 'character delay' could be a settings option, so that users could customise it.

     

    --

    Terry, East Grinstead, UK

    As long as the delay were optional, I don't see how it could be a bad thing to have this added functionality.

     

    On a related note, when activating a shortkey with a browser on top, the multi-backspace that clears out the shortkey command itself causes the browser to back out the same number of pages as characters being deleted. Is there any way to have Macro Express delete the command without backing out of the web-page you're on? (Note: this doesn't necessarily happen when entering the text into a box, but I often desire to launch a macro and don't want to have to worry about which window currently has focus).

  9. Hey, it's always good to post these things in any case and I read every post here even if I do skim some.

     

    I think your summary looks accurate and complete. I was thinking about this and I do not believe there is a way to do what you envision but that doesn't mean it can't be done. The essential problem is that you ant a variable start time and the scheduling doesn't support variables. So I think your solution is to simply have the first command of your nag macro to be a 30 delay. Since one can run multiple macros now it seems the most efficient solution even though I can think of others.

    Hi Cory,

     

    Thank you for your response.

     

    A 30 minute delay would be fine, if I never needed to abort any of the other macros I may be running during my lunch - but I abort often (especially during lunch when I'm usually testing macros I'm building or tweaking).

     

    A similarly delayed macro for the other instances when I'm interested in having a reminder pop-up, would be as effective, and suffer from the same shortfalls.

     

    Ultimately, I'm hoping Insight takes my feature request to heart and adds an option to the elapsed time launcher, so that the elapsed time can be based on the time the macro becomes enabled (as it was in ME3).

     

    Until then, I am relying on the complex running of ME3 macros by MEP to accomplish this feat.

  10. How is your macro built?

     

    Do you have 33 separate Text Type: <TAB> commands, 1 Text Type command with 33 <TAB>s in it, or do you use a Repeat x33 loop?

     

    I can't begin to answer why Text Type commands are unreliable, as I, too, have a LOT of problems with them. With this particular situation, I've had the most success building loops that look like this:

     

    Repeat Start (repeat 33 times)

    __Text Type: <TAB>

    __Wait for text playback

    Repeat End

     

    As usual, I don't fiddle with keystroke speed.

     

    Occasionally I insert a Delay rather than a Wait for playback... it really depends on my mood, or something. How's that for vague.

  11. I know this issue is not interesting anymore to anybody besides me. And yet, here I go with another post.

     

    Upon continued experimentation, I have determined the following:

    • Macro Express Pro bases the scheduled timer (for the elapsed time function) on the previous run-time.
    • If the macro has never been run, it runs based on the "start calculation" time.
    • If the macro is disabled, and then becomes enabled, the next run is based on the previous run time.
    • If the difference between the previous run time and the time that the macro becomes enabled is greater than the set elapsed time, the macro will run within several seconds.
    • If the difference between the last run time and the time the macro becomes enabled is less than the set elapsed time, the macro will finish the count-down and run when the elapsed time has... um... elapsed.

    So the trick is going to be how to rig the macro to set the "last run" time to match the time at which the macro becomes enabled. And to do it invisibly, and successfully.

  12. Ok, scratch this entire topic. I've been running test after test on this, and apparently the schedule is not based on the time the calculations start from (thank heavens). In fact, based on my tests, the schedule does appear to be running based on the time the macro is enabled... just like I want it to be.

     

    So now I have to figure out why it isn't working 100%

     

    Of course, it just made me a liar by running based on the last time it was run (not on the time it was enabled). Example: It ran at 10:32:01 (the test is set to run after 3 minutes); I disabled it for a couple of minutes, re-enabling it at 10:34. By rights, it should not have run again until 10:37, but it ran at 10:35:11... 3 minutes and 10 seconds after the last time it ran (the unexplained 10 seconds doesn't bother me nearly as much as the time it ran).

     

    So now I have to figure out just exactly what it is basing its run-time on.

     

    EDIT

    Ok, another test shows the problem a little better, I think.

     

    The test macro ran at 10:46:51. I disabled it immediately. By the 3 minutes calculation, the next run would be at 10:49:51, and then at 10:52:51.

     

    I intentionally left the macro disabled until 10:51 (unknown seconds), at which point I re-enabled it - hoping that the macro would run at 10:54, but expecting it to run at 10:52:51 (based on previous observations noted above).

     

    It ran at 10:51:41. Just afew seconds after I enabled it.

     

    So it neither based its calculations on the previous run time (10:46:51), nor on the time it was enabled (10:51).

     

    I'm officially at a loss to understand how this feature works in MEP.

  13. Does to me. Sounds like the method I used a few weeks ago to regularly visit a web site. Its URL was chosen in a simple macro #1 called Setup regular display of URL and stored in a registry key (I was experimenting with that while this alternative to Saving/Restore variables was being discussed here). Then a more complex macro #2 called Scheduled check of URL (Registry) was run with scheduled activation (initially 30 mins I recall). It displayed a multiple-choice menu asking the user what to do, like

    - go straight to the page

    - wait 10 minutes

    - wait 30 mins

    etc

    - stop the regular reminders altogether.

     

    Depending on the choice it then ran a final macro #3 called Open scheduled macro in ME Pro Explorer then prepared for macro #2 to enter the appropriate fields.

     

    --

    Terry, East Grinstead, UK

    Hey Terry,

     

    Thank you for your input as well.

     

    If I'm reading your post correctly, Macro #3 runs through the process Paul suggested and actually opens ME Explorer, Searches through your folders to find the correct macro, opens that macro in ME Editor, tabs to Activations, opens the Scheduled activation, manipulates the window to activate the Range tab of the scheduled macro then tabs to the "Start calculating the next runtime at:" and modifies the information to the current time and date.

     

    Is that correct?

     

    If so, it's way too cumbersome (even if it goes very fast); if not, I'd like to know more about the process. If it all happens in the background and more or less instantaneously.

     

    Hopefully ISS isn't too bogged down by bugs these days to start looking into feature requests. This is an important one, in my opinion. Nobody should have to write a macro that has to edit an existing macro through the script editor.

     

    I imagine there are situations where you know your macro needs to start running at a specific time, and needs to run every xx minutes from that specific time. But I also imagine that more often than not, or at least in a greater variety of situations, the timer needs to start when a specific action/function/event has occurred. Hense the reason why the ME3 way of running a scheduled macro was so much more useful.

  14. Why not have the macro that enables your reminder also set the schedule activation?

    In other words, your enabling macro will also schedule the enabled macro just as if you were doing it yourself manually.

    So it will tab from field to field, and set the exact time when you want the macro to run (I think you only set it to run once, because, if I've understood you, the reminder macro is then disabled until it's re-enabled by its boss macro - at which point you reset the once schedule).

     

    Does that make sense?

    Hi Paul.

     

    I may not have explained the issue clearly, so I apologize, and thank you for your suggestion. I actually enable/disable the scheduled macro very frequently (probably 3-5 times every minute on average), and this would get overwhelmingly tedious if it wasn't happening in the background.

     

    The way I've got it set up right now, it is nearly instantaneous and only fails on a very rare occasion. It would be unbearable to have the macro re-establish the schedule timer every single time I need it to activate (once a day for the lunch reminder, but every 4-8 minutes on average for the Citrix refresh, and every 10 seconds to 5 minutes for my normal job function - I get through reviews usually within 10-30 seconds, though it can take as much as 5 minutes, at which point I need to start thinking about forwarding it on to the next person). At that point, I'd probably just consider getting an egg-timer (or use the timer function on my phone).

  15. What I've done, as a work-around (a sad, pitiful work-around, at that) is this:

     

    I run my usual macro (the one that should enable the scheduled macro. Rather than enabling any macros directly, however, I have implanted a Simulate Keystrokes Text Type command which causes a macro in ME3 to run.

     

    That macro enables a scheduled macro within ME3. Once the set time has elapsed, I have that macro perform a Text Type command which runs a macro in MEP (because I really like the Text Box features in MEP). The MEP macro performs it's own Text Type command which activates an ME3 macro whose job it is to deactivate the scheduled macro (I'm considering incorporating the Enable/Disable functions into the same macro with an "If macro enabled" type script).

     

    So, the ugly sequence looks like this:

     

    MEP Macro A > Run ME3 Macro 1

    ME3 Macro 1 > Enable ME3 Macro 2 (scheduled)

    ME3 Macro 2 > Run MEP Macro B

    MEP Macro B > Run ME3 Macro 3

    ME3 Macro 3 > Disable ME3 Macro 2 (resets schedule to 0)

     

    What it would look like if MEP's scheduled playback were like ME3's:

     

    MEP Macro A > Enable MEP Macro B

    MEP Macro B > Run self (including Disable MEP Macro B )

     

     

    Life would be so much simpler.

     

    Anybody come up with a better work-around than mine? Please somebody say yes! My Text Type commands in MEP are unreliable at best. I use this particular trick with scheduled macros for much more than just making sure I'm logged back in from lunch on time. That just happened to be the most universally useful occasion, one that many people could relate to.

     

    I have other macros that run if a particular Citrix application hasn't been used in several minutes. If the scheduled time elapses without me using that Citrix app, then the macro runs, refreshing the Citrix app, keeping me logged in, so that later on - when other macros run which need to access the C. App - they can do so without getting hung up on the forced log-in page.

     

    I also have to get through each individual piece of work within a given amount of time. If it takes longer than usual, I have to shuffle it off to somebody else for a more thorough look (I'm a lot like a sieve). I use this macro sequence to alert me when I'm getting close to my deadline to either submit or shuffle.

     

    Anyway, thank you everybody who has at least looked at this thread and thought about figuring a work-around out for me. Submitting a feature request pressently.

  16. ... then indented each of them under the new category.

    Ahhhh... I think I just figured out what you meant by that.

     

    I tested it and yeah... it works now. What a tremendously cumbersome feature, though. It's bad enough not being able to double-click commands in order to add them to the Favorites window, but not being able to select multiple items for adding, either? That's just poor design, IMHO.

     

    And then, to actually put the new items into a specific category folder, you have to repeat the process: Select item, move to arrow, click. Lather-Rinse-Repeat. Can't select multiple items. Can't just drag and drop them.

     

    I love MEP, but this feature is way under-cooked.

     

    Quick Edit

    Ok, it looks like once you've indented one item, as long as you have the indented item selected, all additional items that get moved over, will be indented, too. This is, at least, something. Still not convinced it's done, but medium rare is definitely better than rare.

  17. It is! Just click the '-' as usual.

     

    --

    Terry, East Grinstead, UK

    Ok, well that's not an option for me. I'm clearly doing something wrong.

     

    Let me go through the steps of creating a favorites list, you tell me where I flubbed up.

    1. I open the Script Editor
    2. I click on Options > Customize Favorites
    3. On the left I have "Macro Commands" on the right I have "Favorites" - In the middle I have a Folder icon and two grayed-out arrows pointing right and left (respectively).
    4. I single-click the folder icon (whose Alt-Text is "New Category") and get prompted for the name of the new cateogory.
    5. I name that category "Clipboards" and hit <Enter> or click OK. The category gets added as a folder to the Favorites window.
    6. I now systematically click on each of the clipboard items from the Commands window and then click the right arrow to add items one-at-a-time to the favorites window under the "Clipboards" folder.
    7. I repeat steps 4 through 6 as necessary.
    8. When I've created all my favorites, I click OK

     

    Now, when I go back to my script editor, I select "Favorite Commands" from the drop-down menu and this is what I see:

     

    post-2634-1244381463_thumb.jpg

  18. Never did hear back from you on this Steve? Did it solve your problem?

     

    --

    Terry, East Grinstead, UK

    Hey Terry,

     

    Sorry, this is the first chance I've had to view the image. The problem I have with the Favorites is that the category is not collapsible. I like things to be nice an hidden when I don't need them. I would also like to be able to customize the individual category folder. It might seem silly, but I am much more efficient when using icons to help me find the category I want than when I am just reading category names.

     

    (If there are weird typos in this post, forgive them. I think the batteries are dying in my wireless keyboard.)

  19. Kevin,

     

    Yes, I am aware of this macro option, but what's really sad is that Macro Express does not have a first class control detection system. I have seen other programs that can scan the entire screen(even those fields that are "hidden" behind tabs etc.) and capture that data and itemize in a notepad.

     

    Are you saying that your only solution is to do this by hand for every single text field I want to capture? You can't use capture control if the field is hidden because it does not detect it. Now what? I wanted Macro Express to do this completely for me, but now I have to blend two programs to get this done which makes it harder than ever and a real pain.

     

    No other solutions Kevin? Or anyone else for that matter?

     

    Pat

    I'm far from a Windows Control expert, but I'm not entirely convinced the problem is with Macro Express. I think controls are used less and less frequently by programmers. I have very rarely had any success with controls, simply because nothing within the application/website/database is defined as one.

     

    Again, I'm not an expert and only have the most fleeting understanding of controls as it is, so if everything I said made me look like a rank amateur, it's because I am one :)

     

    However, I would love fore everything that looks like it should[ be a control to be treated as a control by ME. Life would be so much easier.

  20. I don't understand your result. Did you just run my exact macro in Notepad? As you see from the following Script Editor code, after pasting it simply copies the entire paste to the clipboard, gets its length, and types result information on the next two lines.

     

    Are you saying that on the first line in Notepad you got x then space... 9 pairs like that, followed by two spaces, followed by another identical 9 pairs as before, followed by two spaces, followed by 15 pairs, followed by two spaces, followed by 12 pairs? That's a total of 139 characters pasted by 50 paste commands?

     

    Also, I don't follow what you mean by "blank Text Types"?

     

    BTW, note that the default settings are not "300 and 250". They are:

     

    Delay after keystrokes in the Text Type command = 0 microseconds

    Wait 250 milliseconds between failed clipboard commands

    Wait 250 milliseconds after executing the Window Activate command

     

    What about that hardware option I mentioned earlier?

     

     

    Repeat Start (Repeat 50 times)

    Text Type (Use Clipboard and Paste Text): x

    End Repeat

    Text Type (Simulate Keystrokes): <SHIFT><HOME>

    Delay: 100 milliseconds

    Text Type (Simulate Keystrokes): <CONTROL>c

    Delay: 100 milliseconds

    Variable Set String ActualTextPasted from the clipboard contents

    Variable Set Integer ActualNumberOfPastes to the length of variable %ActualTextPasted%

    Text Type (Simulate Keystrokes): <END><ENTER>

     

    Delay: 100 milliseconds

    Text Type (Simulate Keystrokes): Number of 'x's that should have been pasted = %Total%

    Number that was pasted = %ActualNumberOfPastes%

     

    Delay: 100 milliseconds

    Text Type (Simulate Keystrokes): <ENTER><ENTER>

    --

    Terry, East Grinstead, UK

    Oh geez... I've got issues. I copied what was in your code (didn't bother reading it, expecting the copy/paste to work), and what I got is this:

    Repeat Start (Repeat 50 times)
     Text Type (Simulate Keystrokes):  
     Text Type (Use Clipboard and Paste Text): x
     Text Type (Simulate Keystrokes):  
    End Repeat
    Text Type (Simulate Keystrokes):  
    Text Type (Simulate Keystrokes): <SHIFT><HOME>
    Text Type (Simulate Keystrokes):  
    Delay: 100 milliseconds
    Text Type (Simulate Keystrokes):  
    Text Type (Simulate Keystrokes): <CONTROL>c
    Text Type (Simulate Keystrokes):  
    Delay: 100 milliseconds
    Text Type (Simulate Keystrokes):  
    Variable Set String ActualTextPasted from the clipboard contents
    Text Type (Simulate Keystrokes):  
    Variable Set Integer ActualNumberOfPastes to the length of variable %ActualTextPasted%
    Text Type (Simulate Keystrokes):  
    Text Type (Simulate Keystrokes): <END><ENTER>
    
    Text Type (Simulate Keystrokes):  
    Delay: 100 milliseconds
    Text Type (Simulate Keystrokes):  
    Text Type (Simulate Keystrokes): Number of 'x's  that should have been pasted = %Total%
    Number that was pasted = %ActualNumberOfPastes%
    
    Text Type (Simulate Keystrokes):  
    Delay: 100 milliseconds
    Text Type (Simulate Keystrokes):  
    Text Type (Simulate Keystrokes): <ENTER><ENTER>

     

    Now that I've looked at your actual code I see that the extra Text Types are being added in by my copy/paste... I've got no idea what is going on here.

     

    So the extra spaces (which I had thought you added to make it easier to see where the 'x' was being missed) was actually a glitch in how the commands copied into my macro. This is becoming a joke. Not a very funny one, though.

     

    The defaults on my machine are:

     

    Delay after keystorkes in Text Type command: 300 microseconds

    Wait between failed clipboard commands and Window Activate command are both 250

     

    The "Use the hardware high-speed timer when possible" option is checked by default. If you were referring to a different hardware option, please remind me. I have not attempted to download the ProcMon program just yet (I hesitate to download anything onto my work computer).

     

    I rarely change my defaults... I may have changed the Text Type delay to 300 microseconds, but I don't recall doing so.

  21. Terry,

     

    I just tried your macro (run in notepad) and this was my result (had to use [ code ] to save the spaces:

     

    x  x  x  x  x  x  x  x  x	x  x  x  x  x  x  x  x  x	x  x  x  x  x  x  x  x  x  x  x  x  x  x  x	x  x  x  x  x  x  x  x  x  x  x  x	   
    
     Number of \'x\'s  that should have been pasted = 50
    Number that was pasted = 1

     

    Notice that more than one x was pasted, despite the results. You have an awful lot of blank Text Types (I understand them within the Repeat -

    it\'s the ones outside whose inclusion isn\'t immediately obvious to me.

     

    But I like your build that shows exactly where the missing x\'s are.

     

    My settings are at the 300 and 250 defaults. I changed the 300 to 1000 to match yours and had similar results.

×
×
  • Create New...