Jump to content
Macro Express Forums

Yehnfikm8Gq

Members
  • Posts

    397
  • Joined

  • Last visited

Everything posted by Yehnfikm8Gq

  1. Although several steps don't seem to have been needed, it is important when copying variables to note which variable is copied to which (stated in the dialog). That applies to both versions of ME. You also need to understand the differences between Save and Append (you may know that already). (edit) Something else that may be of use to you later is that there are special variables for common paths. They are listed in Variables Set from Misc. If you want to add a file or address something to the Desktop you can use this as the path: Variable Set From Misc: "Path to Desktop" into %T[1]% Variable Modify String %T[1]%: Append Text (myfile.txt) T1 is now the full filepath to myfile.txt on the Desktop but the beauty of it is that it can be used on other PCs/users. "Path to Desktop" means the Desktop of the current user. In your case it's Pat. It would work on Fred's PC too. The "My Documents" path can be used the same way.
  2. It would be nice if you explained what it's supposed to do rather than having to be worked out. It's particularly difficult when the code does not work. My read is that you are trying to find all files on your E drive that were created today and make a list. The date stuff looks OK. If you look at your line Variable Modify String %FilesinE%: Copy Whole Text (%FilesInECopy%) First of all I can't find where %FilesInECopy% is defined Second, %FilesinE% is your filepath, why are you replacing it with %FilesInECopy% and then appending the same variable? At the start I would save %T[99]% (my unset, designated null) or any blank value to C:\Documents and Settings\Pat\Desktop\New Files Added to F.txt to clear it (if it already exists). I would ditch lines 12 to 14 and make 15: Variable Modify String: Append %FilesinE% to text file, "C:\Documents and Settings\Pat\Desktop\New Files Added to F.txt" This includes a CRLF. %FilesinE% is a text string of the full filepath of the current file that fits "today's" parameters. If that is not what you want some explanation please.
  3. Something which Cory may have been alluding to in a recent post is that you can no longer post code per the ME3 forum. In ME3, all the Variables are defined. In MEPro, new variables are not defined. If someone copies your code, they have to mess around registering the variables before the macro can be run. The code can still be posted so that any obvious errors can be pointed out. Otherwise it would be a good idea to include an mex or mxe as attachment so that the code can be loaded and run with the variables already registered. Does that sound a good idea? May have been raised previously for all I know.
  4. You were running out of letters but as you note there are a few left at the end. It doesn't help having the last few with similar text but that is no excuse. As a test, have you tried changing the macro names like adding X or Y somewhere in the last two? I seem to remember these may be used by others so you may not want to go that route. Looks like a bug to me.
  5. Although I may jab and jest at some of the bugs, this is one that I rate as unforgivable. I have no idea how these programs could have gone through beta testing without anyone noticing, particularly since it used to be fine in ME3. Within minutes of loading MEPro for the first time, I was swearing liberally every time I wanted to change Macro File.
  6. Welcome to the club. This first manifested with MEPro (why couldn't the code for ME3 have been used?). ME3 used to truncate the path so that the full mex filename was visible. The latest ME3 has gone the way of MEPro so you get to see a few letters of the filename. I've put in a bug report for MEPro. You and everyone else could ditto for ME3.
  7. If you have 3 macros starting with "G", then the hotkey should move along the words as you know. I tried with five macros starting "Windows". No problem, w, i, n, d, o. If you don't want to post the perps for our perusal, make sure that unique letters are really available. If no one else has a solution, report it as a bug.
  8. I assumed you were checking the target's health to make sure the enemy was weak enough. I can't see the point of checking the colour of your health bar. You know it's going to be 198 red. You are not checking for size. If 198 is not found then your health bar does not exist at that location, right? (edit) Is this health bar like a progress bar - the left end is fixed and the right end moves (ie shorter rather than smaller)? You really should put in the Text Display Boxes as I suggested - they stop the macro so that you can read what is going on. You can use Breakpoints too but with multiple TDBs it's easy to keep going round the repeat loop. I wonder if the problem is that you seem to have everything in one loop. Have you thought about having a loop to deal with the target; once dealt with that, you have a loop for your health; once dealt with that you have the melee? I'm not clear on the manually typing End Ifs. To post the code you select the code in the Script Editor and then Edit/Copy Command Text.
  9. I got a bit sidetracked by the Unicode thing. If your second Ctr+A is supposed to be operated on of what is left after Step 3, I got no difference, Clipboard Empty, no value to T1. That was what I had found anyway by pasting to the ANSI text file. What is this line supposed to do - surely to display the true value of T1 in the final Text Display Box this should be omitted? Variable Set String %T[1]% to "" // Set T1 to empty. If the Empty condition is found, this sets T1 to "", the same as "nothing" so the display is meaningless. Omitting the line made no difference. I think the only reason the cursor stops blinking is that once you have selected text (even if nothing selected), the editor is not ready to accept typing. The reason Cory complained was that the last Text Box Display was missing code. One assumes it was supposed to display T1.
  10. 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. You should run the mouse locator along the bar and see if the colour varies (with the 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. 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?
  11. I tried using Ctrl+A on a blank document in Metapad. The cursor stopped blinking per terrypin test. I copied to a blank ANSI text file and viewed in a Hex Editor, nothing. Copying and saving as a Unicode text file agreed with what I had found earlier. Unicode text files apparently start with FF FE even when empty. I copied a blank Unicode text file into T1 and displayed it in Text Box Display (y with diaeresis and small thorn) and then ran my macro that converts characters to ASCII value. Sure enough 255 and 254. So a blank Unicode file will not appear as blank to ME it would seem. The concept of nulls in ME is IMO moot. It could be an interesting discussion(!) and of interest to someone programming in other apps. Most of us ignore nullness and take unset variables for what they are. Unset integers behave as 0, unset strings behave as "". I use that to my advantage. T99 is my designated null (I call it that) that I never set. If I want to clear a Text File I save T99 to it. If I want an infinite loop I "Repeat Until T99 = Never". In a previous thread on arrays, one area that I highlighted was the fact that it is difficult to tell which members of an array have been set and which are either blank or 0. Arrays are a particular problem because they are often manipulated with Repeat loops or Split String commands. That makes tracking of a particular member difficult. The condition that is of real interest is "Set" or "Not Set". The same applies to standard variables but they are easier to track. Generally speaking, every variable used is set. The only exception that comes immediately to mind is if you use "designated nulls" like I do. Returning to arrays, I put in a request to ISS to have a flag to show a member has been Set. We can handle these things within ME by various means such as keeping track of array members that have been set. Far more difficult than having a 1 bit flag (though that may be difficult too if you have no spare bits). You can pre-seed an array with an identifiable value. Text arrays for example you could seed with "notset". Integer arrays are more tricky. In some recent work I set useless values to -1, something that would never happen with the true data. To ensure we are using good data, external inputs have to be validated. That can be done in several ways: 1. Have forms that force the user to fill in every field - the form cannot be submitted otherwise 2. Pre-seed input values to say "notset" or "-1" or "1E40" so that invalid entries can be handled. 3. From other applications, handle on an individual basis depending on how they handle "nothing entered", or dare I say "null". The methods I've described for ME can be applied elsewhere. Some applications may have neat ways of telling you. If there is no workable method, then you simply cannot tell what is valid data.
  12. 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.
  13. "Well, since the character is called NUL, why not use that name instead of the confusing Null?" Because if you look at the character listings, NUL is the three-letter character; Null is what it is called (like LF = line feed).
  14. Never a null moment in this forum. The Null I'm referring to is the ASCII character NUL code 0, called Null! It's not Nil, Null, Empty or Blank; just the Null from the wrong side of the tracks!
  15. I don't understand the second Ctrl+A either. It makes no difference in Notepad. Is your result due to the text editor you are using? The Clipboard will not copy nothing. If you try that, the content of the Clipboard remains unchanged. (edit) When ME copies "" to the Clipboard it registers as 00 at Offset 0 which is ASCII Null. It is not in an empty Clipboard state. Presumably on import, ME would see the Null but set the string to "". I would think that the first 32 ASCII characters with the exception of CR, LF and Tab would be ignored by ME as being invalid in an ANSI text string.
  16. I forget! It looks like it's finding any colour other than black at those pixel coordinates (0 is black) - waiting for a dialog box to appear that does not have a window name you can use, or an existing one to disappear.
  17. When this came up before I vaguely remember you cannot press the Enable button with ME. You would have to try it. I have to agree that the security issues are the main focus. What is the point of having moderate security? If you can circumvent it, then your security is completely useless.
  18. Strictly speaking the shortcuts I used are part of the Extended ASCII character set. I always use those shortcuts because I have a Post-It bookmark in my DOS manual - way quicker than finding my list of ANSI shortcuts. Sometimes the printed page is mightier than the mouse; no scrolling and absolutely no typing required! The ones you used are the Windows Character Set which is the ANSI preceded by 0, or something like that.
  19. AutoIt scripts that I've posted in the forum have used: ME External Script command to run "internally" and pass the results as a text string via the Console (or per below) Ini file Text file Non-posted macros I've done it via registry. Standalone AutoIt exe files run by ME I've interfaced via ini, text, registry. I've skipped Clipboard because it's too high traffic and you could get the wrong info. To give you a rough idea of the differences. Using the ME Get Control Tool I could get the Group Box of a group of 4 pieces of data from an application. With AuInfoTool I could get the individual pieces of data I was interested in. I used AutoIt to export the data to ME for processing and display. I have not used on webpages, which may be very different. The advantage of an exe file is that it is continually running and very fast. With the ME External Script command the script runs every time ME passes through the repeat loop containing the command (if that is the setup) and is therefore intermittent and slow - fine for many uses. If the script does everything itself with one access only and passes all data at the end, then it is equally fast. Adding my non-expert opinion to Paul's, the handle of a window never changes until it's removed. Isn't that what the Capture Control is relying on? (edit) Here's an example that I remembered reading a few weeks back, this is from an example in the AutoIt UDF Help: ; Get the handle of a notepad window that contains "this one" $handle = WinGetHandle("classname=Notepad", "this one") There are numerous window functions. Once you have the handle, you never lose the window no matter what it does. I repeat that I have not tried on webpages. Judging by the number of people in the AutoIt forum writing game cheats I would surmise that it's not bad. You should look into AutoIt or AHK even if it's for personal work. Now that ME can handle VBS, JS, HTA and AutoIt scripts with the External Script command the usefulness of ME has been greatly extended.
  20. I realize you were using keypad. I mentioned about the ANSI characters needing numbers from the keypad rather than the keyboard because they are a very fundamental shortcut of Windows. DOS in fact. The degree symbol is actually Alt+keypad 248 I got the same behaviour as you did. I extended to other characters: Alt+keypad248 character started: Alt+keypad0, Alt+keypad1, Alt+keypad6, Alt+keypad7 macros Alt+keypad241 character started: Alt+keypad0, Alt+keypad1 macros Alt+keypad156 character started: Alt+keypad0, Alt+keypad1, Alt+keypad6 macros Alt+keypad168 character started: Alt+keypad0, Alt+keypad1 macros Alt+keypad128 character started: Alt+keypad0, Alt+keypad1 macros Alt+keypad122(z) character started: Nothing Many of the in-betweens were Unicode.
  21. I don't have time right now to run your test. Will try later. For typing out any ANSI characters, don't you have to use the keypad numerals (rather than keyboard) with Alt? Quick lookup: my MSDOS manual says exactly that.
  22. I can see how Item 2 could be a problem. On top of that, the extra capabilities in digging deeper could be an issue. AutoIt scripts can be configured so that you don't even see the icon when it runs. Providing the error handling is good, the user would never know that AutoIt was running in the background while running ME as the interface (other than via Task Manager).
  23. It looks like you are going to have to get out your virtual sextant and star charts for FSX! I tried your hotkeys and Text Type command with no effect. No surprise. It may require typing over your apps to get the conflict.
  24. I don't agree that just because the problem disappears when ME is shut down that it must be the root cause. There could be an underlying problem with something else and ME is exacerbating the situation. The straw and the camel? If high ME activity is seen in continual file ops and registry accesses that may lend credence to ME being the problem. If not, there may be another app that is showing excessive activity. Software conflicts are difficult to resolve. As an example, at times my Start menus have been really slow. It felt like the GUI was screwed or that there was some conflict going on. The hdds would chug away and the menus stayed blank for ages. I got suspicious of AVG's resident shield and turned it off. Lo and behold, problem solved. It seemed like it was checking every .lnk every time the menu was opened. I probably have 300 lnks in groups in the Start menu.
  25. I can't help with your problem but I would have thought this is better dealt with using a program like AHK or AutoIt which can dig deeper and get the actual window handles etc. After a couple of hours playing with AutoIt I was getting information that ME simply can't get. Those apps are not particularly user-friendly but get the job done. I've written a number of macros using AutoIt to get/translate the info and ME to manipulate. I'm not sure how the hybrid would work with live, changing windows.
×
×
  • Create New...