Jump to content
Macro Express Forums

cldcp00

Members
  • Content Count

    24
  • Joined

  • Last visited

Community Reputation

0 Neutral

About cldcp00

  • Rank
    Newbie
  1. Hi The Clipboard contains C:\Desmond Music\Music Library 2018\000 Music Selected To Play WhatsApp Group\Check if already got\02 Funky Maker (Horace Andy - Funny Man).mp3 and I have entered the following expecting that it should trap anything that begins with C:\Desmond Music\ Is this not the case? If not what options do I have?
  2. Thanks Guys I will Experiments with Windows Control which i feel is best for what I am trying to do
  3. Hi I have a macro where I need to click on a button within Windows File Explorer that does not have a shortCut assigned. What is the best way to do this?
  4. I am probably at fault for not explaining my requirements properly, but the macro once working WILL save me a lot of time, and as they say time is money. I will research successive selections and experiment. Thanks again for all your Input.
  5. Correct Cory Would have saved a lot of pain with the quotes
  6. Thanks Terrypin, Sorry to be a pain. How would the Repeat and End Repeat loop be controlled i.e how would it know how many items have been copied to the clipboard. Say 3 items in Windows File Explorer has been selected do I need to use something like Clipboard Append Text then loop the code to read each line in the file. Is this the right approach?
  7. Hi Cory, Below is the MEP Code which passes two values to the External VBScript Variables %FullFilename% %Destination% // PURPOSE OF MACRO Copy the seleced file to another existing user-selectable folder. Clipboard Empty Text Type (Simulate Keystrokes): <F2> // Edit mode. Delay: 0.2 seconds // Select all. (Iincluding extension, which I found necessary in Win 10.) Or use @acantor's equally effective method. Text Type (Simulate Keystrokes): <CONTROL>a Delay: 0.2 seconds Clipboard Copy Delay: 0.2 seconds Variable Set String %tFilename% from the clipboard contents Text Type (Simulate Keystrokes): <ESC> // Close edit mode Delay: 0.1 seconds // Select address of current folder. Text Type (Simulate Keystrokes): <ALT>d Delay: 0.1 seconds Clipboard Copy Delay: 0.1 seconds Variable Set String %tFolder% from the clipboard contents Text Type (Simulate Keystrokes): <ESC> // Close edit mode Delay: 0.1 seconds // Now re-assemble the original full filename and path. Variable Modify String %tFullFilename%: Append Text String Variable (%tFolder%) Variable Modify String %tFullFilename%: Append Text (\) Variable Modify String %tFullFilename%: Append Text String Variable (%tFilename%) Variable Modify String: Save %tFullFilename% to the clipboard Delay: 0.1 seconds Variable Set String %tDestination% to "C:\Desmond Music\New Music Library 2018\Classical" External Script: VBScript Text Box Display: Results The External VBscript is called (See code below) Things to note The %Console% variable specified in the save console output to Box is the means by which and output form the VBscript is passed back to the host MEP script. So Wscript.Echo has passed "File Copied Successfully" to the the MEP script using Console. Then the last thing I do is display %Console% using Text Box Warning The thing that caught me out was the quotes "%Destination%" around the passed variables, I did not noticed that they were needed, and it just will not work without them. As i have already said this has something to do with the way MEP passings vales to the External Script. I am a newbie so sorry if I have not used the correct terms but I hopes it helps
  8. Hi Cory, I am away from that PC at the moment, back home tomorrow evening. I will try and explain tomorrow what I did to get it working, quite straight forward, my issue was I had left off some needed quotes" " around the variables. This has something to do with how MEP passes the value to the VBscript Regards
  9. Sorry I cannot seem to find it again. I cannot remember the search term that i used.
  10. Hi Terry, Thanks to your help I have now got everything working perfectly. Currently the macro only works for a single item. Could it be amended to also work if multiple files are selected? Regards Desmond
  11. Hi terrypin, Sorry I missed this post. Yes I got the script working and growing in experience with the language. Thanks again for all your help
  12. Hi Cory Managed to get it sorted. Found one of your old post and figured it out. Thanks for all your old posts, much appreciated
  13. Hi Cory, Sorry to be a pain. I am having a bit of trouble passing the value of two Variables in my my macro to the VBScript. It works fine when I hard code but not with the variables. I have two variables in my macro that needs to be passed to the VBscript %tFullFilename% %tDestination% I have read the information you suggested (below) but still do not fully understand. If I set "%tDestination%" to %MacExpString% , how do I pass the second Variable %tFullFilename% Variable Set String %MacExpString% to "%tDestination%" And in the External Script must the Variable be called vbsString? Have you got and example code? To pass Macro Express Pro variables to your VB Script do this:In your macro use the Variable Set String command Variable Set String %MacExpString% to "Pass this to VBScript" Then include this line in the External Script command: vbsString = "%MacExpString%"
  14. That Exactly what I am trying. Can you explain why it will not work? The clipboard copies this C:\Desmond Music\Music Library 2018\000 Music Selected To Play WhatsApp Group\Bad Tunes\02 - Brethren & Sistren.mp3
×
×
  • Create New...