Jump to content
Macro Express Forums

Wolters

Members
  • Posts

    17
  • Joined

  • Last visited

Posts posted by Wolters

  1. To have the macro prompt the user for a folder use the Variable Set String %Folder%: Prompt for a foldername command. To split a file path into separate parts (drive, path, file name, extension) use the Variable Set From File path command. You can then combine the separate parts of the file name using the individual variables.

     

    Thank you so much for your kind and quick help!

  2. Hi,

     

    As a beginner I might have overlooked something, but so far I have managed to ge ME to work on files in a specific folder by giving the command "Repeat with Folder" a predefined folder path and folder name. This works great!

     

    I now wonder if it would be possible to within a macro PROMT the user for a folder (and implicit a folder path) and store this information i a variable to be used with "Repeat with Folder" for example?

     

    The ideal thing would be to have some command that says "Get Folder" which presents a dialogue box for the user with a Browse-button and a text that says something like: "Please browse to the Folder which you would like to have processed."

     

    The user then clicks the Browse-button and navigates down to any folder, highlights this and clicks OK. The Folder Name and Folder Path is then stored in two variables of choice...

     

    Is this possible?

     

    Regards,

     

    Dag

  3. Hi, I have a text file with file names (without paths) on each line. Now I would like to run through the list, one file name by one, and see if this file exists on my computer in a folder with several subfolders, and if the file name in the text file correspond to an actual file in one of the folders or subfolders, I would like to move it to another folder.

     

    In my current "Macro Express development level" I have manage to open the text file, and then using the "If File Exist-command" to determin wether the file should be moved or not by the "Move File/Files-command".

     

    However, I have manage to do this when having all the files that should be searched in one single folder only! I have not figured out how I can move the focus and have my macro look into another folder and then run through the file list again to see if any files in the list is in this folder, and when finishing processing that folder, moving on to the next and start all over again.

     

    I would very much appreciate if someone can just point me in the direction of which commands to use (not writing the script!!!)!!!

     

    Regards,

     

    Dag

  4. I have copied the Joseph Weinpert's example about the Replace Substring command from his "Macro Express Explained", page 202 in which he explains how to use the Replace Substring command to "prepend" text to a string variable. In the example he has the string "quick brown fox" stored in T1 then uses this command in order to add the word "The" in front of the string "quick brown fox". But when I use the "Replace %T1% with "The %T1%" in %T1%", nothing happens!!! What have I missed???

  5. I have found the "Hibernate" command among the Systems command that Macro Express can execute. But what about waking up the computer once you have executed a Hibernate command? What I a am trying to accomplish is a very short macro that puts my PC into hibernation in the eavning at a certain time, and then next morning wakes it up again. Is that possible with Macro Express?

  6. Hi,

     

    Before starting to try out myself and see if possible, I wanted to listen to you first and see if this backup task scenario could be accomplish with Macro Express?

     

    The goal is to have Acronis True Image to perform a backup, BUT only when a specific NAS-unit is present.

     

    This is because Acronis True Image cannot itself skip a scheduled backup if the specified target (NAS-drive) is not present. As the backup job will be performed from a laptop which is often on the "road", I would like to create a macro that checks the network to determind if a specific NAS-drive (and folder on this drive) is present, and if so, only then starts Acronis and have Acronis perform a "manual" backup instead. If the NAS-drive is not present (equals laptop is not connected to the office LAN), than Macro Express does nothing.

     

    So if you just could say yes or no, I will know if I should purchase another licence or not ;-)

     

    Thanks!

     

     

    Dag

  7. Thanks Terry,

     

    I did find the Help section on this command, the problem being that being a non-programmer, I do need a bit more in depth explanation... Sorry!

     

    So, I take it that the Switch-part determins which variable to examine in the following procedure???

     

    What I do not really understand is how this "Case: Sugar" should be expressed?

     

    I think I have the general grasp of the intention of the Switch/Case command, but in order to comprehend it all the way, I feel I am missing something!

     

    Regards,

     

     

    Dag

  8. Hi,

     

    I am trying to understand the case command, and I think that I with this command will be able to execute something like this:

     

    case:

     

    %T1% contains "sugar"

    : do this

     

    %T1% contains "pepper"

    : do that

     

    end case

     

    Now I have not found any examples of how to get about with the proper syntax, so I would appreciate if someone could help me pointing out some examples with case and how to do this when you want to check if a string contains this or that and then take appropriate action.

     

    Thanks!

  9. I have to trim and clean up bank statements that are copied to the Clip board, and also insert <TAB> to finally get the content to Excel.

    The problem is that each line in the bank statement is of variable length, for example:

     

     

    2010-01-25 Payment to such and such, ref: 3493 -3 456,00 12 345,05

    2010-01-26 Giro 345-345, Bill Gates -254,50 12090,55

     

     

    The first part of the line is easy, that's the date, but then comes a string with variable length. After that comes a space and then the actual amount beginning with a minus sign. The amount always contains a comma. And finally the accounts balance, which also always contains a comma.

    So I guess that I will have to read each line "backwards" until I can capture the transaction amount??? However I wonder if there are any built in string functions that could help me with this? Like getting the string lenght and getting the n:th character from the right, and finding characher X in a string, etc, etc

     

    As I am new to Macro Express I would be most happy if you can point me in any direction where I can find out more about how you construct macros of the above type!!!!

     

    Regards,

     

     

    Dag

×
×
  • Create New...