Jump to content
Macro Express Forums

Yehnfikm8Gq

Members
  • Posts

    397
  • Joined

  • Last visited

Everything posted by Yehnfikm8Gq

  1. (Edit) In the rush to test I forgot I was working with MEPro. I've revised all the code and mex file to ME3 in case someone checks it out in the future. You can't run just that snippet of code. You have to have the Repeat Start. There are two ways you can test. If you have put that single line into your existing program as I told you, all you have to do is disable all the mouse commands (select commands and press the Enable/Disable button) and set the DAILY Schedule, N75 and N76 as I showed in my last post. Regurgitating last post, If it's 2pm, set the Daily start to 2.05pm and N75 and 76 to say 14 (2pm) and 8 so it will stop at 2.08pm (remember to save changes). Your code should look like this: Repeat Start (Repeat 99999 times) Macro Playback Speed: 1.00 times faster than normal <<<<<about a billion mouse commands here>>>>>> Variable Set Integer %N75%: Set to the Current Hour Variable Set Integer %N76%: Set to the Current Minute If Variable %N75% Equals "3" And If Variable %N76% Is Greater Than or Equal To "55" Macro Stop End If Delay: 15 seconds End Repeat Try your code first. I'm trying not to confuse the issue. If you are unable to do that try the attached file that I used for testing. Download the mex file. Then File/Import Macro. Regurgitating last post, If it's 2pm, set the Daily start to 2.05pm and N75 and 76 to say 14 (2pm) and 8 so it will stop at 2.08pm (remember to save changes). Repeat Start (Repeat 100 times) Sound Wave File: ding.wav // Your game commands go in here Variable Set Integer %N75% from Current Hour Variable Set Integer %N76% from Current Hour If Variable %N75% = 8 AND If Variable %N76% >= 25 Macro Stop End If Delay 15 Seconds Repeat End For your proper macro, you would set the DAILY schedule to 5.30am, N75 to 3 and N76 to 55.
  2. Did you reboot this month? Just kidding! That seems to be the way it works. I've also been trying out Name and Scope and you always get the underlined shortcuts in sub-menus. To give you a heads-up from ME3 forum, if you run out of unique underlined letters, ME stops allocating them and presumably you have to double-click. There also seems to be a bug (in ME3 at least) with the underlined hotkey sometimes repeating.
  3. I was loathed to add the forum guideline item because I suspected it would draw negative comment. "That's a good idea" would have been a constructive response to having it as an item for discussion. It illustrates however, that the comments have completely derailed the thread and shows why that one issue should have been taken out as a separate thread. That's what I had envisaged if some input had been received from PGM. Each item would become a thread that everyone contributed to and end up as Pinned. Unfortunately, creating new threads and transposing/copying posts only works well if those in control of the forum do it. I guess it could be muddled around.
  4. I just ran it myself and it works fine. Did you change your Schedule to Daily? If you left it on Other it's probably restarting itself. You can test quickly by changing the times eg if it's 10am, set the Daily start to 10.05am and N75 and 76 to say 10 and 8 so it will stop at 10.08am (remember to save changes). You can disable all the mouse stuff if you don't want the macro to actually do anything. Watch the running man icon to see it start and stop. I added a sound file (ding) so I could hear the macro running every 15 secs.
  5. If you select more than one item, T1 is the sum of the items so if you select A and E, T1 will be AE. You should be using Contains for multiple selections. Equals is fine for single choice. Otherwise, the Ifs will work with the necessary time delays if some apps have heavy startups. I have one macro like this where the first option A is to do the entire list so that looks like: If Variable T1 Contains A or If Variable Contains B Then Open Yahoo End if If Variable T1 Contains A or If Variable T1 Contains C Then Open Google End If My time delays are built into each macro (in your case that would be Open Yahoo etc) but putting in the above code is fine. You can pre-seed the Multichoice so if A and E were your normal choices, set T1 = AE before the Multichoice and the selections A and E will be already selected when the box opens. If you want something else you change but it means that normally you just hit OK.
  6. As with all timing, start long and shorten. If Wait for Window Title works that fine. I normally add a short delay after that but in this instance timing is not critical. I played with Case a few months back but found the lack of ifs, buts, maybes and almosts was a bit limiting compared to If statements.
  7. I'm coming into the thread without too much reading of it. Have you tried using Controls? Each Winamp window is different. I only have the player and editor but Controls work fine to focus the window. Get Control (of the relevant window) Set Focus I'm assuming you mean Activate and not Open. You use both in the first para.
  8. I don't know how Case behaves with multiple matches. I don't think that is what it was intended for. Someone else will have to comment on that. If you are opening "things" you may need to add time delays after each so they do not happen at the same time. If Case seems to be the problem go to Ifs.
  9. You have over 3200 lines of mouse actions, only a few of which result in a mouse click. I assume you recorded this macro. You could probably get rid of 3000 lines of code. I don't know the application but you only need the mouse move immediately before the click. You may want to leave in a time delay between the mouse move and mouse click. I suggest you do all the editing on a copy of the macro in case you mess something up. What I posted was just text, you have to program yourself. You can't just paste it in as text. I've coded the instructions: Variable Set Integer %N75% from Current Hour Variable Set Integer %N76% from Current Minute If Variable %N75% = 3 AND If Variable %N76% >= 55 Macro Stop End If Delay 15 Seconds <IVAR2:75:20:><IVAR2:76:21:><IFVAR2:2:75:1:3><AND><IFVAR2:2:76:5:55><MSTOP><ENDIF><DELAY:15> Completely remove the Text Type that you added and paste the single line of code using the Direct Editor, immediately above the End Repeat. I've set the timer to go round the loop every 15 secs. If you want it to be something else, change it. You could try reading some of the Help information. You are playing with fire if you do not understand what you are doing. ME can do nasty things in the wrong hands.
  10. I added the Reply method to the list to resolve any issues. I don't have any issues. I brought up for those that do. The only reason I see to reply directly is that it's the simplest way to quote someone else's post. In some forums replying directly and particularly to a post high up the list is considered bad etiquette. There are no guidelines in this forum. By separating out side discussions as new threads, it makes it easier for those to be found during a Search. Search digs out the titles of the posts containing the Search string. If you have 40 to plough through you are going to skip any that don't seem relevant by title but they may be relevant due to the contained side discussions. If it were desired to have side discussions then there should be two buttons at the bottom of the post. "Quote" at the bottom of the thread for those in the main thread and "Quote for Reply to Side Issue" "Reply to Side Issue" or words to that effect for those heading sideways. What I've seen mostly is that side discussions take place in the main thread. If it becomes clear it's a long issue, someone turns it into a new thread. All those side discussions are making the main thread unwieldy for those not interested in them.
  11. I was thinking along the lines Cory mentioned. My html editor adds a blank space (not ) at the end of each line (which does not appear on the actual web page). None of my text editors seem to. Re Unicode, this exercise was useful because now if I see the ANSI characters ÿþ I'll know why. Re non-printing characters, I tried some hex values between 0 and 31 copied into a text variable. In those I tried, a character of some description appeared in the T variable (just like Unicode characters are changed when saving to ANSI format). The normal character I look out for particularly is a space. As Cory noted if you encase the variable in quotes in Text Box Display or other it makes it easier to see any erroneous characters like a space. I normally click at the end of the string. Hmmm, decisions. Which is less effort, two " or one mouse click? Note to self: Next terrypin problem post, ask if rebooted in the last month
  12. The code would look something like this. If the loop does not exist or has no time delay, then the time delay should be a minute or less. Too short a delay and you use more CPU; too long and you won't catch the minute. (Repeat Start) Variable Set Integer %N75% from Current Hour Variable Set Integer %N76% from Current Minute If Variable %N75% = 3 AND If Variable %N76% >= 55 Macro Stop End If (time delay Repeat End) How well this works depends on what you have in your macro and how it fits with a Repeat loop.
  13. Scheduling a macro is related to starting, not stopping. Using the Scheduler "Other" setting will not turn anything off. You can start the macro on a Daily schedule for 5.30am. If the macro does not stop itself by reaching its end, then you have to provide commands to do it. I can see two methods: In a Repeat loop, compare the current time with the time you want to stop (3.55am). When the times are equal stop the macro. "Date and Time" is more flexible but Variable Set Integer to Hour/Minute should be fine too because it's already Integer. ME uses 24 hour clock for this function so the hour being 3 must be morning. Remember, it's going to be turned off the next day but that is not a problem. Compare using (If hour=3 and minutes equal or greater than 55) in case there is a chance the macro may be busy at 3.55. Adding a Repeat may be difficult. If there is an existing loop that has to be used, you may not be able to look at the time every minute or less. The second method is if the macro starts things running and can then can wait a time delay (Delay or Timed Delay or Wait Time Elapse) until 5.30am. The Delay uses more CPU. The Timed Delay and Wait Time Elapse uses very little CPU but cannot be stopped until the end of the time without a reboot. I've not used this type of schedule other than the second method for a max of 3 hours. Both the above methods prevent any other macros running during the period.
  14. "Interestingly one of the other issues is using the "Reply" instead of "Add Reply" button which you refuse to comply with ;-) I'd like you a lot more if you did that for me" If I had my way: The "Quote" button would be moved to the bottom of the thread plus a "Multiple Quote" button There would be no "Reply directly to this Post" A thread is a thread. Side discussions are OT and should be tackled with a new thread or PM. All discussions should address the thread. Quotes of previous posts are fine but should be in the main thread. It's the responsibility of anyone posting to be aware of all posts, not just their pet side thread. In my experience the greatest confusion in forums is caused by people not reading the thread. I use the standard view so that as I scroll down, I'm reminded of the discussion by fleeting glimpses of posts. Length of scroll is also a good parameter to move on to another thread! As far as pinned topics go, some comment needs to be forthcoming from PGM at least. Both PGM and ISS (as well as viewers) benefit from the forums. Improving access to information will reduce unnecessary duplication of the same old info. Even if you know what you are looking for, Search is really tedious. For those not very knowledgeable it's impossible, so the "Good Stuff" should be in FAQs or Pinned posts.
  15. Whenever you have reported results in this thread, when you made the test and examined what had been copied, did you click after the end of the string (which may have appeared as nothing) to check whether it contained spaces. I know that spaces should not have been copied or created in doing the copy from TextPad (it's clearly creating something). If a space is created by that copy action, " " would appear to the casual viewer as nothing "" Your Clipboard test command would see the Clipboard as "Not Empty".
  16. "Wait for Program to Terminate" or "Wait for Window to Lose Focus" depending on the application. Some applications stay running when "closed" so you would use the disappearance of the window to indicate it was no longer active.
  17. Browse to the Macro Express 3 folder/macexp.exe or macedit.exe . I think 0 is the same icon in both.
  18. Are we talking about the same thing? We are talking about Pop-Up menus in the "Windows Default" style. You don't get to choose the hotkey, which is an underlined letter in the macro name. Ditto for the "Name and Scope" style which assign A-Z, 0-9. BTW I loaded up a "Windows Default" style menu with the full quota of 36. When it runs out of letters, there are no hotkeys. Presumably you have to double-click the item.
  19. Cory's only suggestion in this thread was to paste the clipboard into a text file and look at the hex values in that text file. Are you referring to another thread? I suggested in Post #15 that you look at the Clipboard content directly in your Hex editor. I was using the second half of the mex file to evaluate Clipboard content: Variable Set String %T[1]% from the clipboard contents If Clipboard Equals "" // Tests for clipboard containing "" (which I am calling 'empty'). Variable Set String %T[2]% to "Clipboard is empty." Else End If Text Box Display: The final TBD is Clipboard = T[1] = %T[1]% %T[2]% My point is that when you reported results (in any of the posts!): Clipboard = T1 = "" did you actually check the "" was really blank and not spaces
  20. What you have there is a 10 and a 13 - looks like you've recorded a line feed which may have occurred with the Paste. When you have been examining the value of T1, have you actually clicked to the right of the "=" to see if there are any spaces there? A space produces your effect. I simulated your effect using Hex but it turned out I had generated 2 spaces.
  21. I suspected Cory may have previously raised the issue. That prompts me to raise an issue for which I got not responses previously - it's about time some of these "procedures" and "good stuff"" information got Pinned like every other forum on the planet. We keep on having to regurgitate the same stuff over and over. It's difficult for anyone to find the "good stuff" using Search. Put it in an obvious and easily accessible place. I propose the following list: How to post ME code How to access information on web pages (different methods) How to store information (text, ini, registry, environment var, pros and cons) Replying Procedure/Use of Reply versus Reply Directly to this Post
  22. I didn't try the second macro because I thought it was the first as an mex file. I was feeling a little null at the time. If I added some confusion by talking about Unicode it was only because I was trying to duplicate the bizarre results you had. I tried the mex. I assume that I was supposed to do your previous steps 1-3 plus 4 at the end (this time manually doing the typing actions because you did not use the text file). No differences. Clipboard = T[1] = Clipboard is empty. every time with 3 different editors The whole issue of nil, null, empty and blank I've never thought about. I observe how ME behaves and write code accordingly. I've never had occasion to scratch my head other than when importing from Excel and wondering how to tell which cells are deliberately blank and which have not been filled in. That has nothing to do with ME. (edit) You should do what Cory suggested way back - look at the Clipboard in a Hex Editor to see what characters are being copied from TextPad. The only reason I can think that you have "Not Empty" but T1 = "" is that a character of hex value 0-31 (minus 9, 10, and 13) is put on the Clipboard and seen by ME. T1 is not equal to "" but the character is ignored and shown as "" because it is non-printable.
  23. Today it struck me that perhaps you were trying to make a paragraph listing (all the filenames in one sentence) rather than a line-by-line list. If that was the case it would highlight my comment about describing what you are trying to do. A comment I omitted was that if you want a variable to be blank then you don't set it (you use but never set). If you have an existing variable that has a value such as "this is a string of text" that you want to set to blank, you do not set it to a space. A space is a character just like a, b, c. It may appear as nothing in text but it is a character. The "" that you see many times in other people's code or quoted in the forum is obtained by setting the variable to absolutely nothing. You don't type anything into the Set Value box.
  24. First I'll explain the %T[99]% business. You don't set it, that is the whole point. It saves that step. If you never set a text variable it is equivalent to "". All you needed to do is change: Variable Set String set %T[99]% to the contents of C:\Documents and Settings\Pat\Desktop\New Files Added to F.txt Variable Set String %T[99]% to " " Variable Modify String: Save %T[99]% to "C:\Documents and Settings\Pat\Desktop\New Files Added to F.txt" to Variable Modify String: Save %T[99]% to "C:\Documents and Settings\Pat\Desktop\New Files Added to F.txt" You can do that with any UNSET text variable. I chose to use T99 in the days of ME3 because it was remote from the ones you usually use. It was easy to access in ME3 because you grab the slider of the UpDown box and zip to the bottom where T99 is. I never set T99 so that it is always "" or nothing and you have a ready-made nothing/blank. Re the main code, I thought my comment was fairly clear, get rid of the old lines 12-14 and add the one I posted. I have no idea why you are still using %FilesInECopy%. This time you are appending a space to %FilesInECopy% which is previously unset, then appending the filename so you end up with the filename such as E:\my folder\myfile.txt preceded by a space. Is that what you really want? Perhaps it is. If I were doing this for my own use I would replace your: Variable Modify String %FilesInECopy%: Append Text ( ) Variable Modify String %FilesInECopy%: Append Text (%FilesinE%) Variable Modify String %FilesInECopy%: Append Text (%T[95]%) Variable Modify String: Append %FilesInECopy% to text file, "C:\Documents and Settings\Pat\Desktop\New Files Added to F.txt" End If End Repeat Unlock Player Variable Set String %FilesInECopy% to "%FilesInECopy%" Multiple Choice Menu: with Text Box Display: Current File // display %FilesinE% for testing only Variable Modify String: Append %FilesinE% to text file, "C:\Documents and Settings\Pat\Desktop\New Files Added to F.txt" End If End Repeat Program Launch: "New Files Added to F.txt" (Normal) Parameters: Unlock Player This time I don't have time to define all the variables again (which is what happens when you paste code). You will have to program yourself. Note that the Append must have CRLF checked and note my change for the variable in the final Multiple Choice Menu(??) which I have changed to a Text Box Display rather than a Multiple Choice Menu. Code below: <TEXT BOX DISPLAY Title="Current File" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs16 \r\n\\par %FilesinE%\r\n\\par }\r\n" Left="Center" Top="Center" Width="624" Height="113" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/> I've put the Text Box Display inside the loop so you can check files before they are added to the list. Once the macro is working fine, you can delete or disable that command. When the list is finished, it is launched so you can look at it. Note that the full filepath "C:\Documents and Settings\Pat\Desktop\New Files Added to F.txt" is actually put in the Launch command. Also note that if you have spaces in filepaths the path must be in quotes as shown for launching.
  25. I'll answer the first post before looking at the second. If you add a file and it is higher up the tree than where the macro is currently running, it will not pick it up. It has gone past. If it is lower on the tree it should be picked up. If you want to continually monitor new files you will have to keep running the macro. If you do that there are two options. Run again, deleting the existing list of files and going through the lot again. Run again leaving existing list intact but checking each matching file found against what is already on the list (using Text File Process). In that case skip appending to the list. If it is not already on the list, append. Using this method the extra files will not be in tree order.
×
×
  • Create New...