Jump to content
Macro Express Forums

randallf

Members
  • Posts

    81
  • Joined

  • Last visited

Everything posted by randallf

  1. Interesting point you bring up, my company happens to own an ME3 license so that's what I use for making this stuff that's intended for production, (all of this btw is just automating my normal job, (making it easier/faster so that I have more time to write macros to make it easier and er... how am I winning in this scenario?) only recently have I been concerned about disseminating it to others) but it's seriously lacking. Obviously ME PRO would be way better however we don't own that license. I think it really sucks how they did 3/pro but maybe that's just because I'm suffering for it and have no control over it. I could buy pro myself but why would I want to do that when I will become the only one that can use those macros? I must say however that while I knew BASIC pretty well before as well as how to use most of those same functions in PHP (and html/unix/bash/CMD scripting experience), but I was by no means a programmer. ME3 seems to have kindof edged me into that world, I might be far better prepared to use something like VB in the future... Also, for better or worse ME3/PRO is PERFECTLY suited to the environment in which we use it... it's a requirement here to have it installed... though I digress, my point is that I feel so severely limited by ME3 at times and it really SUXXXORZ (for me). Though I must admit, at any rate, I love writing macros. I just do. Thanks for the replies guys, always appreciate the help and feedback.
  2. The documentation in the program states: Switch (T1) Case: Found Text Box Display: T1 contains Found End Case Case: Done Case: Finished Case: Completed Text Box Display: The comparison is done End Case End Switch This seems to imply the 'contains' condition seen throughout the IF VARIABLE statements. Ok then. From "Macro Express Explained" The "Case" command compares for exact equality and is case sensitive. There is no Case command for "less than","greater than", or anything else other than "equals". Which is correct? It seems that the second statement is the correct one, as none of the CASE stuff I'm putting together works right... I have some really long and complicated IF CONTAINS THEN stuff and I really would rather use CASE.... is there a way to hack it?
  3. Cool, I'd love to see what you come up with, I can help you write it all out if necessary.
  4. Simply put, Save your song to a text file and run something like Text File Begin Process Songs.txt Text Type: %T1% Text File End Process this will process each line of the text file and return it one by one to %T1% and type it out in text If you want you can set a delay, too, Text File Begin Process Songs.txt Text Type: %T1% Delay .5 seconds Text File End Process You could also add a menu, Variable set integer %N1% from prompt Text File Begin Process Songs.txt Text Type: %T1% Delay %N1% seconds (might have to use an integer here instead, or a string) Text File End Process And further menus to choose the files, etc... have fun Also there's an option in text file begin process where you can set the line that it starts at to an integer... you could have a menu that lets you choose a song, then sets this integer to the begining point of that song (line number in the file), then processes so many lines (however long the song is). That way you only have to add the song to a text file, count the lines and add it to the menu to have a whole new song to play. You could even use IF statements to detect the starts and finishes, set that variable from a menu, scan for it, and end processing when you find the end... just by adding a breaker between the songs. Fun times!
  5. So I guess this works: <TVAR2:01:01:ANNOYING SYNTAX><REGCREATE:HKEY_CLASSES_ROOT\rand\><REGWSTR:1:HKEY_CLASSES_ROOT\rand\test><REGRSTR:2:HKEY_CLASSES_ROOT\rand\test><TBOX4:T:1:CenterCenter000278000200:000:%T2% > Variable Set String %T1% "ANNOYING SYNTAX" Create Registry Key: "rand" Write Registry String: "test" Read Registry String: "test" Text Box Display:
  6. I understand this now, but it took me a while to figure it out... the documentation (for this!) in 3.whateverIamusing is not great Well maybe I thought I did. Can anyone link to a good thread on this?
  7. The problem is that you are using a conditional statement at the front of the loop and then a bunch of commands. Think like the program here, you need to nest things correctly. There is a logical order to it all and whatever you want to repeat needs to be nested, from what I can tell you want something to fire when n1 and n2 are no longer the same color, and have it run this check constantly. Repeat until is a nested statement just like If/End If, a simple repeat loop is like this: Repeat _UNTIL_ n1 > n2 Variable set integer n2 = 10 Variable modify integer n1 = n1 + 1 Repeat _END_ Text type: repeat ended Now, this loop will just continue to run forever until it satisfies the initial repeat requirement, i.e. N1 is 11 and it will return to the next part of the macro, the text type command, so, if you want something to repeat UNTIL something changes, and then stop, and then do something, but keep doing all of that forever, you will have to nest repeats... your sequential ordering needs to be more like this: >REPEAT UNTIL N99 <> N99 (repeat everything nested in here FOREVER as N99 won't ever not equal itself, or add your own other condition to stop it) >>Repeat Until %N1% <> %N2% >>>Get Pixel: Screen Coords: 324,170 into %N1% >>>Get Pixel: Screen Coords: 324,170 into %N2% >>Repeat End >MACRO RUN: HEAL >REPEAT END And so we have two nested repeat statements, one that runs the inner repeat forever, and the inner one which runs our other macro. I have never tried to run macros from other macros before, but failing that it doesn't work right in nested repeats, you can just put your other code in instead of macro run: heal... Hope this helps Rand Edit: something topologically more like this is probably faster (twice, in fact) but I'm not sure how necessary that is.... >REPEAT UNTIL N99 <> N99 (repeat everything nested in here FOREVER as N99 won't ever not equal itself, or add your own other condition to stop it) >Get Pixel: Screen Coords: 324,170 into %N2% >>Repeat Until %N1% <> %N2% >>>Get Pixel: Screen Coords: 324,170 into %N1% >>Repeat End >MACRO RUN: HEAL >REPEAT END
  8. I've got to be using the commands in the wrong way entirely... can anyone help me out with how registry functions work? I just want to store some very basic string and integer data in the registry and call it back later on when the macro is run again....... H4lp! thanks!!! <code removed>
  9. The holy grail of list processing is mine. ph33r the nested one line ascii file parsed from a larger text file... Wait for File Ready: "SPECmainlist.txt" Text File Begin Process: "SPECmainlist.txt" Variable Modify String: Save %T1% to Text File Wait for File Ready: "SPECprocessor.txt" ASCII File Begin Process: "SPECprocessor.txt" (Tab Delimited Text ) Text Box Display: TESTER 1 ASCII File End Process Text File End Process <WFREADY:000010:000000:000000c:\SPECmainlist.txt><BTFBEG:001:000001:000000:c:\SPECmainlist.txt><TMVAR2:17:01:00:000:000:c:\SPECprocessor.txtF><WFREADY:000010:000000:000000c:\SPECprocessor.txt><ADFBEG:F11:001:000001:000000:c:\SPECprocessor.txt><TBOX4:T:1:Center000382000278000453:000:TESTER 1OUTPUTS TEST 1 %T1% 2 %T2% 3 %T3% 4 %T4% 5 %T5% 6 %T6% 7 %T7% 8 %T8% 9 %T9% ><ADFEND><BTFEND> Thoughts? I remember someone having problems with nesting this a while ago but with tab-delimited data it seems to work just fine.
  10. Yes sir I just found it thank you also nice to know how those work in tandem, CRLF that is, as I'd never seen it before (stands to reason)... thanks much!
  11. I tried Variable Set %T69% to ASCII Char of 10 Variable Modify String: Append %T23% to Text File Variable Modify String: Append %T69% to Text File But I just end up with ASCII chars inbetween in the .txt file... I tried ASCII 13 as well and nothing seems to work... How do I put a CR/LF in there that 'notepad' will recognize?
  12. Hello, Can anyone help me with how to put an 'enter' or CR in a text file after something like Variable Modify String: Append %T23% to Text File THANKS! To clarify my looped appends look like this STUFF - 12345STUFF - 12345STUFF - 12345STUFF - 12345STUFF - 12345STUFF - 12345STUFF - 12345STUFF - 12345 And I want this STUFF - 12345 STUFF - 12345 STUFF - 12345 STUFF - 12345 STUFF - 12345 STUFF - 12345
  13. To clarify, the reason perhaps that I am encountering problems with this and others may not is that I am using things like Clipboard copy (from like, an excel cell or a 'blank' line (which might have a CR/LF on it) Set String If string ="" So my strings just might not be totally blank. The solution presented solves the problem, except when using text file process because you can't cram it all into the loop (it would just overwrite the variable and front-end declaration would only work for the first line). In these I have to use strip cr/lf and trim on the variables to get them to work where if string ="" is required.
  14. Hah, got it! this works: Text File Begin Process: "listref.txt" Variable Modify String: Strip CR/LF from %T1% Variable Modify String: Trim %T1% If Variable %T1% <> "" Text Box Display: tester End If Text File End Process
  15. Awesome! THANK YOU! I am now stuck here: <BTFBEG:001:000001:000000:c:\lister.txt><IFVAR2:1:01:2:><TBOX4:T:1:CenterCenter000278000200:000:testerT1: %T1% T2: %T2%><ENDIF><BTFEND> Text File Begin Process: "lister.txt" If Variable %T1% <> "" Text Box Display: tester End If Text File End Process I am trying to get it to not process T1 when it is blank, to just skip it and go to the next line as (unavoidably) the source data that the macro copies contains CR's or blank lines. See what I'm getting at? I can't just declare it up front because it changes each time (i.e. data is written by the text file process into T1 so setting it up front doesn't help and setting it within the loop to a null "1" value will just leave it at that value if set within the loop because the start of the loop process is what sets T1!!!) and setting the variable within the text file process doesn't work. H4lp!!
  16. Hello! Does anyone know if it's possible to write the data from a variable into a text file to then use with text file process, or do I have to open notepad/paste/save? I want to do something like, Clipboard copy Set string from clipboard Write string to text file Process entries from text file one by one Thanks!
  17. You can indeed set the 'scope' of a macro to a particular program but it is not possible to run two macros at the same time in two different programs. Macro express sortof 'hijacks' windows and enters commands just like you would, it is a 'windows automation' tool that takes over control of the desktop and issues commands for you. You could schedule one to run after the other, however. As for licensing I was once told I had to have a copy for every computer that I use it on but someone may wish to clarify this.
  18. By default this is 'scroll lock' + 'pause|break' but you can change this at options > preferences > playback. I changed mine to just pause|break because I hate having my scroll lock state toggled all the time.
  19. As a note I have to use tab delimited because people use commas in comments. Frustrating but works just as well, or at least for this purpose. Luckily I have different formats available for my source data.
  20. HAH this has some interesting applications for sure... you just showed us how to detect activity without the user knowing (unless they know the macro is running). Macro activated by "k" Text type: k Whatever you want to do
  21. Good point, thanks kevin. I'll just have to get back in the habit of front-end declaration when I need this feature.
  22. I've had a few problems trying to detect if a variable has a null value. I've tried If string = "" but this doesn't seem to be reliable. Is there an easy way in me3 to tell if a variable has not been assigned a value? How do I strip the value from a particular variable to make it null?
  23. Again HAH... so easy! Thanks everyone! Text Type: <ALTD>f<ALTU>v Text Type: c:\macro temp\csv.csv Text Type: <TAB>c<TAB><SPACE> Wait for File Ready: "csv.csv" ASCII File Begin Process: "csv.csv" (Comma Delimited Text ) Text Box Display: tester ASCII File End Process Delete File or Files: "csv.csv" <TEXTTYPE:<ALTD>f<ALTU>v><TEXTTYPE:c:\macro temp\csv.csv><TEXTTYPE:<TAB>c<TAB><SPACE>><WFREADY:000010:000000:000000c:\macro temp\csv.csv><ADFBEG:F10:001:000002:000000:C:\Macro Temp\csv.csv><TBOX4:T:1:CenterCenter000278000200:000:testerT1 %T1% T2 %T2% T3 %T3% T4 %T4% T5 %T5% T6 %T6% T7 %T7% T8 %T8% T9 %T9% T10 %T10% T11 %T11% T12 %T12% T13 %T13% T14 %T14% T15 %T15% T16 %T16% T17 %T17% ><ADFEND><DOFILE:08:NN:C:\Macro Temp\csv.csv>>
  24. It does, anything that is bouncded by the ------ box is 'cursor position' when tabbing, this includes things within programs that you can tab through that way, it was quite a blessing to discover this... though I see now why you don't think that would work here for the highlighting stuff. It may be possible to somehow use pixel detection in loops to scan the lines of the page for the highlight color, mark the starts and ends of the highlighting and then drag the mouse from one position to another, however this would only work if the highlighted text was all on the same screen and you didn't have to scroll. (or would be 100x more complex if that's the case)
  25. HAH! I had no idea that ascii file process had CSV in it... going to be a huge help. I know what you mean by text box displays, I use those all the time to test things out and show me how the var's are moving along. Thanks for pointing me in the right direction!!! I think this nearly completes my basic knowledge of ME... maybe not my skill in writing things or using it but I've touched nearly everything now in some form or other and written hundreds of macros, what a great program this is... I probably literally don't have CTS because of MEX. I wish I could get a job doing this
×
×
  • Create New...