|
Post by cyberchipz on Apr 27, 2022 20:33:34 GMT
When did that happen; I saw a guy using a User Variable %click_pos% as the variable for I presume a left click. Last I knew we had to use %INTEGER1% or one of the standard variables in the short commands like left / right click and mousemovement. I mean, yeah... I could try it myself; but, before I do; I wanted to know when this was fixed? I'm still assigning the user defined variables to %INTEGER1% and %INTEGER2% inside the command. 76 | RUN ACTION | DEFINE INTEGER VARIABLE | %INTEGER1%::775 77 | RUN ACTION | DEFINE INTEGER VARIABLE | %INTEGER2%::763 80 | %INTEGER1% | %INTEGER2% | 57 | Left Click or did someone just use their own variable for simplicity and it won't work? 92 | RUN ACTION | DEFINE INTEGER VARIABLE | %MyIntX%::775 93 | RUN ACTION | DEFINE INTEGER VARIABLE | %MyIntY%::763 94 | %MyIntX% | %MyIntY% | 57 | Left Click Senior Member wants to know! ;-)
|
|
|
Post by Steve on Apr 28, 2022 20:10:16 GMT
Hi cyberchipzI think with named variables back in feb 2021, maybe version 8.1. However a couple of years before that I made sure that variables worked for each component. I think this works as well but it's not very practical: 1 | <var> | <var> | <var> <var> | <var> | <var> | <var> <var> <var> | <var> Every actions/command/place can be a variable. But like I said, its not very practical.
|
|
|
Post by cyberchipz on Apr 30, 2022 17:24:41 GMT
I see. I noticed I could use %vars% for Pixel Capture for the X, Y values; I use IMAGE capture to save the X/Y Variables create the "(X:%VARX% Y:%VARY%)" for location of the pixel and then use pixel capture and find for a fast find command for that object in a single session. As I mentioned once before; the game designers; as are many games constantly revising and updating practically everything. With the PICTURE, as long as I keep up on the PICTURE capture and get the location, they can move things around; whatever they want; if the IMAGE capture fails for me; I trap the error; grab the new image; name it the same as the previous one; and the code doesn't break. That's fantastic. So, with that, I wanted to bring up the mention I made for image capture. Have you considered making the full screen Image search a variable screen size image search. Since the full screen quick Image capture is really fast but the width and height image capture is too strict. Making the width and height one search treat that in code like a small screen size @ location X/Y with Height Width, and search that area like it does the full screen for that smaller area is exactly what I need to make non-breaking code. I mentioned that the screen capture only works well, if there isn't another identical item on the screen. For example Two American Flags. If I need the X/Y location of the 2nd, or 3rd etc flag; the height and width image search only works if I know exactly where it is and that's not really feasable. I tried this; but since I was off a pixel on the image... (Yeah, I could do this for a single position IFF the flag I needed was present). So, I avoid mixed enemy/friendlies territory. I think you grasp the concept from what you said in the first post I made; I'm just wondering how quickly you might make this change? ;-) Right now, my workaround I'm going to try is to find the object on the screen; paint over that image enough the search fails, and hopefully it will find the 2nd image. I hope. lol Or, fail if there's only one flag. Or, if you might mod the code (and as I said, if it's done right; the old function of that code for the image based off of width and height "should" still work. :-) You just have to make it look for where the image starts; like the screen search function; and I presume that code is already written for the full screen search, just need to mod the X Y variables for the screen size. Right? One advantage of being an old man who has coded since he was 16 is that at least I understand the process. lol Again, I would be happy to Beta test. In my favorite game (only game) I play... they just did a major overhaul of the game layout. None of my click points work. I've already captured all the images I need to capture reference points for the click locations... I just need to capture one of three possible identical flags on the screen... to ensure I don't attack friendlies. lol If I could beta test that mod to the width height screen "area" image capture... heh.. I could just fix it rather than do a whole rewrite later. (hint ;-) But, perhaps I can scribble out each flag as I find it after I check to see where it's located.. and look for other flags.. that might work. I'm nothing if not innovative. and, thanks... I'll make it work, one way or another. Perhaps if I find a allied flag; I can just reset the battle to a new location... and go from there... but, it can be tough when I get into enemy territory where the front line is... lots of friendlies there; and I could end up in an endless loop.. if I can't tell the enemy from the friendlies. No worries, I'll figure it out! :-) Friendly fire is frowned on. lol
|
|
|
Post by cyberchipz on Apr 30, 2022 18:01:09 GMT
1 | <var> | <var> | <var> <var> | <var> | <var> | <var> <var> <var> | <var> Every actions/command/place can be a variable. But like I said, its not very practical. Yes, not practical; but could be used to auto create code on the fly. IFF, you allowed for special characters like "|", "::" "%" and others, etc. I wanted to remind you of a suggestion I made a while back. If you could expand the options for special characters, like you do with '/n' which acts as a new line. (I believe that works because it's standardized code for printing lines.) But, if you could make a special character set with a shift character that tells your code to just store the the symbol in a string variable but ignore it otherwise; I could use the macro to create macro code inside a string. In my mind I think I would still need to copy and paste the file created that way into a macro; or alternately if I created a small subroutine, load and run it via the macro. In the world of macros, a macro that makes macros is the kind of thing I wished I could do. I recall an old Military programming language called Mumps could do this. It offered, variable variable names and executing code in a string. But, I can tell you as a coder; I've forgotten more than I know. ;-) Right now I'm limited to Application VBA and MMM. :-) I would suggest a shift character but I don't know which symbols you've already reserved to tranlating your code. Perhaps "~" or something... so ~| would imbed a | into the string without running the code at the time of creation of the code. Chip
|
|