Jump to content
Macro Express Forums

fug5333

Members
  • Posts

    22
  • Joined

  • Last visited

Posts posted by fug5333

  1. It's by far easier for me to keep one hand on the keyboard and one hand on the mouse. The activation for simply hitting the delete key is alt+right mouse. This is just one of the 40 or so macros that are not working.

     

    Very new to Windows 7. How do I run ME3 under Administrator?

     

    I'm running ME3.8a(3.8.1.1).

     

    Thanks

  2. Hmm. Might be tough to explain. All four clicks are in the same spot, the pixel under the mouse for 1 and 2-4 are in different places. I'll explain it simply:

     

    Move Mouse x,y

    when the pixel changes, click left mouse button

    Check another location but keep mouse in same spot

    when pixel changes, click left mouse button

     

     

    Do the last 2 lines a total of 3 times. It's exactly the same. I'm trying to turn that into a macro, something automated. I'm hung up on the syntax/code of ME. I hope all that made more sense.

     

    Thanks!

  3. Having some issues. :( Trying to move the mouse to a specific spot, when the color changes, click the mouse. Then do the same thing 3 more times. This is what I have so far

     

    Mouse Move Windows 747, 682

    Delay 100 Milliseconds

    Mouse Left Button Click

    Repeat Until %N1% = 16777215

    Get Pixel: Window Coords: 747, 682 into %N1%

    If Variable %N1% = 16777215

    Mouse Left Button Click

    Delay 100 Milliseconds

     

    ----- Works as expected so far -----

     

    Repeat Until %N2% = 215

    Get Pixel: Window Coords: 783, 651 into %N2%

    If Variable %N2% = 255

    Mouse Left Button Click

    End If

    Repeat End

    End If

    Repeat End

     

     

     

    It never does the second click. It just sits there. :( I need it to actively check a certain coordinate for a pixel change, click, then do that 3 more times. "Repeat Until" seemed like that would be the way to go. Any ideas!

     

    Thanks

  4. It's quite easy but more difficult than in ME Pro where you can update a Text Box Display. If the counter is in a variable say %N2% you use that. If you want to use your own variable, set it to 1 before going into the loop and increment by 1 before the end of the repeat loop. If you want repeats to finish the loop, you will have to add some maths for that (total number of repeats - repeats finished).

     

    There are several methods depending on the speed of the loop:

     

    1. Let's say the loop takes 5 secs. You can add a Timed Floating Box for say 3 secs. Each time through it will show the value of %N2% for 3 secs, be off for about 2 secs and re-appear next time through. If the display time is longer than the repeat time, you will accumulate a pile of Text Box Displays!

     

    2. For faster loops you can still add Text Box Displays; they will slow the loop down slightly. Create a Floating Box - must have a Box Header title. Duplicate and go back to the first box. Change to Close Text Box. Every time you go through the loop, any existing box will be closed, followed by the new box opening. You can use this method for 1. too.

     

    3. If the loop is too fast to read, have an If group of commands so the Text Box Display only appears, say, every 100 repeats (and could be a Timed Floating Box). The logic for doing that will slow things down.

     

    To clear the final Text Box display for the last two methods, copy and paste the Close Text Box after the repeat loop.

    Fairly new at this. :/ I follow the logic, but can't find a way to put that into something ME understands. Could you give an example?

     

    Thanks!

  5. I have a macro running just fine and everything works. It has a repeat function in there. I'd like to add a feature. I would like it to show me how many times it's repeated, or what repeat it is on, so to speak. A little text box that shows what it is on. I have two monitors, so the placement is not critical, but don't need it to stop the macro like a standard textbox does. Is this possible?

     

    Thanks

  6. I was being a bit thick, I should have realized. You did not say whether it's a changing colour bar or whether it's a moving bar of fixed colour. Pure red is decimal BGR 255 so your red 198 is more crimson. You are using 198 for your opponent not(?) being healthy so why aren't you healing at 198? Whatever you use to decide to attack your opponent you should be using the same logic to decide to heal yourself first. If their health is 198 and that is weak, you are going to be in trouble if your health is exactly 198 - you will not heal.

     

    198 is the color for the red health bar. Depending on where I'm checking from, it's the enemies or my own health bar. The first time it's checked, it's the enemies health bar, since I do not want to start my attack sequence if I don't have an enemy targeted. The second time, the time it doesn't work, it is my health bar. If I'm low, then I need to hit a health potion. The red does not change, there is no texture and it just slowly get's smaller. When I check to see if my health is low, I put 'if pixel is not 198 at these coords, hit a health potion(-).'

     

    You should run the mouse locator along the bar and see if the colour varies (with the texture).

     

    That's the 198(red) that I'm checking. There is no texture.

     

    A single pixel measurement may not be enough. If necessary, have a Repeat loop and move the mouse a few pixels, take another Get Pixel Color reading etc. Then if none of the values are 198 you heal (IF 198 means good health). Put Text Box Displays after the pixel measurements while you are testing and display the colours picked off. They may not be what you are expecting.

     

    That's an obvious to me. Should have done that already! /kicks self

     

    If the bar changes colour then you can be more sophisticated and heal at other degrees of colour. That requires changing the decimal BGR from Pixel Get Color to Hex BGR so you can look at the Green value for shades of, say, orange eg R=FF(255) G<66(102). I'll not go into that at this stage as it's quite complicated.

     

    You did not address the lack of End Ifs. None of the colour info problems should cause the macro to fail, although you don't say what "fail" is - you die? ME locks up?

     

    My actual macro has the proper End Ifs. I had to type that manualy, otherwise a copy/paste would put it in "direct" mode and less readable.

     

    Why I say 'fail', just nothing happens. It could run the first line of the macro and just stop. The macro might do exactly what I'm "telling" it to do, just not what is expected. I don't mean to seem rude by quoting everything you said as a way to "jump back", just wanted to address each point.

     

    Thanks for the follow up!

  7. There's something missing. You have 2 If's but only 1 End If (with no And or Or). The code is executed top to bottom and then back to the top at the end of the repeat.

     

    "If Variable %N2% <> 198" should this be <198? Why heal if you are high? You should explain what you are trying achieve with the problem step - game description is not much help. Text type "-" could be "End Game" for all I know.

     

    I have to say, I don't see any point in playing a game automatically. Why not get a cheat code and finish all levels by the end of the day? THAT'S cheating.

     

     

    I knew there would be some explaining. :D '198' is the color(decimal). It's a red health bar. The thought is, when the color is anything other than 198, then hit a health potion. It's hard to see, but I'm pretty sure there's some sort of texture "behind" the health bar. Text type '-' is the keyboard command for hitting a potion.

     

    The idea behind making a macro for this game is that there is nothing out there.. nothing! :/ Leveling is very slow.

     

    Thanks.

  8. This is for a game. I have a standard and simple attack sequence, but I leave it running overnight and sometimes I die. I thought it would be great to add a way to hit a healing potion if I'm low. Here it is:

    Repeat Start (Repeat 1000 times)
    // Target Enemy
    Text Type: <TAB>
    Get Pixel Window Coords: 624,33 into %N1%(Their health bar)
    If Variable %N1% = 198
     // Attack - Range
     Text Type: 3
     Delay 1.3 Seconds
     Text Type: 2
     Delay 1.3 Seconds
     Text Type: 1
     Delay: 8 Seconds
    

    Macro fails when I put this next:

     //If HP Low, Heal
     Get Pixel: Window Coords: 150,15 into %N2%(my own health)
     If Variable %N2% <> 198
     Text Type: -
    

     

     //Attack - Melee
     Text Type: <F3>
     Delay 1.3 Seconds
     Text Type: <F2>
     Delay 1.3 Seconds
     Text Type: <F1>
     Delay 1.0 Seconds
    End If
    Repeat End
    

     

    Most of this is just basic. Hit TAB to select the mob, run through an attack sequence. I thought it would be neat if it could heal itself too. I thought the macro should just do what I usually do when I'm sitting there. I don't know if the middle 'IF' statement gets handled first or last or where it is, but it's messing things up. The macro will hit TAB and then just sit there.

     

    I'm fairly new at this, so the complex stuff might need to be explained a bit. :) Any help would be great!

  9. You still haven't included the missing mouse position increment commands I pointed out!

     

    --

    Terry, East Grinstead, UK

     

     

    Wow, calm down. I'm completely new at this. I tried one thing that didn't really do me any favors. Couldn't find anything that was %N1%(x) + 1.

     

    Thanks

  10. I'm not clear why your Mouse Move commands aren't consistently relative to either window or screen? Unless you're 100% sure they are identical (and remain so under all conditions) then why not use one or the other?

     

    Where are the moves to (x+1,y) and (x,y+1) that you describe?

     

    There are no window activation commands so I assume there are no possible changes in window focus?

     

    It woud be better to post the code also, so that others could try it (even though it would obviously need adaptation).

     

    --

    Terry, East Grinstead, UK

     

     

    Window/Screen should be the same, but just for debugging, I can change to all be the same.

     

    <MMW2:366,267><MOUSEPOS:F:01:02><REP3:01:000001:000001:00759:0:01:><MMP2:1N,2N><TBOX4:T:1:CenterCenter000278000200:000:color%N4%
    %N5%
    %N3%><GETPXM:3><MOUSEPOS:F:04:05><IFVAR2:2:03:1:43775><LCLK><MSD:250><MMP2:0,60><LCLK><DIS:<MMS2:4N,5N><ELSE><MMW2:1N,2N><ENDIF><ENDREP>

  11. I want to make a macro that will start at a set x,y coord, check that pixel color, if "X", then do "this", if not, move to the next pixel (x+1,y), and start over. When it gets to the end go back to the start and do (x,y+1) to move to the next row. Here's what I've got so far:

     

    Mouse Move Window 366, 267 //Move the mouse to the start point

    Get Mouse Position Window: %N1%, %N2% //Put the mouse coords into variables

    Repeat Start (Repeat 759 times) //The pixels of one row

    Get Pixel: Under Mouse into %N3%

    Get Mouse Position Screen: %N4%, %N5%

    If Variable %N3% = 43775 //The color I want

    Mouse Left Button Click

    Delay 250 Milliseconds

    Mouse Move Position 0, 60

    Mouse Left Button Click

    Mouse Move Screen %N4%, %N5%

    Else

    Mouse Move Screen%N1%, %N2%

    End If

    Repeat End

     

    Whew. The mouse (quickly) moves to the start position, then to the right one pixel, then to the left one pixel and stops. Any help would be great!

  12. Okay. Here's what I have, whew..

     

    Variable Set Integer %N1% to 5149272 (4E9258)

    Variable Set Integer %N2% to 206352 (3C2610)

    Get Pixel: Window Coords: 700,425 into %N3%

    If Variable %N1% = variable %N3%

    <macro stuff>

    Else

    <macro stuff>

    End If

     

    It seems to run the 'else' part every time regaurdless. :/

     

    Whew, thanks!

  13. Here's the issue I'm running into.

     

     

    Variable Set String %T1% "4E9258"(The color green I'm looking for)

    Variable Set String %T2% "3C2610"(The color I don't care about)

    Get Pixel: Screen Coords: 700,425 into %N1%

    If Variable %N1% = 0

    <macro that I made>

    End if

    if Variable %N1% = 1

    <macro I made>

    End if

     

     

    I'm setting the variables into %T1% and %T2% because I *have to*. I'd like to say something like:

     

    If (variable) = 4E9258, then run this code

    If not, then run this code

     

    Am I making sense? I'm a little new to ME so spelling stuff out shouldn't hurt. :)

     

    Thanks!

  14. VERY close!

     

    I'm hung up at actualy defining the hex value for the color. The site may change, it has one of three posibilities. If it's *green* then <run this macro>, if any other color <run this one>. I can't seem to put the color into a variable and then say something like "if color under mouse is "this" then <do this>" :/

     

    Thanks

×
×
  • Create New...