Jump to content
Macro Express Forums

Cory

Members
  • Posts

    4,207
  • Joined

  • Last visited

  • Days Won

    61

Posts posted by Cory

  1. 00000000h: EF BB BF 31 2C 44 61 77 6E 2C 41 2C 35 31 36 33 ; 1,Dawn,A,5163
    00000010h: 35 35 39 36 39 36 2C 24 31 33 31 2E 30 35 20 2C ; 559696,$131.05 ,
    00000020h: 30 2C 24 34 30 2E 30 30 20 2C 24 32 36 2E 32 31 ; 0,$40.00 ,$26.21
    00000030h: 20 0D 0A 32 2C 44 61 77 6E 2C 41 2C 35 31 36 33 ;  ..2,Dawn,A,5163
    00000040h: 35 35 39 36 39 36 2C 22 24 32 2C 39 33 33 2E 37 ; 559696,"$2,933.7
    00000050h: 34 20 22 2C 30 2C 24 34 30 2E 30 30 20 2C 24 35 ; 4 ",0,$40.00 ,$5
    00000060h: 38 36 2E 37 35 20 0D 0A                         ; 86.75 ..

    This is the Hex view showing all the bytes. Decoded characters at the right. This is not an ASCII file, it's UTF-8 with a BOM. See those three bytes () at the beginning? That's the BOM (byte order marker). You need to either save this as UTF-8 without BOM or ASCII/ANSI. I'm guessing you used Notepad, which used to be pure ASCII but a few years ago was upgraded to do UTF-8-BOM as default. I'm going to ask ISS to update MEP to handle UTF-8 with BOM. BTW, MEP doesn't do Unicode. 
    I also noticed that you have trailing spaces in many columns, E.G. "$131.05 ,". See the space between the five and the comma?
    Best to fix these in your source, but if not, you can delete the first three characters of the file in MEP and save. And you can use a trim command on the others with the trailing spaces. 

    If you save the file correctly, does it work?

  2. "The ASCII File Process is a powerful command that extracts data from text files, one line at a time. The values of each record are saved to variables for later use, such as inserting the extracted values into other applications. This is an efficient method for transferring data from one file to another." - Help

    Might be a problem with your data file. Post a sample and I'll check it for you quick. 
     

  3. My mistake. I left the slider all the way up. Annoying, it defaults to the top. Maybe somehting related to it not remembering the custom color. 

    If I close the dialog and go right back in, the custom colors persist. Saving doesn't make them vanish. Only when I close the scripting editor does it vanish. 
    I think you should report this as a bug. 

     2021-02-21_10-26-18.jpg.9bade176d5c4bec724eb49db11a5d828.jpg

  4. Thanks for reminding me of this feature, It can be handy. 

    I think I see what you mean. I defined a custom color and added it yo custom colors and it appeared below the basic colors. I closed out of everything saving the macro and restarted MEP. Now the custom color is missing. 

     

    Another thing seems wrong. Now when I pick from the palette, the values change at the right but the "Color|Solid" box always appears white. 

  5. There's no magic way to cast a date string to Date/Time. First I'd like to let you know dates are at the core level decimals. 1 = 1 day starting 1/1/1900. But you can also build a date using the method I Described above. Add years, months, days and so forth. Or you can create the values then cast them. First you should parse the string, I'm guessing using the spaces. Remove the commas. A 'Select Case' for the months. January = 1  month. Look at the Split command. That's how I'd start it. 

    However you could also do the math. That so many hours and minutes are fractions of a day. So if the hour is 12, then 12/24 = .5. You can build a decimal this way then create the DateTime variable by converting from decimal. 

  6. Many email applications support rules. Gmail even. I use Outlook. I would recommend a user exhaust every opportunity to use the program's capabilities before writing a macro. Since I use an application with this capability, I've never had to write a macro like this so I'll not be participating in your challenge. Just tossing this information out there because many don't realize they already have a way to do this natively. 

  7. "The ping command ignores protocols such as HTTP, HTTPS, FTP, or SMTP" Not exactly. As I stated clearly in a precious message, it it it's own protocol along side these. You can take a train, plane, or an automobile. They don't ignore the others, they're completely different methods of travel and have nothing to do with each other. So too are the protocols in TCP/IP. 

     

    Thanks for explaining the mistake in the help. Now it makes much more sense.

     

    I suggest that you suggest using an IP address to avoid failures associated with DNS lookups. One of the most useful principles of troubleshooting: K.I.S.S. 🙂

  8. Windows API and such: Correct. But the purpose of the timeout in the Windows Ping command is for network delays. A ping packet is sent and tries to route itself as any packet. It does a cost analysis and makes the best decision on the route. A ping is sent to one router to the next and to the next. TraceRoute shows this better. At each router the transmitting router waits a given period of time before giving up and sending the result of failure back. The user can specify how long to wait on each hop. This is the Ping timeout parameter. 

×
×
  • Create New...