Jump to content
Macro Express Forums

MakaPakaTobyHannah

Members
  • Content Count

    36
  • Joined

  • Last visited

Community Reputation

0 Neutral

About MakaPakaTobyHannah

  • Rank
    Member

Profile Information

  • Gender
    Male
  • Location
    London

Recent Profile Visitors

186 profile views
  1. Well... the MIDI input macro at this point is 868 lines of code... that was one of the most fiendishly difficult problems I ever had to solve; lots of sequencing simultaneously different points of the same array and fun stuff like that... due to the conventions of musical notation, the explicit nature of the MIDI code just cannot be translated directly into music notation code. The "text item entry" routine at this point consists of seven different macros, several of which are triggered by certain events. Total lines of code, in the aggreate, is several hundred, but that also contains a whole catalog of text items defined and referenced internally. But I have been using this now for two days, and it works like a charm. I don’t know why they can’t give us Multiple Choice windows where the choices are "formattable". In essence, I am using a text box as a multiple choice window. This is kind of daft...
  2. By the way, if it is of any interest... this turned out to be a major pickle, but I finally worked out all the kinks. For users of a different forum, I created a short video that illustrates how these macros operate. I use Macro Express extensively for working with a 16-bit MS-DOS application, that I run within DosBOX. Believe it or not, there are many people who do this... This video also shows a Macro Express macro that creates alpha-numeric input data from a MIDI input text string. Enjoy... Here is the link: https://youtu.be/FKRO_7hwk6o
  3. That’s why I append "&&THIS IS MY DOG&&" to the clipboard... I feel relative certain that I will never place that text string to the clipboard from any other source.... Anyway... I am actually quite amused at the absurdities of this challenge... but I’m almost there now!
  4. Yes, but Macro Stop is effective only for the macro that it is placed in; it cannot terminate another named macro. A lot of this is motivated by the fact that you cannot create multiple choice text boxes where the items are formatted by font. I want to be able quickly to select different text items whose text might be identical, but whose formatting is different. For instance: Allegro Allegro cresc. cresc. If you put this items into a multiple choice window, they all look the same. So you have to add some flags, like: Allegro <b> Allegro <bi> cresc. <r> cresc. <i> For longer lists, this soon becomes less than obvious. So I decided to pop these text items, formatted, into a text box. This text box is the last item in macro 1. Ctrl-Right clicking then activates macro 2. This one begins by double clicking on the item I control-right clicked in macro 1, copying that text string, and then closing the open window from macro 1. But I want the option to select more text items. So I need an IF statement to give me that option, of restarting macro 1. That works. But because macro 2 can then not continue, and thus not terminate, until the macro 1, that it called, is then terminated, the "Ctrl-Right click" activation cannot activate macro 2, as it is still active. I have now solved this problem (this is like Monty Python) by creating a text string in macro 2 that modifies a text string by appending "&&THIS IS MY DOG&&" and copying that text string to the clipboard. macro 3 (!!! YES!!!) has as an activation that when the clipboard contains "&&THIS IS MY DOG&&", it executes. This allows macro 2 to terminate, and I can refer back to macro 1 from macro 3. And now, I can "Ctrl-right click" again in my text box of macro 1... I have had to resort to subsidiary macros like that a few times in the past, but have never had to resort to three macros to get the effect that I need. I wish that Macro Express would, at some point, include the possibility to create Multiple Choice windows that display formatted text strings, and that will allow mixing radio buttons and check boxes. I know you can run external scripts (like AutoIT) to effect this, but I am not sufficiently versed in that.
  5. Is there a way to terminate a macro from within another macro? I have a macro (macro 1) that, as its last item, displays a text box. Control-right clicking on an item in that text box triggers another macro (macro 2), the "Control-right click" being the trigger for that macro. Part of macro 2 includes closing the text box of macro 1, which, being the last item in macro 1, thereby effectively terminates macro 1. When macro 2 is finished with its process, I would like to present an option, asking in essence, "do you want to run macro 1 again?" The only way I know of doing that is by inserting a "Macro Run" command at that point in macro 2. This does go back to running macro 1 again from the beginning, but the problem is that, when that final text box of macro 1 once again appears, the "Control-right click" trigger for macro 2 is now ineffective, as macro 2 will terminate only once macro 1 has terminated. Hm... going around in circles with this one.
  6. Yes, that option is checked. Cory, I don’t want to waste your time... I suspect there is a logical flaw in my script(s). For now, it appears that my "trim" command, though a klutz, has fixed this particular problem. Thank you, as always.
  7. Next... I am working on a complicated macro, that’s basically parsing text strings in many different ways. One procedure became too complicated in the main macro. So I first constructed it in a macro by itself, and I finally got everything to work in that. It proceeded by my "hard-wiring" a string variable. Then I proceeded testing the new procedure by calling the new macro from my main macro, passing the same string variable to my new macro from the main macro, the one I had hard-wired for constructing the sub macro. One crucial part of the sub-macro is a "Variable Modify String" command whereby part of the text is deleted, from Starting Position 2, up to 99 characters in length. This works perfectly in the sub-macro, if I run it by itself with the hard-wired text string to begin with. But when I comment out the hard-wired text string, and instead pass the identical string variable from the main macro to the sub-macro, the process fails. I cannot figure out why. I’ve checked to see what the length of the text string is that Macro Express thinks it is, before the text deletion. When run by itself, the sub-macro returns "1". But when called by the main macro, the sub-macro then returns "2," even though the string is only one character long. I’m not posting anything here script-wise yet, as the whole thing is very convoluted. Just out of curiosity, though: are there some pitfalls I need to consider? I have analyzed and re-analyzed this, and I cannot see why calling the sub macro from the main macro should cause this problem. ADDENDUM: as a desperation move, I just inserted at "trim" modification on the offending text string (the fact that the string length reported being 2 characters long, though only one was visible, led me to investigate). This has now fixed the problem. The remaining mystery, however, is why that string has an added space character, when called from the main macro, but not when called within the sub-macro itself. I just don’t have the energy to troubleshoot this further... but if someone has an idea of the pitfalls, I’d like to hear it. Otherwise... just ignore this post. Cheers!
  8. That’s a good idea. One would have to know which character in the string to look for. The strings can have different numbers of characters (including letters and digits) occurring anywhere in the string. With the IF statement you constructed, one can examine only one character at a time; so you’d have to step through each character of the string in succession (with a procedure to determine when the end of the string is reached). That’s doable. My approach is more of a brute force solution, but it permits examining the entire text string at once to see if anywhere in the string is any letter at all. So "9y3" would be identified immediately. Thanks for all the good ideas!
  9. That’s interesting to know; I will keep that in mind. Here, it’s a non issue, as there won’t be any strings containing more than two digits (by the way, this is music input code manipulation...) acantor’s looping script may well be the most efficacious way of getting the information I need with respect to checking for the presence of digits. A positive result, however, only reveals that digits are present; it does not indicate whether there are digits only, or a mixture of digits and letters. I need to perform manipulations on those items of the array that contain only digits. I really appreciate the constructive feedback! rberg, if that "ingenious solution" should pop into your head... I’ll be happy to find out about it. I dreamed of a solution to my code the other night. When I awoke, that solution was not re-constructible... 😉 Too bad one cannot construct a loop like acantor’s digit loop for all the letters of the alphabet (there is no secret "increment" way of cycling through all letters, is there?). And more thinking out loud... perhaps, at the beginning, like "declarations," one could "hardwire" an array, with each consecutive item of the array assigned the next letter in the alphabet, like: Variable Set String %checkIfLetter[1]% "a" Variable Set String %checkIfLetter[2]% "b" Variable Set String %checkIfLetter[3]% "c" etc. etc. up to "z" One could then cycle through the items in the array: Variable Set String %x%: Prompt Variable Set Integer %counter% to 1 Repeat Until %checkIfLetter[%counter%]% Equals "z" If Variable %x% Contains "%checkIfLetter[%counter%]%" Text Box Display: "%x%" contains letters Macro Stop End If Variable Modify Integer %counter%: IncrementEnd Repeat Text Box Display: "%x%" does NOT contain letters Just thinking...
  10. I was afraid there wouldn’t be a straightforward approach. Thanks for the tips. For now, I have coded as follows: The string variable I need to check is %pitchesAndRests[%counterPlusOne%]%. I convert it to an integer and then compare the integer to the string. If they are identical, then I know that the string item consists of digits only. Conversely, if they were not identical, I would know that there are other characters, but I would not know if there is a mixture of numbers and letters. I know I could solve this in an "annoying" way... was just hopeful that some of the brilliant people here might have an ingenious solution that I can’t see... Thanks again, everyone!
  11. Hm... how would I evaluate each character and get it to return a value representing the type? It seems like this shouldn’t be hard. I discovered that if I convert a string to an integer, for instance: "1cd" the integer returns "1", i.e. stripping out the letters. I could then check if the integer variable equals the text variable - where that is the case, I know that the text item contains only numbers... As I am typing this it makes me wonder... as converting "1cd" to an integer yields "1" I then know that the string does not contain only digits. That’s fine as far as it goes. But it wouldn’t tell me, for instance, if the text string contains only letters. For instance, converting "0abc" and "abc" to an integer yields "0" in both cases. But one text string contains only letters, the other one also contains a zero.
  12. A text string array can contain items consisting only of letters, or of letters and digits, or of digits only. Example: 33e re 33e r BARLINE 33e 30q 8ts[[ 9ts 8]] BARLINE 6[ 8 30[ 33]] BARLINE 31[ 9] rq BARLINE 34e re 34e r BARLINE 34e 31q 9ts[[ 30ts 9]] BARLINE Stepping through each text item of this array for evaluation is not the issue. The question is: How can I quickly ascertain if an element contains number(s) only? Or whether an element contains letters only (i.e. no special characters, such as "[" ).
  13. Yes, nothing in Spam. I opened an smtp-pulse account, no luck yet, Cory, but will try to work this out. If it works for you, it should work for me. This would be quite cool... thanks for staying engaged! I’ll update the thread, as (and if) i make progress.
  14. Thanks for the feedback so far. I am trying SMTP-Pulse at the moment; so far, no success... My aim is a simple one: I have one particular macro that works with a 16-bit DOS program (yes!), running in DOSBox, that processes any number of files in succession, but depends on keyboard input being piped into the program. For this reason, when this macro runs, my computer is captive; I can’t work on anything else, as the next keyboard input string then would not properly pipe into the DOS program when the macro executes the next iteration. So I tend to go off and do something else (coffee break - whatever). I would like ME to notify me by email when the process is completed. It’s cute, I know... but still, I’d like to get this to work. Thanks to Cory (as always) and rberg. If I find a solution, I’ll post again. Or if anybody else knows something, I’d love to find out. Cheers.
×
×
  • Create New...