Jump to content
Macro Express Forums

jsampsonyyyyy

Members
  • Posts

    49
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by jsampsonyyyyy

  1. Thanks - substituting Ctrl +x does the same thing.

    I am trying to write a macro to make the first letter of the last word typed uppercase.

     

    What I have is the script:

    <TEXT TYPE Action="0" Text="<CONTROL><ARROW LEFT>" _COMMENT="Cursor to start of last word"/>
    <DELAY Flags="\x01" Time="0.2"/>
    <TEXT TYPE Action="0" Text="<SHIFT><ARROW RIGHT> " _COMMENT="Select first character"/>
    <DELAY Flags="\x01" Time="0.2"/>
    <TEXT TYPE Action="0" Text="<CONTROL>x"/>
    <DELAY Flags="\x01" Time="0.5"/>
    <VARIABLE SET STRING Option="\x02" Destination="%lastWordFirstLetter%" NoEmbeddedVars="FALSE"/>
    <VARIABLE MODIFY STRING Option="\x0B" Destination="%lastWordFirstLetter%"/>
    <TEXT TYPE Action="0" Text="%lastWordFirstLetter%"/>
    <DELAY Flags="\x01" Time="0.2"/>
    <TEXT TYPE Action="0" Text="<CONTROL><ARROW RIGHT>" _COMMENT="Cursor to end"/>

     

    It all seems to work as expected except that the clipboard contents pasted in are what was there previously.
     

  2. If I set "text type" to type a string variable, where the string in the variable has an uppercase first letter, MEP may type the letter in lowercase on one occasion, or in uppercase on another occasion. This is Macro Express Pro v. 6.2.0.1 in Windows 10. To type a symbol on a number key such as "$" it seems to be necessary to have "shift key down" explicitly or the number will be typed, not the symbol. I have delays on both sides of the command to avoid clashes with previous or following commands.

  3. I have written a test macro which I attach here. The file being worked on is a simple text file of short lines and the intention is to display each line in a message box. However, at "Text File Begin Process" the above-mentioned error message occurs, "Undefined variable or the variable is the wrong type". This is despite "images" being set as a string variable of an array type. If there is an order in which I should set the macro up, what is it? If I need to edit it for debugging, how do I do that, or do I have to rewrite the macro from scratch for every bug? Does the error have something to do with the arrangement of percentage signs on the variable name?

    testFileProcess.mex

  4. If I open the Variables tab and "add" the variable there is an error "A variable with this name already exists". But if I run the macro there is an error "Undefined variable or the variable is the wrong type". As the variable exists (?) it must be the wrong type. If it should not be a string variable (for an array of strings) what type should it be? Or does it matter in what order I write the macro? In Basic or Python one can edit code freely before running it. Perhaps this is not so in Macro Express Pro.

  5. Sorry, I wasn't clear enough. In the explorer the File menu has an option "Export" which has an option "Output macro information". This opens a box with "Macro Information to Output" with tick boxes "Activation" etc. On clicking "OK" one can choose a filename and folder wherein to save the information as a text file. However, no comments are saved. There may be a way of making and exporting comments but I do not know of it. The comments I mean are what one might type in the "Notes" tab when making a macro, or what one might type in the "comments" tab in "text type", etc.

  6. Is there a way to export the comments in the macros to a text file? "Export" has "Output macro information" but comments in the macros are not included. One can give a clue what a macro does in the nickname but it would be useful to have the comments visible in one place. One can then see what one has and prune out obsolete macros etc.

  7. In the "Dialogs" section there is a procedure "Text Box Display" which puts up a text box to show console output from a Python program that my macro runs. When my macro ends, a text box comes up with nothing in it except an "OK" box to click on to close it. Is there a command to close the box automatically or not to show it if there is nothing in it?

  8. I am wondering if it is possible to delete the beginning of a string if it consists of a certain substring. E.g. if, and only if, the string begins with "Joe " then delete "Joe " leaving the rest of the string intact. I have found "replace" but that would remove "Joe " wherever it was in the string, not necessarily at the beginning.

  9. I have, and had, "##" in the Prefix Keys box. So I reverted back to a previous version of my .mex file to get rid of the problem. I had not realized that I already had a shortkey "pn" that gave text type "pneumo" which starts with "pn". I suspect that playback started with the trigger string so that there was a feedback effect. If so, then the playback of a shortkey macro must not start with its own trigger string or with the trigger string of an existing macro whose "text type" starts with the trigger string. I would have thought the prefix key would prevent feedback in this situation but it is late at night and I am probably not thinking straight.

  10. I created a macro with shortkey pn to give text type "protein". It entered "proteiproteiprotei..." and so on until I stopped it. I cannot find the macro in the list of macros so cannot edit or delete it. I have tried to upload the macro file but it fails. I am usipproteiniproteiniproteing Macro Express Pro 6.1.3.1 - while I was typiproteing this it produced the text you see. The behaviour is differeproteint iprotein differereproteint target programs.

×
×
  • Create New...