Jump to content
Macro Express Forums

pferris

Members
  • Posts

    31
  • Joined

  • Last visited

Contact Methods

  • Website URL
    https://www.peteferrisphoto.com/
  • ICQ
    0

Profile Information

  • Gender
    Male
  • Location
    Oooooklahooomaa!

pferris's Achievements

Rookie

Rookie (2/14)

  • Reacting Well Rare
  • First Post Rare
  • Collaborator Rare
  • Conversation Starter Rare
  • Week One Done Rare

Recent Badges

0

Reputation

  1. Cory, I'm with ya... just detecting email address 'valid format' is fairly straightforward, but checking validity is something else. Pythonesque regex - IIRC - might be something like [a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+ But thinking about it, even that is way primitive. And, as you aptly pointed out - that's not even minding TLD's or subs, etc.; just something that pretends to pass the sniff test. I'd probably extract them off into a file then try to validate. But I don't see even the beginning of it happening in ~60 lines of MEP code. In the old days (of the 80's), I probably I could've even gotten frisky and validated things by a telnet connection to port 25 before actually sending the message. I don't know about these days - I expect it'd be blocked to avoid the spammer relays, etc. But then again, who knows? I'd have expected the MGM Grand not to be a victim of a ransomware attack, but here we are. I don't do much regex or Python anymore (retired from IT 2 years ago) other than for my own pleasure, and I'm still knocking the rust off of my MEP skills (I used to be fairly sharp, but it's definitely a "use it or lose it" thing with me!). But trying to email doing a serious email address extraction WITHOUT regex just doesn't sound like fun (because we all know how much fun regex is, right?). As was alluded to -to me, this would be like "Build me a house, but you can't use anything from that DEWALT, Makita, or Milwaukee stocked tool trailer of yours. Just this coping saw, a box of nails and this slightly used 1000 grit sandpaper I found blowing down the street. " I haven't played with (yet?) it but I think I heard that Excel can incorporate Python now (anyone know if that's current or just coming). If that's true, I could envision a viable solution there more easily than MEP. I probably would pass if this challenge were presented to me from a potential client.
  2. Thanks, that was essentially my issue. A few others but it's all small stuff from here on out! Thanks for the screenshot - this is in line with what Cory pointed out. JATO ignited.
  3. Cory, I probably committed numerous sins with the array definition... Checking it later tonight! Thanks for the insight! --Pete
  4. Thanks, Cory, I appreciate the rapid response. I will check out your suggestions and the links (eager to read!). Things are slowly coming back to me. Pro tip: Never get old and/or medicated! JATO start appreciated... Cleared for takeoff... --Pete
  5. After ~40 years in Fortune 500 IT, I'm now retired and pursuing a hobby of photography! PPA Certified Professional Photographer. ~13 years experience with Macro Express Pro.  Thanks for looking at my profile. 

  6. Hi All, Been a minute (ok, years?!) since I posted anything here. Usually, I can spot my errors the 2nd or 3rd time around... but this is eating my lunch. And, to be honest, it's been a couple years since I really tore into MEP (updated to current version). Running Windows 11. A little background: So I have a list of street, city, state, zip codes, that I'm preparing a mailing list for. I'm also going to a website to look up the resident name that lives at the specific address for the specific record I want. The sample INPUT .CSV looks like: (Sorry about the crappy formatting/justication here - but it's a legit .CSV). (Data sanitized for the protection of the innocent!) Name: Number: Street Text: Text Joined: City: State: Zip: Comments: 27541 E 121st St S 27541 E 121st St S XXXXX XX XXXXX 27554 E 121st St S 27554 E 121st St S XXXXX XX XXXXX 27730 E 121st St S 27730 E 121st St S XXXXX XX XXXXX 27756 E 121st St S 27756 E 121st St S XXXXX XX XXXXX 27856 E 121st St S 27856 E 121st St S XXXXX XX XXXXX Note: The first field (Name) is empty (that'll hopefully get filled in as a result of the query). There are a few websites you can do free name/address lookups on; e.g.: Melissa.com, Fast People Search, etc. But when I run the code, I get an "Array too small" in these lines of code. It fails (errors) on the ASCII FILE BEGIN PROCESS line. I've tried some different options (clearing, not clearing array, etc.). Is the NAME field being empty/null a problem? I thought I could "index" it to start with the "Text Joined" field (Field #4 = Index #4?), and begin processing on record #2 (to avoid processing the header row, right?). Street Text looks like a complete street address. It isn't. It's only the "E 121st St S" portion, and "Number" is just that - that actual address number. Long story but this makes for much more rapid data entry. Yes, there are reasons why the street data is initially broken up like this and then concatenated into a legit street address. <LABEL Name="Begin Lookup"/> <LABEL Name="Begin File Read" _COMMENT="Start the file read. Reads one record at a time."/> <DELAY Flags="\x01" Time="1"/> <ASCII FILE BEGIN PROCESS Filename="C:\\Users\\pffer\\OneDrive\\Desktop\\INPUT FS Test Data For MEX.csv" Format="CSV" Start_Record="3" Process_All="TRUE" Records="1" Variable="%ReadFromFPS_CSVFile%" Start_Index="4" Parse_Blank_Lines="FALSE" Clear_Array="FALSE" _COMMENT="Read the file..."/> While I'm at it... does anyone foresee any issue writing the name I extract back into this same file? Or should I just write to a new text / CSV file. End game: Legit USPS address labels my Dymo printer - for a non-profit organization (I'm doing this on my own dime for them, so there's that, LOL!). Hopefully, this makes sense. Let me know if you have any thoughts on the "Array Too Small" message or any other tips. Thanks for any hints, tips, etc. --Pete P.S.: I should add: The webpage in question (https://lookups.melissa.com/home/personator/) doesn't use / like "Controls".
  7. Hi Cory, Thanks much! Nailed it. Case closed! Still not sure how the clipboard was getting that delay value text instead of the desired info - but if I've learned nothing else in 30+ years in IT, it's that sometimes it doesn't pay to play "Data Detective". I'm not sure it was getting the value from the code itself or where - but that makes the most sense, but I'm puzzled since the macro window was minimized at the time. But moving on... YES!! Use of "GET CONTROL", "SET FOCUS" and "TEXT TYPE" for the win! Unfortunately the exact field of the webform doesn't have a unique control value, I can TAB from the first field to where I need to get. I could use X,Y coords but I think this will be more consistent if the window should ever be moved slightly, etc. Thanks for putting me on the scent! Greatly appreciate your help! --Pete
  8. Howdy, Background: I used to very fluent in coding MEP. But now it's been 3-4 years since I had to do anything serious with it. Now I need to. By now, I probably could have manually completed this, but as the OCD and stubborn among us know, "that's not the point"! Macro Express Pro has grown and evolved a bit since then. Problem: So I'm trying to copy data from a (Excel) CSV file in to a web page - it's just simple street address data (e.g.: "1313 Mockingbird Lane". I have maybe 30 records. I use a "ASCII File Begin Process" to read the CSV 1 record at a time. I have a check in my macro to display the contents of the clipboard. So far, so good. I see the first address contents. Looks good. BUT! When I do a "Clipboard Paste" OR "Type Clipboard Text" in the desired webpage field, I get something bizarre. Here is what I get, regardless of the true contents of the clipboard. Here's what's getting pasted: "<DELAY Flags="\x02" Time="500"/>" (No quotes). Interestingly, I do have a 500ms delay before and after the actual paste command. So it appears as if the macro instruction itself is getting pasted in to the web form instead of the clipboard contents. Any guess why this is happening? Any help, hints, tips, etc; are appreciated. A quick search of the MEP knowledge base and Google didn't turn up anything useful, but I may've been using weak search terms or something. Many Thanks, --Pete
  9. Thanks guys, that explains everything perfectly!! And Alan gave me an alternative solution to mouse co-ords. I appreciate the info & education! --Pete
  10. It's been a while since I've started a topic here (had a long spell where I had forgotten password, the account wasn't easily recovered, etc.). Anyhey, here I am! %^} Am I correct that if I use the Control locator utility and it doesn't highlight the intended control area with a thick black border that it {the intended control area} really isn't a usable control? I guess I'm curious to know, what caused their demise? Or perhaps I misunderstand the use of the locator utility. Just for fun, I went to about 15 major web pages (Google and misc Fortune 500 web sites)... of those visited none, 0, zip, nadda seem to have usable controls. For lack of controls, I guess I'm forced to use X,Y mouse co-ords. I was hoping for a more precise / "sure fire" technique. My immediate and recurring goal, by the way, is to fill in web forms / surveys and the like. I know there are things like RoboForm, etc; but I haven't seen one yet that can pull a random comment from a text file and paste it in the form (usually under a comments section, etc.) the way MEP can! Comments appreciated! --Pete
  11. Personally, I prefer Edit Pad Pro over UltraEdit...For clipboard storage / etc; I use ClipX.
  12. I entirely agree. Until now I've been 'too lazy' (read: project deadline / requirements wouldn't permit me the leisure to stop and learn controls to my satisfaction, so I 'worked around' it some other way - albeit a cobble!) to take up mastering Windows controls in MEP. I don't have any other pressure on this task other than what I place on myself. It's do it manually or I'll be a hero with a macro. So I'll try to take some time this weekend, I guess, and learn some control stuff. I know, at one point at least, it was my impression that MEP explanation was, umm, "lacking" on examples & specific info, etc; Spot on point, however, in this case - and within our domain, the "computer name" is the PC's serial number + a 3 letter corp suffice. So if there's more than ONE return for the search on the domain then "Houston, we have a problem!" (and I mean other than with my Macro!). Still, it COULD happen, I suppose. Your point is good food for thought. Yeah, I'm painfully aware of the Citrix is a mirage effect as regards MEP. Fortunately any MEP / Citrix stuff is a back burner issue compared to the more pressing tasks in AD (confused? I understand - I co-admin 2 domains - 1 "live" off my PC and the other is the Citrix managed one. My upcoming project is in the 'real' AD session on my local PC. These are all excellent points and I'll try to file them away in my MEP gray matter storage... Subject to retrival errors... I've only recently even played briefly in PS. I heard of it a couple months ago when I was taking a MS cert course in Windows 7 Admin. It sure looks cool. The instructor got off on it. I sat next to one of our Windows Admin guys (a partial paygrade above me! ;-)) and asked hom a little bit about it. It definetly sounds worth investigating. Time for "PowweShell For Dummies" I guess!! I just thought I might not be able to master it quick enough to help here. So many projects... so little time (at least that I'd get paid for! LOL!). Cory, I dunno if you're old enough to remember Artie Johnson from "Rowan and Martin's Laugh In" - but I want to say "V-e-e-e-r-r-r-y I-n-n-n-t-e-r-e-s-t-i-n-g!!!" I'll be looking at that along the way - if not for this project, then a future one. If you don't mind, Cory, I might drop you a line - and/or - continue the thread here - if / as I run into snags. I genuinely appreciate you taking the time to salt me with a few hints, tips, thoughts... Kind Regards, --Pete
  13. Good Morning, Afternoon and Evening, Just curious on a few points: Wondering if anyone here has any experience using MEP with AD. Specifically: 1) Just out of curiousity, what have you done with AD & MEP? (I also do a lot of standard password resets, unlocks, etc. Need to automate this - that's on my 'back burner' list). 2) Does AD use / respect Windows controls? Here's the deal: (Some of this is just me "talking out loud" - sorry 'bout that! This whole process was dumped in my lap a few hours ago - but it WILL happen, so I need a plan...) We have a tsunami of of "tickets" (work orders) coming to our group. These will arive via email with a hyperlink in the email to the ticket. The ticket is pre-crafted... The ONLY difference between any one of these tickets and the next relevant one is the timestamp of creation date, and the PC name itself - typically in the form "1234567-abc". All that needs to be done is: Go to AD, Search "Compters" on the domain, Once the PC is found, right click on it, check the properties. And add membership for a SCCM script. Pretty simple. Right now it's strictly a manual operation - 4 guys dealing with maybe 10 of these (each guy) a day. Takes maybe 1-2 minutes per guy to do one. But I know MEP could do it in probably 5 seconds or less. But that's just soon we'll each probably have 40-50 of these tickets a day. So I asked #2 - about AD using Windows controls - because this may be a good opportunity to introduce the company I work for to MEP! ;-) Ideally, I'm thinking, rather than mail these tickets to any one of 4 guys (these are genuine IT tech guys, smarter than your average service desk guys, these guys are pretty sharp and give in-depth support to over 300 in-house apps in addition to all the usual MS Office, AD, VPN, Citrix questions, etc; to over 5,000 users - another reason to free them from this mundane chore!) - we could have the email sent to me (rather than all 4 support specialists). I could do a rule in Outlook to capture all the desired tickets out of the "queue" (a shared Exchange box) and put them in my directory. I could then schedule a MEP macro to run there when there are over X tickets there or once a day - whichever comes first. Or give MEP to each of the 4 agents and let them run a macro that I would craft (and Insight would probably prefer THIS solution for licensing! ;-)). I'd rate myself as a "7 or 8" on a 1-10 scale of MEP macro crafting expertise, with my ignorance of Windows controls being the most limiting factor holding me back from a solid 8 to 9! ;-) My code may not be the most logical, clinically efficitent, etc; but I get the job done, reliably, error trappiing, etc. The reason I'm obsessing about controls is because the windows will appear in different places on different monitors. Even on the same person's PC, it could appear ANYWHERE on any 1 of 7 monitors. So moving to canned pixel co-ords seems to be the lamest way to go. Nothing more gimp than watching a cursor run around randomly on a screen clicking and waiting for things to happen that never will. Nothing worse than having a script run amok and start clicking off in windows it shouldn't be in, etc. Anyone that knows anything about AD can only imagine the "fun" that could result (and how quickly one's phone {and their boss's phone!} could ring) as a result of a script gone wild like a chimp on meth! We typically have at least two AD sessions (one "live" and one Citrix) and SEVERAL other critical network management / monitoring windows, etc. "Scripts Gone Wild" would not be cool at all. So this is kind of a "Hero or zero, Whitehouse or outhouse" undertaking I'm tackling! LOL. One redeeming thing of AD work seems to be that the primary and ancilliary windows seem to be predictably named. Well, sortta! This would make respecive window activation / focus pretty easy, I believe. It would be sweet to use controls, since, as I understand it, that sets me free from pixel co-ords, window locations, screen resolutions, etc. I guess I'll play around and try a little testing in the next day or two. We'll have over 5,000 tickets to play with over the next few months, so I need to get my act together if I'm going to do this. Random options / thoughts include: I can just "scrape" the PC name out of the tickets, shove it in a var go to AD and deal with it and call it good. Or, pre-process them in semi-real time, scrape out the PC's names, build to a text file and batch 'em at the end of the day or whatever. All PC's get the same same same membership modification (addition). The primary 2 BIG errors (aside from total amok-ness) I anticipate are: 1) The target PC may already have the desired membership... somehow need to check that or see what the resultant AD err is if I try it. Then I'll know how to deal with it. And / or: 2) The target PC name is not found on the domain. This would surely result in an automated kick back ticket saying, in effect "Yo, you gave me PC Name '1234567-abc' but that doesn't appear to exist on our Domain, please re-submit a ticket with the correct PC name, etc..." Any and all comments are welcome! Particulary as regards MEP & AD & Windows controls... Sorry for the longer than normal ramble here... Sincere thanks, --Pete
  14. I cut some of my programming teeth in the late '70's with APL on a IBM "Three-Sickly", then a 370, "deep in the Hudson Valley" of NY. I well recall writing "apps" where I could accomplish more in a dozen characters (granted maybe some overstrikes) than any of my Fortran, RPG, COBOL, PL/1 lovin' friends could in 12 LINES or more!! I sorely miss APL... I've probably forgotten more APL than 98 of 100 current day programmers will ever know. <Sigh!>. Yeah, and I know what an acoustic coupler is too, kids! And I know why it was helpful to keep a bath towel handy when running one in a noisey environemnt! ;-) "Ahhhh, the good old days..."
×
×
  • Create New...