Jump to content
Macro Express Forums

BBO

Members
  • Posts

    4
  • Joined

  • Last visited

BBO's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Self-taught very basic Macro Express hack. Been running ME for years. Mostly to rename/number lists of files. Upgraded to W10 & then ME 5.1 couple months ago. Saw that when i upgraded to 5.1, the variables changed format from T%1% to %T[1]%, and the upgrade seemed to have automatically upgraded all my macro variables. So far, so good. Everything kept working fine. Then, about a week ago, when i went to run macros that have been running fine since the upgrades, i started getting this error: The following error was encountered: Undefined variable or the variable is the wrong type "20results" Macro Name: File REPLACE jpeg with jpg Line Number: 2 Here are the first three lines of that macro: VARIABLE SET STRING %T[6]% to topmost window title WINDOW ACTIVATE %T[6]% WAIT FOR WINDOW TITLE %T[6]% I then upgraded from ME 5.1 to 5.2.0.1 - no change. Still getting the errors. The thing is, they worked one day. Didn't work the next. These macros were written a long time ago, and have been running fine for years. When i remove the VARIABLE SET STRING command and the remaining occurrences of the focusing algorithm: WINDOW ACTIVATE %T[6]% WAIT FOR WINDOW TITLE %T[6]% the macros still work fine. My goal with these lines is to focus the macro on the Windows Explorer window where the files are and then wait for it to be active. Otherwise, because sometimes the renaming changes the order of the files, and windows now insists on refreshing the view every time there's a change, sometimes the refresh takes longer than i have timed for in the macro, and the macro starts working on the wrong file. This was my solution since probably ME 2 or 3 to keep the macro and the window in sync. What am i doing wrong? Is there a better way to do this? Any thoughts would be greatly appreciated.
  2. Self-taught very basic Macro Express hack. Been running ME for years. Mostly to rename/number lists of files. Upgraded to W10 & then ME 5.1 couple months ago. Saw that when i upgraded to 5.1, the variables changed format from T%1% to %T[1]%, and the upgrade seemed to have automatically upgraded all my macro variables. So far, so good. Everything kept working fine. Then, about a week ago, when i went to run macros that have been running fine since the upgrades, i started getting this error: The following error was encountered: Undefined variable or the variable is the wrong type "20results" Macro Name: File REPLACE jpeg with jpg Line Number: 2 Here are the first three lines of that macro: VARIABLE SET STRING %T[6]% to topmost window title WINDOW ACTIVATE %T[6]% WAIT FOR WINDOW TITLE %T[6]% I then upgraded from ME 5.1 to 5.2.0.1 - no change. Still getting the errors. The thing is, they worked one day. Didn't work the next. These macros were written a long time ago, and have been running fine for years. When i remove the VARIABLE SET STRING command and the remaining occurrences of the focusing algorithm: WINDOW ACTIVATE %T[6]% WAIT FOR WINDOW TITLE %T[6]% the macros still work fine. My goal with these lines is to focus the macro on the Windows Explorer window where the files are and then wait for it to be active. Otherwise, because sometimes the renaming changes the order of the files, and windows now insists on refreshing the view every time there's a change, sometimes the refresh takes longer than i have timed for in the macro, and the macro starts working on the wrong file. This was my solution since probably ME 2 or 3 to keep the macro and the window in sync. What am i doing wrong? Is there a better way to do this? Any thoughts would be greatly appreciated.
  3. Running ME 3.9a and just up(down?)graded to Windows 8.1 from XP Self-taught, so i am assuming this is a klugy way to do this, but i need to rename a list of files. Everything worked great in XP, then had to move to 8.1 The problem is the XP versions of rename a file (Alt-F, then M), now translated to 8.1 (Alt-H, then R) don’t seem to grab the filename so i can copy it into the clipboard. I run this from the DETAILS view of a folder. I'll make a decision about how many of the files to do in the list based on the names, or dates modified, or whatever. I highlight the first file in the list that i want to rename, then start the macro. In the Repeat Prompt command, tell ME how many files i want to rename. It just runs down the list of files in DETAILS view. Currently doing this: Clear All Variables: All Clipboard Empty Variable Set String %T6% from Window Title Activate Window: "%T6%" Repeat Prompt Start (Prompt for repeat count at macro play time) Activate Window: "%T6%" Wait For Window Title: "%T6%" Text Type: <ALT><ALT>H Delay 50 Milliseconds Text Type: R Delay 50 Milliseconds Clipboard Copy Variable Set String %T3% from Clipboard ....At this point i do a lot of file name manipulation based on the current filename that is in Clipboard (and %T3%). The new filename is placed in %T7% // Write new file name Text Type: <DELETE> Delay 50 Milliseconds Text Type: %T7% Text Type: <ENTER> Delay 200 Milliseconds If Not Window Title "%T6%" on top Text Box Display: Variables Text Type: N<ENTER> End If Wait For Window Title: "%T6%" Repeat End Audio Unmute I feel like there’s a much simpler way to do this, but the macro has organically grown into this based on what worked, and my ignorance of what ME commands might be more efficient for this. I know there’s a “Rename Files or Folders” command, but i need to get the filename into a variable so i can make decisions about how to rename it based on the current filename. (Hence the Alt-H and R commands). I feel stupid, but i can’t seem to find any other way in ME to get the current filename into a variable. All the ME commands seem to want the filename as an input, but my filenames change as the macro goes down the list of files. Any help making this more efficient or robust would be appreciated.
  4. I am editing summaries of a list of mp3 files with a loop macro. After selecting the first file, I open the Summary tab of the File Properties with the following code. Infuriatingly, I can not seem to consistently get the Advanced version of the Summary tab (as opposed to the Simple version) to display. Capture Control seemed to me to be the way to go with this, but i can't ever seem to get Capture Contol to work the way i think it's going to work. Any suggestions? ACTIVATE2:%T6% WAITWIN:%T6% TEXTTYPE:<ALT>f MSD:200 TEXTTYPE:r MSD:200 TEXTTYPE:<CONTROL><TAB> MSD:200 TEXTTYPE:<SHIFT>TAB> TEXTTYPE:<SHIFT>TAB> TEXTTYPE:<SHIFT>TAB> TEXTTYPE:<SHIFT>TAB> MSD:200 TEXTTYPE:<ALT>v MSD:100 TEXTTYPE:<ALT>m MSD:100 TEXTTYPE:<ALT>v MSD:100
×
×
  • Create New...