Jump to content
Macro Express Forums

Dego

Members
  • Posts

    19
  • Joined

  • Last visited

Dego's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi rberq, I tried your suggestion and it appears to be working fine now. Thank you for your help much appreciated. Regard
  2. <WINDOW ACTIVATE Title="- MediaMonkey" Exact_Match="FALSE" Wildcards="FALSE" _IGNORE="0x0006"/> <CLIPBOARD COPY/> <DELAY Flags="\x01" Time="1"/> <COMMENT Value="Extract the FILENAME from full path & filename."/> <VARIABLE SET STRING Option="\x02" Destination="%Input%" NoEmbeddedVars="FALSE"/> <VARIABLE SET INTEGER Option="\x0D" Destination="%Length%" Text_Variable="%Input%"/> <REPEAT START Start="%Length%" Step="-1" Count="%Length%" Save="TRUE" Variable="%Index%"/> <VARIABLE MODIFY STRING Option="\x09" Destination="%Char%" Variable="%Input%" Start="%Index%" Count="1" NoEmbeddedVars="FALSE"/> <VARIABLE MODIFY STRING Option="\x07" Destination="%Output%" Variable="%Char%" NoEmbeddedVars="FALSE"/> <END REPEAT/> <VARIABLE SET INTEGER Option="\x0E" Destination="%nPosReversed%" Text_Variable="%Output%" Text="\\" Ignore_Case="FALSE"/> <VARIABLE MODIFY INTEGER Option="\x01" Destination="%nPos%" Value1="%Length%" Value2="%nPosReversed%"/> <VARIABLE MODIFY INTEGER Option="\x07" Destination="%nPos%"/> <VARIABLE MODIFY STRING Option="\x0A" Destination="%Input%" Start="1" Count="%nPos%"/> <TEXT BOX DISPLAY Title="Result" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs16 %Input%\r\n\\par \r\n\\par \r\n\\par \r\n\\par \r\n\\par \r\n\\par \r\n\\par \\f1 \r\n\\par \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0" _ENABLED="FALSE" _COMMENT="Disable this when satisfied."/> <COMMENT Value="Proceed with rest of macro."/> <OPEN FOLDER Path="C:\\Users\\desmo\\Desktop\\Music Library 2018\\Classical"/> <VARIABLE SET STRING Option="\x00" Destination="%T4%" Value="C:\\Users\\desmo\\Desktop\\Music Library 2018\\Classical\\" NoEmbeddedVars="FALSE"/> <VARIABLE SET STRING Option="\x00" Destination="%T4%" Value="%T4%%Input%" NoEmbeddedVars="FALSE"/> <DELAY Flags="\x01" Time="1"/> <CLIPBOARD PASTE/> <WINDOW CLOSE Option="\x01" Title="Classical" Partial="FALSE" Wildcards="FALSE" _IGNORE="0x0006"/> <DATE/TIME Format="dd/MM/yyyy HH:MM" Flags="\xB0" Date="25/12/2018 22:29:25" Day_Offset="0" Month_Offset="0" Year_Offset="0" Hour_Offset="0" Minute_Offset="0" Second_Offset="0" Left="Center" Top="Center" Monitor="0" Variable="%T3%" IsDateVar="FALSE"/> <VARIABLE SET STRING Option="\x02" Destination="%T1%" NoEmbeddedVars="FALSE"/> <VARIABLE SET STRING Option="\x00" Destination="%T2%" Value=" - Moved to Classical Folder" NoEmbeddedVars="FALSE"/> <VARIABLE SET STRING Option="\x00" Destination="%T1%" Value="%T1% %T2% %T3%" NoEmbeddedVars="FALSE"/> <VARIABLE MODIFY STRING Option="\x10" Destination="%T1%" NoEmbeddedVars="FALSE"/> <IF FILE EXISTS File="%T4%" Search_Path="FALSE"/> <CLIPBOARD APPEND TEXT Filename="C:\\Users\\desmo\\Desktop\\Music Sorting Log.txt" Prompt="FALSE"/> <TEXT BOX DISPLAY Title="File Copied Sucessfully" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang2057{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs24 File has been moved to \\b Classical Folder \r\n\\par \\b0\\f1\\fs16 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x01" Delay="3"/> <DELAY Flags="\x01" Time="3"/> <ELSE/> <TEXT BOX DISPLAY Title="File Copy Failed" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang2057{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs24 The file copy \\b Failed \\b0 please check and retry\\b \r\n\\par \\b0\\f1\\fs16 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x01" Delay="3"/> <DELAY Flags="\x01" Time="5"/> <END IF/>
  3. Hi I am a bit dumbfounded with the above command. The problem is if I hard code the pathname and filename the code works as expected, but if I replace it with the variable T4 with the exact same value it fails (see below) Can anyone advise why the variable is not working? This Example works This one fails using Variable T4 (File exists in Folder)
  4. Hi Terry I manage to sort it Line 19 I put a space between The %T4$%%Input% now %T4$% %Input% Thanks again for all your help Regards Desmond
  5. Here is the code I will now put Text boxes in the code. I don't think I have a problem with C:\Users\desmo\Desktop\Music Library\Holder \ which is the copy folder its the paste one it the C:\Users\desmo\Desktop\Music Library 2018\Classical\01 - New Killer Joe.mp3 folder Code below <WINDOW ACTIVATE Title="- MediaMonkey" Exact_Match="FALSE" Wildcards="FALSE" _IGNORE="0x0006"/> <CLIPBOARD COPY/> <DELAY Flags="\x01" Time="1"/> <COMMENT Value="Extract the FILENAME from full path & filename."/> <VARIABLE SET STRING Option="\x02" Destination="%Input%" NoEmbeddedVars="FALSE"/> <VARIABLE SET INTEGER Option="\x0D" Destination="%Length%" Text_Variable="%Input%"/> <REPEAT START Start="%Length%" Step="-1" Count="%Length%" Save="TRUE" Variable="%Index%"/> <VARIABLE MODIFY STRING Option="\x09" Destination="%Char%" Variable="%Input%" Start="%Index%" Count="1" NoEmbeddedVars="FALSE"/> <VARIABLE MODIFY STRING Option="\x07" Destination="%Output%" Variable="%Char%" NoEmbeddedVars="FALSE"/> <END REPEAT/> <VARIABLE SET INTEGER Option="\x0E" Destination="%nPosReversed%" Text_Variable="%Output%" Text="\\" Ignore_Case="FALSE"/> <VARIABLE MODIFY INTEGER Option="\x01" Destination="%nPos%" Value1="%Length%" Value2="%nPosReversed%"/> <VARIABLE MODIFY INTEGER Option="\x07" Destination="%nPos%"/> <VARIABLE MODIFY STRING Option="\x0A" Destination="%Input%" Start="1" Count="%nPos%"/> <TEXT BOX DISPLAY Title="Result" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs16 %Input%\r\n\\par \r\n\\par \r\n\\par \r\n\\par \r\n\\par \r\n\\par \r\n\\par \\f1 \r\n\\par \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0" _ENABLED="FALSE" _COMMENT="Disable this when satisfied."/> <COMMENT Value="Proceed with rest of macro."/> <OPEN FOLDER Path="C:\\Users\\desmo\\Desktop\\Music Library 2018\\Classical"/> <VARIABLE SET STRING Option="\x00" Destination="%T4%" Value="C:\\Users\\desmo\\Desktop\\Music Library 2018\\Classical\\" NoEmbeddedVars="FALSE"/> <VARIABLE SET STRING Option="\x00" Destination="%T4%" Value="%T4%%Input%" NoEmbeddedVars="FALSE"/> <DELAY Flags="\x01" Time="1"/> <CLIPBOARD PASTE/> <WINDOW CLOSE Option="\x01" Title="Classical" Partial="FALSE" Wildcards="FALSE" _IGNORE="0x0006"/> <DATE/TIME Format="dd/MM/yyyy HH:MM" Flags="\xB0" Date="25/12/2018 22:29:25" Day_Offset="0" Month_Offset="0" Year_Offset="0" Hour_Offset="0" Minute_Offset="0" Second_Offset="0" Left="Center" Top="Center" Monitor="0" Variable="%T3%" IsDateVar="FALSE"/> <VARIABLE SET STRING Option="\x02" Destination="%T1%" NoEmbeddedVars="FALSE"/> <VARIABLE SET STRING Option="\x00" Destination="%T2%" Value=" - Moved to Classical Folder" NoEmbeddedVars="FALSE"/> <VARIABLE SET STRING Option="\x00" Destination="%T1%" Value="%T1% %T2% %T3%" NoEmbeddedVars="FALSE"/> <VARIABLE MODIFY STRING Option="\x10" Destination="%T1%" NoEmbeddedVars="FALSE"/> <IF FILE EXISTS File="C:\\Users\\desmo\\Desktop\\Music Library 2018\\Classical\\01 - New Killer Joe.mp3" Search_Path="FALSE"/> <CLIPBOARD APPEND TEXT Filename="C:\\Users\\desmo\\Desktop\\Music Sorting Log.txt" Prompt="FALSE"/> <TEXT BOX DISPLAY Title="File Copied Sucessfully" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang2057{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs24 File has been moved to \\b Classical Folder \r\n\\par \\b0\\f1\\fs16 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x01" Delay="3"/> <DELAY Flags="\x01" Time="3"/> <ELSE/> <TEXT BOX DISPLAY Title="File Copy Failed" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang2057{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs24 The file copy \\b Failed \\b0 please check and retry\\b \r\n\\par \\b0\\f1\\fs16 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x01" Delay="3"/> <DELAY Flags="\x01" Time="5"/> <END IF/>
  6. Hi Terry, I have incorporated your code but have a strange issue. I have attached an image which shows the value of %T4% as being C:\Users\desmo\Desktop\Music Library 2018\Classical\01 - New Killer Joe.mp3 When T4 is used in the code It fails the IF Exist Statement even though the file exist and when I hard code the file name the it works fine. Am I doing something wrong? Regards Desmond
  7. Understood Thanks Terry for you help time and patience Regards Desmond
  8. Hi Terry Quick question how do I get the code into the script editor? When I cut and paste it I get the result below and it does not run.
  9. Thanks rberq Will give it a go Regards Desmond
  10. Thanks Terry I will give it a go and see how I get on. I will still finish the macro and then compare and see which method is most efficient. Thanks again for all your help Desmond
  11. Hi Cory I have tried using you code to try and solve an issue a problem similar to the one above. I am trying to extract the file name form the full path name i.e. C:\Users\desmo\Desktop\Holder\07. Fistful Of Tears.mp3 File need in a test variable 07. Fistful Of Tears.mp3 The error that I am getting is that the variable is not defined or wrong type Can you point me in the right direction Regards Desmond
  12. Hi Terry, The process i am referring to is the the Auto Organise Files facility accessed by selecting Track/Tracks and left clicking. this then allows you to set the parameters for how you wish the files and folders to be organised based in the information in the tags. So in the example below shows the process would look at the Genre Tag and based on that create the folder if it does not exist in this case (R&B) it would rename the file in this case based on the Artist and Title tags. It is very powerful but it is reliant on the tags being accurate and in my case they are if they exist. I have a large volume of music files (30,000+) so my starting point is to use the preview function in MM to quickly listen to the track and decide the appropriate genre folder it should go into hopefully using the macro. I'm almost there with the macro. Only thing left to do is check at the end of the macro if the file has actually been copy to the chosen genre folder. Maybe you can help? I need to separate the extract the filename from the path(below). So it some sort of string manipulation, could you point me in the right direction? C:\Users\desmo\Desktop\Holder\08. Lonely's The Only Company (I & II).mp3 I am after 08. Lonely's The Only Company (I & II).mp3 Right at the bottom is screen shot of my starting point in MM. The macro is initiated and copies (Clipboard Copy) the selected track. Manually I would do an Ctrl+Control navigate to the target folder and then Ctrl+V I also put a screenshot of where i am up to with the code. My plan is to have a copy of the code for each genre and use menu builder. Reason I did this way is that I will be presented with all the available genres/sub-genres which could be up to 50. Sorry I not that great at explaining things, hope this gives you have a picture of how it works, and why I am taking the approach that I am, but I am always open to suggestion.
  13. Hi I started out loving Macro Express 4 but now I am getting a bit frustrated. I have this bit of code (see below) that runs but the copy file/files does copy the file. So what I did to test it is change %T1% to the value in clipboard which is C:\Users\desmo\Desktop\Holder\05. Dancewitme.mp3 which works fine and copied the file. So my question is why does it not work when using the variable %T1%, but works when replace %T1% with the value of the clipboard. I added a Message box (see below) to check the value of %T1% and it is C:\Users\desmo\Desktop\Holder\05. Dancewitme.mp3 And help would much appreciated Regards Desmond
  14. Hi mdoverman Thanks for your reply. Can you explain in a little more detail the multiple choice menu or Variable set string options please. i.e where I can find the commands Regards Desmond
  15. Hi Terrypin, thanks for your reply I have just had a play with MM and they is a way to copy/move files but it is long-winded as you have to navigate down to where the folder is located (6 levels) and there does not appear to be a shortcut method. I cannot use the automated function that sorts files into folder based on the value of the genre tags as it is either inaccurate or non existent. So for speed I think a macro is the best way to go. I had a post from MDoverman suggesting - You should be able to use a multiple choice menu or Variable set string in your macro to ask you to select what genre you want which will put your choice in a variable that can be used later in your macro to put the file in the correct folder. But RBerq gives this advice 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. So I am a bit confused What are the pros and cons of the two different approaches? your help is much appreciated. Regards Desmond
×
×
  • Create New...