Jump to content
Macro Express Forums

pferris

Members
  • Posts

    31
  • Joined

  • Last visited

Everything posted by pferris

  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..."
  15. Dunno if this'll help or not "but"... See here: https://addons.mozilla.org/en-US/firefox/addon/tab-counter/ And I believe there are others (at least 1 more!). What I don't know is if the digit it displays in the toolbar is 'scrape-able' or not... haven't tried it personally. If it is, that'd prob be even easier than counting / figuring pixels / colors, etc. Just a thought... Cheers, --P
  16. Have you tried using the timing command "Wait For Window" - THEN add a fixed delay after it (I like ~ 200-250ms delays for instance, for what I do)? Just a thought.
  17. I can envision that Win 7 may be a little more thorny with UAC pop-ups, but even that should be addressable.
  18. Hi ALexanderP! You didn't specify which OS you were running (XP? Win 7? etc.). Also, what would prevent you from having your macro "right click" on the application, select "Run As", check the "Other User" box, specify "Administrator" as the user, enter the admin password from your macro (as encrypted text, of course!) and keep on trucking? Maybe I don't understand the question... but I have yet to encounter a problem that I (eventually!) could resolve using MEP. My philosophy is: "If you can do it with mouse & keyboard, you can do it with MEP!".
  19. Hi, You might look at something called "Sign Up Shield" (Click for link) by Protecteer. I can't compare it to RoboForm, etc; as I've never used RoboForm. SUS is pretty slick - look at their sign up suite, etc. Also included is a fairly nice password generator, etc. Even though each for is different, you can teach it to remember "approved" sites, etc. You can also teach it to "learn" that "first" is Joe, "last" is Smith, "Address" is 1313 Mockingbird Lane. So, any time it gets challenged for a term you've previously defined, it can fill in as much of the form as as it's been trained (previously on other pages, etc.). Wouldn't hurt to dl a free trail and see if it'll help. I'm always reticent to mention other (non-MEP) products here, but since each page/site will have different requirements, that's really not what MEP is for. MEP is GREAT for repetitive (or even conditional) data filling, screen scraping, data file building (readin', writin' & 'rithmatic!) , etc. Random web page filling - probably not so much. All the best, --P
  20. Hi! Some may disagree, but I like to use labels - sometimes when developing a script and I'm not sure I'll always only be skipping "just 1 line"... but it might be 5 lines a week from now!
  21. A few questions: 1) Is the target URL always the same every 60 seconds? 2) Is the target page HTML (vis-a-vis ASP, etc.)? 3) Are you wanting a MEP-only solution or is VBS ok? Thanks, --Pete
  22. I originally posted the following, below. Since then, in my impatience to fix the problem, I UNinstalled and REinstalled MEP. All is well now!! Thanks for all your help! --Pete =-=-=-=-=-=-=-= Hello Again, Thanks Paul, I appreciate your time and effort to help. However, in this particular case, unless I'm really missing something, I'm not sure it helps. You see - I'm not sure how to access options without that left-hand vertical tool bar in Macro Explorer! I can right click on the MEP icon in the system tray, and access a few things - reset tool bars (not effective, as stated), reset defaults (ditto), etc. That's where I was headed. BTW, IIRC, the tool bar I'm trying to get back is movable. I'm wondering if it's been moved out of site / off screen, etc. Somewhere where I can't see it. I would expect 'reset toolbars' to fix / restore it. It didn't. FWIW: My original quest (that brought all this to the surface) was to get to the options menu and change the backup path. I realized I don't have any "options" menu any more! Thanks again, Paul. Any (additional hints, tips appreciated!!). --Pete
  23. Good Morning, Good Afternoon, Good Evening! I currently running Macro Express Pro, v. 4.1.7.1. My problem is that in my Macro Explorer window I am missing what I call the 'verticle toolbar' - see my attached image "MEP_Explorer_Correct.jpg". I 'borrowed' this graphic from the MEP help (thanks! :-)). My current Macro Exploerer looks like this - see my attached image "MEP_Explorer.jpg". Comparing these two images, it makes it easy to see what's missing. This has got to be embarassingly easy to fix. Something simple I'm missing! I've tried "Tools" --> "Restore Toolbars" , and "Tools" --> "Restore Program Defaults". No joy. Any suggestions? My next trick would be a remove and reinstall, but I hate to if it's really just a case of RTFM or something... THough I've tried the Help and didn't see much on this particular subject. Even Mr. Weinpert's excellent book ("Macro Express Explained") doesn't touch on this problem (from what I saw on a quick skim last night). Any ideas? Thanks much! --Pete
  24. Hi There, I've been using ME for a few years and MEP since release. I read the forums when I have time or have a specific question or answer. One thing I haven't seen, is any mention of using MEP (or ME) to automate bulk AD (Active Directory) accounting chores. To me, this sounds like a 'natural' fit. Integrate well with Word or whatever and send out "You need to change your password in the next 5 days or...", "Your account has been created...", etc; style messages. Since late March, I'm the network administrator for a school system. As you might imagine, every year student (and staff) accounts have to be aged accordingly -- Little Johnny is no longer at the Junior High. now he's in High School - so he (and probably 200-300 others!) need to be moved to a different OU. The graduating High School class needs to be deleted (they're out of the system now... free at last!). Other students at other schools will need manual tweaking (Little Suzy just moved in to the school system, Young Bob just moved out). Simple select & delete or drag & drop as the case(s) may be. Ok... to the point today: Has anyone ever used MEP to create / delete / move AD accounts in bulk? In August or so, I will be getting all the student names, their respective school, etc; will come to me from our DBA who will grind it out from PowerSchool (a commercial app that manages a fairly hellacious SQLbase. So I can pretty much leech whatever data I need - in the worst case (or typical one!), I can inhale it all into an Excel sheet. And concatenate the data into a final column and regurgitate that to the DC (Domain Controller). I just didn't want to have to reinvent the wheel, but I've done a lot tougher with MEP. Anyone have any AD / MEP macros they wouldn't mind sharing? Thanks tons, --Pete P.S.: If you're reading this months from now and need an AD util, you might drop me a note!
×
×
  • Create New...