Jump to content
Macro Express Forums

All Activity

This stream auto-updates     

  1. Earlier
  2. This script assigns variables to the x and y coordinates of the mouse pointer relative to... 1. The entire screen 2. The window that has focus Get Mouse Position into (%Screenx%, %Screeny%) Relative to Screen Get Mouse Position into (%Windowx%, %Windowy%) Relative to Current Window <GET MOUSE POSITION Option="\x00" X="%Screenx%" Y="%Screeny%"/> <GET MOUSE POSITION Option="\x01" X="%Windowx%" Y="%Windowy%"/>
  3. Hello i need just a little help (Sorry for my english i'm French) In my game when i type "%pos%" in the chat the game answer me in the chat my position ( [-35,55] or [4,-7] ) and i want to copy only one coordinates. For exemple: If my position is [-56,45] in the first step i want to copy and paste just -56 and after i want to take 45. But it's not all time -56 and 45 they have a lot of possibility how can i select the first number, copy past and after select the second but i want the solution work for all of number (between -60 and 60). Thanks for your help !
  4. Thanks Alan, I'll explore that interesting approach. Do you think can it be applied in the example under discussion?
  5. In a multi step script, when there is little (or no) or no choice but to check for the presence of particular windows, I use the strategy of using (and reusing) a Boolean variable to signal whether the script is proceeding according to plan: // Section 1 // Wait for "Hello" window to appear Variable Set Bool %IsSuccess% to "False" If Window "Hello" is focused Variable Set Bool %IsSuccess% to "True" End If If Variable %IsSuccess% Equals "False" Text Box Display: Script problem - Section 1 Macro Stop End If // "Hello" window has appeared, perform next action... // Section 2 Variable Set Bool %IsSuccess% to "False" ... If Variable %IsSuccess% Equals "False" Text Box Display: Script problem - Section 2 Macro Stop End If I find this approach very helpful when debugging scripts that are inherently unreliable due to their complexity.
  6. "I don't understand why you don't use the MEP file manipulation commands." I'm not sure I've understood. Apart from If File Exists, which I mentioned, what other 'file manipulation commands' do you suggest to handle file saving when OS messages are displayed as in my example? Or maybe you're referring to the simple way I've handled the file processing in that? IOW, are you instead recommending a Repeat with Folder to build a variable holding all files? If so, I agree, and if this was a larger project with many more files involved that's probably how I'd do it. But this was just a simplified example to focus on the subject issue. "I'd never type in file names..." Do you mean you don't use string variables to enter data as in my example? What advantage would using Controls offer? Wouldn't that involve more steps, and the same variable? "When I things that could have a popup error I use the existence of the controls." How would you do that for my example? What would be the target of the Get Control command, for instance?
  7. I don't understand why you don't use the MEP file manipulation commands. It's much easier to conditionally handle exceptions with them. Much faster and more reliable. Since this is the way I handle files, I am not going to be of much help, but I urge you to try and use them instead. When I things that could have a popup error I use the existence of the controls. Let's say that's a "Do you want to continue?" button. I define the control and use "if control exists". And I'd never type in file names, I'd use the controls to enter those values. And here again, checking of the controls exist are useful. What I'm saying is not only can you use the controls to do things, you can also use their existence and value to control the flow of your macro.
  8. When running macros that save files they frequently fail because messages from the OS do not automatically pause the macro to allow user interaction before proceeding. A typical example: // Now re-open the file in F2 mode and enter the new name Text Type (Simulate Keystrokes): <F2> Delay: 0.1 seconds Text Type (Simulate Keystrokes): %tFilename% Delay: 0.1 seconds Text Type (Simulate Keystrokes): <ENTER> Delay: 0.1 seconds Text Type (Simulate Keystrokes): <ARROW DOWN> Delay: 0.1 seconds End Repeat After the ENTER command I might briefly see a message like "A file of this name already exists..." and be asked to choose a Yes or No option (e.g. to save with a suffixed name), but the macro continues regardless. Sometimes the fix is easy; for example when the message is asking whether to overwrite the previous file I can often safely insert a Text Type Y command. Or I can use If Window, specify 'Replace File', and add an appropriate action, such as a simple Pause. Or sometimes an If File Exists command is possible. But sometimes it's not so easy. What techniques do others use please? Terry, UK
  9. Thank you so very much to everyone who replied. Your replies were almost all very excellent, and would have been helpful, except that I finally figured out that I had a programming error. I was continually creating the file during the macro. So even though M.E. was actually deleting the file, it kept appearing. I should have realized that Insight Software, being such amazing engineers, would have tested M.E. thoroughly. I should have had more trust. Thanks again to all. I will try to delete this thread, if possible, to avoid confusion to others.
  10. You could also try adding a "Wait for File to be Ready" command in front of the Delete File/Files command: Lock Player Text Type (Simulate Keystrokes): <ALT>fl Delay: 1000 milliseconds Wait for File to be Ready: C:\Web\n1\generated\files-are-okay.txt Delete File/Files: "C:\Web\n1\generated\files-are-okay.txt" Delay: 250 milliseconds Window Activate: Mozilla Firefox Wait for Window Title: Mozilla Firefox Text Type (Simulate Keystrokes): <CONTROL>4 Delay: 500 milliseconds Text Type (Simulate Keystrokes): <CONTROL><F5> // Use <CONTROL><F5> to refresh browser fully. Delay: 500 milliseconds Unlock Player Text Type (Simulate Keystrokes): <LOCK PLAYER Wait="FALSE"/> <TEXT TYPE Action="0" Text="<ALT>fl"/> <DELAY Flags="\x12" Time="1000"/> <WAIT FOR FILE TO BE READY Filename="C:\\Web\\n1\\generated\\files-are-okay.txt" Time="1" Indefinite="FALSE" Hours="0" Minutes="0" Seconds="15"/> <DELETE FILE/FILES Path="C:\\Web\\n1\\generated\\files-are-okay.txt" Progress="FALSE" Recurse="FALSE" Permanent="TRUE"/> <DELAY Flags="\x12" Time="250"/> <WINDOW ACTIVATE Title="Mozilla Firefox" Exact_Match="FALSE" Wildcards="FALSE" _IGNORE="0x0006"/> <WAIT FOR WINDOW TITLE Title="Mozilla Firefox" Partial="TRUE" Wildcards="FALSE" Indefinite="FALSE" Hours="0" Minutes="0" Seconds="10"/> <TEXT TYPE Action="0" Text="<CONTROL>4"/> <DELAY Flags="\x12" Time="500"/> <TEXT TYPE Action="0" Text="<CONTROL><F5>" _COMMENT="Use <CONTROL><F5> to refresh browser fully."/> <DELAY Flags="\x12" Time="500"/> <TEXT TYPE Action="0" Text="<HOME>" _ENABLED="FALSE"/> <UNLOCK PLAYER/> <TEXT TYPE Action="0" Text=" "/>
  11. Building on what Cory said: Does the macro work if you move the file to something like "C:\Users\Public\Web\n1\generated\files-are-okay.txt"?
  12. It might help to update to the latest version of Macro Express Pro 4. Download it here: Previous Versions The revision history does not mention a change for deleting files but there are several other important fixes. Release Notes: Macro Express Pro v 4.9.0.1 Your Macro Express Pro 4 license allows you to update to Macro Express Pro v 4.9.0.1 without cost.
  13. I just tested the "Delete File/Files" instruction in Macro Express 6 in two ways: 1. The file was closed. 2. The file was open. In both cases, Macro Express deleted the file. Delete File/Files: "C:\Users\Test\Documents\tmp tmp tmp.txt"
  14. Try rebooting. Can you delete it manually using the same account you are operating MEP in? I'll assume you are. You could tr running MEP as an administrator. Next thing I would do is to see if an application has a lock on it using Process Explorer. You're saving a file into a non-user area as defined by Microsoft. Usually this isn't a problem but I wonder if you have any anti-virus software which is blocking MEP's delete action. Some of them are suspicious of processes like MEP because that's how viruses sometimes operate. I would try disabling all security software.
  15. I realize that I'm running a very old version (I run a poor registered charity), but it works great and is one of my top two apps (the other is Ethervane Echo, which saves and restores the clipboard). When I run the following macro to save my editing and show my edited website in Firefox, the macro fails to delete file "files-are-okay.txt" with no error message. All the other commands work perfectly. Does this ring a bell with anyone? Is this a known bug, and what version was it fixed in? Environment: HP laptop, Windows 10 Home The macro: <LOCK PLAYER Wait="FALSE"/> <TEXT TYPE Action="0" Text="<ALT>fl"/> <DELAY Flags="\x12" Time="1000"/> <DELETE FILE/FILES Path="C:\\Web\\n1\\generated\\files-are-okay.txt" Progress="FALSE" Recurse="FALSE" Permanent="TRUE"/> <DELAY Flags="\x12" Time="250"/> <WINDOW ACTIVATE Title="Mozilla Firefox" Exact_Match="FALSE" Wildcards="FALSE" _IGNORE="0x0006"/> <WAIT FOR WINDOW TITLE Title="Mozilla Firefox" Partial="TRUE" Wildcards="FALSE" Indefinite="FALSE" Hours="0" Minutes="0" Seconds="10"/> <TEXT TYPE Action="0" Text="<CONTROL>4"/> <DELAY Flags="\x12" Time="500"/> <TEXT TYPE Action="0" Text="<CONTROL><F5>" _COMMENT="Use <CONTROL><F5> to refresh browser fully."/> <DELAY Flags="\x12" Time="500"/> <TEXT TYPE Action="0" Text="<HOME>" _ENABLED="FALSE"/> <UNLOCK PLAYER/>
  16. The cost of Macro Express is fairly modest, and for many (perhaps most) small- and medium-sized organizations, the cost of installing Macro Express on every machine is not prohibitive. Several years ago, I supported an organization whose staff relied on Macro Express. IT deemed that the .mex file must be stored on a network drive. Because the Macro Express files were updated once in a blue moon, and because the users never touched the Macro Express files, I didn't see any particular advantage of storing the .mex file on the network, especially since there were occasional network bottlenecks that caused Macro Express scripts to execute slowly or fail. Placing a copy of Macro Express of each PC would have simplified everything.
  17. Ah ha! I forgot we were talking about the Macro Express Script Editor. Indeed, pressing the down arrow automatically selects the entire next line.
  18. I think so(?) Here's a quick screencast. https://www.screencast.com/t/9zClrYOvVC EDIT: In the screencast I click on the top line, then arrow-down, then ctrl+c, then ctrl+v. The clipboard contents are shown in the Ditto clipboard extender.
  19. lol yeah, I guess I'll just live with this problem. Some of these standard ASCII values seem a bit strange and not very useful, whereas I would think that ≥ and ≤ are more universally known and used 😩
  20. Again, too ugly probably, but this is what I had in mind. See that characters "7" and "8" are your symbols.
  21. This page shows their font containing them. Probably too ugly for your use however. Maybe someone out there has a font just for math symbols.
  22. I believe the only solution for you would be to find a font that contains the symbols in the ANSI (Code page 437) characters. I looked at a few that sound like CP 437 but they don't seem to work for 242 and 243.
  23. I've also tried using 242 and 243 without luck. Like you mentioned, it seems to end up as ò or ó
  24. Let's see if a few others from various countries can join the discussion! I'm guessing it's a Windows OS setting?
  25. Extended ASCII charts like this all show 242 as that "O" with a feather in it's cap. It seems that most fonts abide by this instead of the original assignment. Perhaps it can't be done. I'll think more after lunch. BTW Unicode is, with a little qualification, two bytes. So MEP will usually only see the first byte and interpret that as whatever it is in the ASCII scheme. So there will be a large number that will always appear as "=" or other random character. It's cutting the character's bits in half.
  26. In Courier New they make 242 (0xF2) "ò"
  1. Load more activity
×
×
  • Create New...