Jump to content
Macro Express Forums

Cory

Members
  • Posts

    4,207
  • Joined

  • Last visited

  • Days Won

    61

Everything posted by Cory

  1. What can it do? Just about anything you can do as long as it is in windows. Actually it can do a lot more. It's best if you just check out all the commands, there you will find that you can pick pixel colors and have logic that makes decisions just like a proper programming language. If you have a specific request we could help you but your request is like asking the car salesman where you can drive your new car.
  2. For more complex mathamatical calculations I will often will pop open Excel. Here I could have a predefined formula for really complex things or I can paste in a formula and get the results. I don't know how else I could do a beta probabliity density but BETADIST works well. Also in excel you can even define your own functions. Also if you gather data from some place and create a tab delimited file you can open that in Excel and use the variaous lookup functions. Excel can be a very useful slave....
  3. Dang, I tried that but it didn't work for me. I must have messed up in there somewhere. Interesting about null. Mathamatically null is nothing, devoid, empty. An empty set. I'll have to mind my words then when speaking in the programming world. Thanks for the edification!
  4. I want to stop a loop when there are no more records. Eventually one of the text var’s will be null but I can’t find an elegant way to determine this. We have all these comparisons in the If Variable command but the “Null” option is missing. <g> I tried “=” then left the value empty but that doesn’t work. Is there a trick I’m missing here? So far the best I can come up with is to count the number of characters and stick that in an integer var. Then do an If Variable N1 = 0 which works but seems like an extra step. Any ideas?
  5. Never mind. I see now the VEL won't work in this case. So I boned up on the Run Macro in Variable and that does the trick very well. I was just being dense and I wasn't understanding how it worked. Now I see it's very simple. This is basically my test bed and now all I need to do is to adapt this to my more complex macro. Cool trick! I like this RMiV. <TVAR2:10:01:5><TVAR2:11:01:25><TVAR2:12:01:80><REP3:01:000010:000001:00003:1:01:><TVAR2:04:01:<TMVAR2:06:%N1%:%N1%:000:000:>><RUNMACVAR:4><ENDREP>
  6. OK, continuing on from my last post…. I’m getting really frustrated, I spent all day on this and now when I thought I had a break thru it turns out it doesn’t work! Argggg….. Here’s a simple example. I read one line from a tab delimited file and write to T1 thru T10. All I do is do one iteration at a certain line number which seems an easy way to read from the file. Anyway I would like to convert each text value to a decimal value. The idea is to have a repeat with a counter N1. Then in the repeat do a convert string to decimal. I envisioned something like %T%N1%% in the text variable and %D%N1%% in the decimal box. But it’s only a stinkin’ dropdown box so I can’t use that! What good is this VEL if you can’t punch it in anywhere? I tried editing it in the direct editor but everything squirreled out when I typed in %N1%. So as soon as I thought I had a solution I’m back here at the wall. What I am doing is more complex but this should suffice as an example of my troubles. Any ideas?
  7. That's exactly what I did. <VSETMISC:T1:Preferences Registry Key><TVAR2:01:01:%T1%\AdvOptions\Variables Evaluation Level><REGRINT:1:%T1%><IFVAR2:2:01:3:2><IVAR2:01:01:2><REGWINT:1:%T1%><RELOADPREFS><ENDIF><CLEARVAR1:T:ALL><CLEARVAR1:N:ALL> Works pretty slick and only will ever do the reload once per machine. Now I have a new problem. How the heck do I use the nested variables? Everywhere I want to use them all I have is drop downs! I can’t type them in. Can change them in the direct editor?
  8. Kevin: Again, I searched for %T%N1%% and didn't find it on your site. Must be an ignored character in search engines. Another of those silly instances where I can't find something becasue I don't know what the proper term is for it. <g> Hmmm.... One could do a simple data matrix with this.... Again, do I need to reload preferences?
  9. Well that was exactly why I was asking. It appeared to be the only documented way of doing it. I'm very happy I won't have to learn this as I'm sure I could get myself in big trouble doing it! Thanks!
  10. Do I have to add a "Reload Macro Preferences" if I change this in a maro?
  11. Very good, thanks! You know I searched the message board for %T%N1%% but it didn't give me any hits. Oh well.
  12. Is there a way to, in effect, do a %T%N1%%? IOW have the number in the string variable increment? Specifically I’m dealing with a tab delimited file that comes form an Excel spreadsheet with a variable number of data columns. What I am doing is a little more complicated in actuality but I can distill it to a simpler example. Suppose I read in the first line from the text file. In the register I will have values in T1 thru some unknown number of strings. I want a repeat to check each of them in sequence to determine how many there are. So I was thinking that one could have a repeat and put the counter in %N1%. Then use that counter as the number part of the string variable. As soon as I encounter the first blank record I can subtract one form N1 and know how many columns there are. I tried a simple test using text type but the test prints out “%T1%%T2%%T3%...” instead of the text save in the string vars. I’ve scanned Joe’s book for it and also the forum here but I can’t find anything relevant. Probably because I don’t know what the proper terminology would be for this. Also maybe there’s a completely different way to approach this. This must be a common problem so there must be an elegant solution. For the moment I’ll use a limited ugly approach, hopefully one of you can help me cut it out later. Thanks!
  13. Is the idea of Run Macro in Variable to literally have a variable played literally as a line of the macro code? If not please explain. I read Joe's book on it and the help file but I'm thick. Also what would one want to use this for? Wouldn't "IF" statements work just as well?
  14. I still don’t understand your systems well enough to advise but I’ll see if I can help some more. One thing I want to tell you though. Please don’t get discouraged, this sounds like something that ME will work perfectly for. Stick with it and you will have a solution. We are just having difficulties communicating! First please describe the program that is running on your computer. Is it a terminal emulator, Telnet, or some GUI (Graphical User Interface) software? I have only ever heard of telnet or TEs being used on such systems but your message suggests that you are using a mouse to click an OK button. Please tell us which it is as this make a fundamental difference on how to approach the problem. I have an easy suggestion for you. Can you take a screen capture CTRL+PRNSCRN of the applications as well as the screen with the “OK” and post them here? Make sure not to have any sensitive information in there. This will save a lot of explanation on your part. While I wait for your response I want to take a stab at it again. If your system is presenting you with a GUI interface with Windows Common Controls things will be very easy. Again I don’t know how your program works but if something pops up with an OK button in it you can have ME wait for the control to appear before clicking OK. Or you can wait for a window to disappear before proceeding. To do smart timing you need some sort of test. When you do some action that might have a delay what can you have ME watch for to test if it’s done? Does the screen change any? Is there a box that pops up? If we could see a video of your system in action we could better advise. All I can do is speak in generalities. Here is one trick that might help. When I have two applications with possible timing problems I read all the information from one program and write it all to a file. Then I read the information from the program again writing to another file. Then I compare the two files line by line. If they do not agree I have it go back until it does! Then I go back and delete the records from the original system. If you are familiar with accounting you use this system to avoid errors in batches. Different data entry clerks enter the data in two batches and if the checksums don’t match there is an error within and it has to be done again. Now you could read in the data one entry at a time and compare but I think if there is a glitch in the network it’s likely you might read bad data twice that would pass comparison. Also I like to stay in one application and write everything to a CSV file then switch to the other program to enter the data. This avoids constantly switching back and forth which can cause timing problems. And of course if both have an error rate of N then switching back and forth raises the error rate to N squared. With my method the error rate is only N or, depending on how you do it, 2N. Hope this helps!
  15. Excellent. Good to know.
  16. Interesting. I have a project now I'm thinking of trying that out on. There was a guy asking about replacing all commas in a word document I replied to. I was wondering if one could read the entire file into a ME variable and do a sting replacement and write teh variable out ot a new file. I bet it would work.
  17. Don’t be offended, no one is making fun of you, jowensii is just agreeing with my joke. I do not know your exact situation so I speak in generalities, sorry. Let me see if I can give you a better explanation. The most important part of what you are trying to do it to have some way of determining if there is an error. ME will blindly keep firing at a program regardless of what is happening. So if you have it type information into a field and the program complains that the input is invalid ME will just keep typing. It has no way of seeing that error message. You need to devise some sort of test in order to see if something is going wrong. Problem is I am not familiar with your system so I can’t give you any good examples. But maybe a simple example would help me explain. Let’s say I command Notepad to open a file and type something. Now I would do a CTRL+O to get the open file dialog box. Once the dialog box is open I would enter the file name test.txt and hit enter. If test.txt exists then my macro will type “This is a test” and this would work. But let’s say test.txt does not exist. In this case an error dialog box pops up telling me that this file does not exist. But ME will just try typing because it can’t ‘see’ this dialog box. So in this case I would have a test after entering the file name to see if an error dialog window popped up. If it did I would pause the macro so the user could fix the situation or abort. When possible you should try to test first. In this case I would ask ME to check to see if the file exists and is ready. But I’m guessing you are in some sort of terminal emulation program so that would not apply to you. You first task is to think of how you can tell if something is wrong. Then you need to figure out how ME could test to see if things are working. If in your system you enter text into a form and the terminal emulator displays a message indicating it worked. Have ME do a text capture of the screen and test for this after every time. If it finds the string “Error” then you need to execute an abort. Wow, x3270. Now that goes back a ways. I’ve seen those in museums! Are you using Telnet? If you are you might consider having ME generate scripts and then run the scripts. This would eliminate many timing errors. If you are using a TE (terminal emulator) you might look for a TE that you can program. I used to write TE front ends for old Digital mainframe systems to run on Windows via serial interface and there are many you can program with hot buttons to do complex tasks and perform logical decisions. The benefit here is that it eliminates the flow control and timing problems. I used one called ProComm but I haven’t seen it for years. Give us some more info and maybe we can help more. Sorry I can’t be more specific. Good luck!
  18. FYI to make a counter increment you can simply do a Variable Modify Integer and choose the Increment option. Just a little more elegant than adding one to itself.
  19. Yeah but I need it to work like the ASCII file process where it would plow thru each line popping the vars in there. I was considering something like you suggest but I was unsure how I would parse it out. I guess I could pump them in there like you suggest then have a routine that would not only read the first value but also delete it so as it came to the next iteration it would take the next in line. Hmmmm.... Now that could work! And if I want to do an ASCII like process I could have one character as a field deliminator and another character as a record deliminator. In effect it would be a simple repeat but would be giiven another level of process by virtue of the pattern of deliminators. In fact you could have very complex patterns.... This would work! I'll call it a Langolier algorithm! Bah ha ha!
  20. Well that doesn't help much. But it sounds like I won't need to worry for what I am doing. I really need to get some time to read my book. I spent $50 on it and yet I haven't done any more than browse it.
  21. How much data can be stuffed into a string variable?
  22. I have a macro that will read a variable amount of variables in to be used later in the macro. At the moment I'm writing each record to a CSV or a simple text file then later doing a Text File Process or the ASCII File Process if it has more than one value per record. However when the macro is done I don't need it anymore and it needs to be deleted. It seems silly to write 48 names to a text file for a validation routine. In fact I normally accumulate them in one variable and then write that variable to file when I'm all done thus avoiding several writes. Is there a way to do this without writing to disk? I imagine something like an ASCII File Process but where you can make the target a variable instead of a file name.
  23. I want to import invoices into Quickbooks via their import file format but there is some of it I don't understand. Does anyone have experience with this? If you export invoices to their export file format you can take that to another machine and import it. I've looked at this file and it looks basically like a delimiter text file. However there is some header info a the top I can't decode. This would make it tons easier than using the QB interface. I know I have a coupe of programs for time tracking and such that can generate these files to import into QB so it couldn't be to difficult.
×
×
  • Create New...