Jump to content
Macro Express Forums

rberq

Members
  • Posts

    1,203
  • Joined

  • Last visited

  • Days Won

    61

Everything posted by rberq

  1. Can you show the failing lines of macro code? The following seems to work fine: Variable Set String %T[1]% to "cash%001" Text Box Display: %T[1]% These lines also work for me: Variable Set String %T[1]% to "cash" Variable Modify String %T[1]%: Append Text (%) Variable Modify String %T[1]%: Append Text (001) Text Box Display: %T[1]%
  2. I agree 100% -- said he who still mostly uses ME3🙂.
  3. Then if you have split out the lines, next step is to split out link/login/password. My guess is, the Tab character is inserted by Excel between the items, so that can be used for splitting. Tab character in my example code was placed into variable %T91%. Cory is right, it's sometimes easier to use variables with meaningful names, but I use Macro Express Version 3 that only allows T for text variables, N for integers, and D for decimal.
  4. In Excel, I assume each "Link Login Password" is a single row. But is it one column with spaces between the items, or is it three columns? (I'm asking pretty much the same question that acantor asked, above.) It will make a difference as to the easiest way to isolate the individual items.
  5. I have these lines in a macro that uses a few special characters. See the setting of variable T92 to the New Line value. Once you have set the value, I think you could split using %T92%. // // Tab character ascii 9 Variable Set %T91% to ASCII Char of 9 // // Line Feed (New Line) character ascii 10 Variable Set %T92% to ASCII Char of 10 // // Carriage Return character ascii 13 Variable Set %T93% to ASCII Char of 13 // // Carriage Return / Line Feed combination characters ascii 13 + ascii 10 Variable Set %T94% to ASCII Char of 13 Variable Modify String: Append %T92% to %T94% //
  6. Looks like it should work. This is a shot in the dark, but try using Variable Modify String [Trim] on variable %T1% before the Copy File line. If there are any "invisible" characters on one end or the other of the clipboard contents, this probably will get rid of them. Another way to find out if there are non-display characters in a text string is, instead of displaying %T1% in a text box, display ***%T1%***. If there are no invisible characters, what you will see in the text box will be ***ABC***,, with no empty space between the asterisks and the variable contents. With invisible characters in the text, the text box might appear as *** ABC *** (non-display bytes both before and after the text you expect to see).
  7. What do you mean when you say you had the macro working, but then found out it isn't working? Do you simply mean it was running from beginning to end without any obvious errors? Or do you mean it was actually, successfully copying the file? When setting up Macro Express, one of the "Preferences" is a clipboard delay time -- that is, how long Macro Express waits for a clipboard function to finish. Insufficient time can easily be a problem with clipboard commands. Insert a few seconds' delay right after the CLIPBOARD COPY and the CLIPBOARD PASTE commands, and see if that make the macro work. If so, you have found the problem. You won't want to leave such long delays in the macro permanently, but there are less-drastic ways to deal with the timing issue, if that's what it is. I'm not familiar with MediaMonkey, so some explanation or screen shots of what you are doing might be helpful.
  8. Once you have copied the name into the clipboard, you can build a "copy" command (in a text variable), including the destination folder. For example, COPY C:\MUSIC\SONGNAME.MP3 C:\SORTEDMUSIC\CLASSICAL Then "type" the WIN key, texttype the text variable into the Windows RUN command area, and texttype ENTER to run the copy. Or, look at the macro command "Copy File or Files". If you build the source and destination names in text variables T1 and T2, then you can use %T1% and %T2% in the Copy File command and skip the Windows RUN command. See image below for the macro command -- I'm using Macro Express 3 rather than Pro so Copy File may be slightly different. If you use either of these methods, I would recommend NOT having the macro ask you for the name of the destination folder. Instead, just hard code the destination into the macro, and clone the macro for each possible destination. Use different hot keys for each macro, for example CTRL-ALT-c for classical, CTRL-ALT-j for jazz, etc.
  9. Right-click the ME system tray icon, select Suspend.
  10. Macro Express simulates keystrokes and mouse movement, so it sort of makes sense it would follow to wherever WebWithoutBorders is directing the keyboard/mouse. But what about a macro that just does file actions, no keyboard or mouse at all? Does that still follow the mouse? Is ME installed on all the computers?
  11. The hard part is figuring out which Date/Time commands to use. This little loop will figure the number of days from now until Christmas of this year. It repeatedly adds increasing increments to today’s date, until the result equals the target date (Christmas). When the Repeat loop ends, the number of days is in variable N[1]. The image shows the expanded Data/Time command. Note the comment line about a never-ending loop.
  12. Copy and paste individual fields. Maybe copy from the CSV file as Cory suggests; maybe copy from an online display of Access records. Once copied into a set of Macro Express text variables, switch to the web form and use Text Type to tab to appropriate fields and type or paste the text values into the form. More details would be helpful: Do you want to do one table entry at a time, with manual intervention? Do you want to go automatically through the whole Access table and do one item after another after another?
  13. Or code the macro to "watch" for something to change on the screen, indicating that the click-on-control has completed. For example, the code below will loop until a particular color is found at a screen location. The conditional loop avoids always having to wait for the maximum time that MIGHT be required, before typing the F5 key. This loop waits nominally 50 seconds before typing F5, but will go to F5 almost instantly if the screen change is detected. // // Wait for tab to turn green Mouse Move Screen 350, 420 Repeat Start (Repeat 500 times) Get Pixel: Under Mouse into %N1% If Variable %N1% = 2314301 Repeat Exit End If Delay 100 Milliseconds Repeat End // Text Type F5
  14. Do you have a delay programmed between the mouse click and the F5 key? If the system is busy with whatever activity is engendered by the click-on-control, it may be ignoring the F5. As a test, try the Timing command "Delay 3 Seconds" after the mouse click. I know, three seconds is excessive, but the point is just to test whether the problem is in Macro Express or in feeding the application a keystroke it is not ready to handle.
  15. I have occasionally seen that behavior with certain applications, even sometimes with Firefox. And sometimes the "clickable" portion of a button is isolated to a small central portion rather than to the whole visible icon. I don't pretend to know why that is so, but it makes me wonder whether your whole original problem is somehow connected to the application you are working with, rather than to Windows or Macro Express.
  16. Strange. Some unexpected interaction between Scroll Lock and the mouse??? Just as an experiment, try changing your macro to use Caps Lock or Num Lock as the pause indicator, and see what happens. Is that the whole macro? You said it clicks "over and over" but I don't see any repeating logic.
  17. Or, if you are just looking for number of RECORDS (as you say in the title of your posting) -- use Text File Begin Process, which transfers the records one at a time into a variable, and you can add to a counter each time through.
  18. Probably can be done with command Text File Begin Process, which loops for the entire file and passes one line at a time to a text variable. Read about it in the Help section. If you need to copy the whole line starting with @, it's easy. If you need to copy less than the whole line, the hard part may be where to leave off -- that is, what delineates the end of the name to be copied? Show us a couple dozen representative lines; change the names to protect the innocent, if necessary. If your files are not text files, then ????
  19. Also put "unicode" into the search box at upper right of this screen and see what comes up. This one may be helpful if you reverse-engineer what he is doing: https://pgmacros.invisionzone.com/topic/4914-how-to-convert-unicode-to-ascii-within-mep-in-6-lines/?tab=comments#comment-21018
  20. I may not sufficiently understand Unicode, so I don't know if these ideas will get you closer to your goal ... (1) You can save a Notepad file in Unicode format by selecting "File - Save As" and specifying Unicode "Encoding" at the bottom of the Save screen. Macro Express can internally open and read the file (very fast), without displaying it anywhere, using commands ASCII File Begin Process or Text File Begin Process. Once the macro reads the data into a text variable it can be moved to the clipboard. Presumably you could store all the special characters in a single file, extracting them as needed, rather than having a separate file for each character. (2) You can define string variables within a macro, consisting of multiple bytes, without using an external file at all. For example, see below the loading of the two-byte carriage-return-line-feed sequence into string variable T94. Obviously you would be building Unicode sequences, not these particular sequences. If your macro then puts the string variable into the clipboard and pastes it to the library application, will that work??? // // Tab character ascii 9 Variable Set %T91% to ASCII Char of 9 // Line Feed character ascii 10 Variable Set %T92% to ASCII Char of 10 // Carriage Return character ascii 13 Variable Set %T93% to ASCII Char of 13 // Carriage Return / Line Feed combination characters ascii 13 + ascii 10 Variable Set %T94% to ASCII Char of 13 Variable Modify String: Append %T92% to %T94% //
  21. How long since you switched to Mac? Is there any Windows thing you have discovered you miss so far? In the ME script editor, you can highlight all and click Edit | Copy Command Text then paste it into Notepad or similar. One macro at a time. In Direct Editor you can also copy to clipboard. I don't know whether there's a way to do the whole macro library.
  22. Change your hourly macro to shut down and restart ME, rather than reset hooks, since restarting is what works. Not ideal, obviously .... You could periodically run a macro that starts Notepad, types something, types "Ctrl-a" to highlight whatever was typed, copies to clipboard, kills Notepad, and checks whether the clipboard has any contents -- if not, shutdown & restart. Also not ideal, obviously, because potentially disruptive to whoever is using the computer. I can't think of any way to check the hooks invisibly. Have you reported the problem to Insight?
  23. "Print screen" is not a Macro Express command. It is a keyboard key, which you can have Macro Express "type" by using the Text Type command.
  24. I do this often enough, the question prompted me to set up a macro to do it. This is with ME3; ME Pro would be the same. // // Capture screen with PrintScreen key, start Paint program, paste screen shot // Text Type: <PRTSCR> Delay 300 Milliseconds Launch and Activate: "mspaint.exe" Delay 300 Milliseconds Text Type: <CTRLD>v<CTRLU> //
  25. I have never had a problem with text like "<CTRLD>x<CTRLU> ". On the contrary, for reasons I don't understand, I sometimes found " <CONTROL>x " to be unreliable, so I always use the down-then-x-then-up sequence. For most macros, maybe you have a standard sequence of commands at the beginning, such as logging the macro name, setting mouse and keystroke speeds, and so on. (If not, you should.?) You could put something like this within the first few lines of every macro to clear any prior downs: Text Type: <CTRLU><ALTU><SHIFTU><WINU>. Of course that doesn't help clear the down keys for manual typing until some other macro runs ... I don't really know what to suggest for that.? Perhaps use Text Type: <CTRLU><ALTU><SHIFTU><WINU> immediately after ANY sequence that includes a key-down command -- when you cancel a macro, 99.9999% of the time the cancellation would not occur between the down and the subsequent up. For example, Text Type: <SHIFTD> Text Type: abcdefgABCDEFG Text Type: <CTRLU><ALTU><SHIFTU><WINU>
×
×
  • Create New...