joe Posted May 27, 2005 Report Share Posted May 27, 2005 The {Generate an Internet Login} function creates a macro that will launch, activate, and log in to a web site that requires a user ID and password. It is a heavy function, which means that it carries with it all the code necessary to generate its target macro, including the VBScript code. The target macro is written to your desktop as a playable (.mxe) file and will contain everything it needs to run, including its own VBScript code. It is what we call a zero-footprint macro, meaning that it will run standalone without needing the support of any other function, macro, or external file. It generates, all by itself, everything it needs to work. I do not want to get into too much detail here as to how the {Generate an Internet Login} function works because you can read that within the function's code and inline docs. But here are some points: It must be imported into the PGM Functions Library in order to run because it uses some supporting functions within the Library. It only works with Internet Explorer. Any open web pages will be automatically closed while generating target macro. The information displayed by the prompts and text boxes will help guide you through the generation process. It uses your temporary folder to create whatever files it needs to run, which are deleted at the end. The target (resulting) macro that this function generates will contain everything it needs to work. You do not have to be at the target web page when this function starts. You will have an opportunity to navigate to it when the time comes. When the function starts you are prompted to enter a URL, which is the web page that contains the user ID and password fields. Knowing how long and weird these URLs can be, the function was designed to allow navigation to the web page while the macro is running. This means that you can type any URL into the prompt, and then after the function takes you there, navigate to the correct web page. This is explained in the text box as the function is running. Once you acknowledge the correct web page, the macro copies the address and closes IE because the underlying VBScript will launch its own web page instance and the user may get confused if two identical web pages are on the screen. The VBScript, which is launched by the function at this point, captures more than just your typed user ID and password. It also captures the related DOM <INPUT> tags of the relevant fields. This is accomplished by comparing which fields have data when the web page is closed. It is the OnQuit Event that tells the VBScript to get the data. So it is important to remember that after you enter your user ID and password, NOT to hit the <Enter> key or engage the <Submit> button but instead, just simply close the IE window. Again, this is explained in the text box as the function is running. The function will take control back once VBScript has recorded the data to a temporary file. Now you are prompted to confirm the user ID and password and to enter a name for the playable (.mxe) file that is about to be generated. That's it. In order to test the newly created macro, simply click on it. I have used this function to generate macros for PayPal, credit card, banking, eBay, membership, and other web sites, and have never encountered a problem. Let us know how it goes with you. Tell us any problems, opinions, suggestions, and so forth that you have. 2005.06.01 - JLW - Test for "https" in input string. Generate_an_Internet_Login_A.mxe Quote Link to comment Share on other sites More sharing options...
bobchernow Posted May 27, 2005 Report Share Posted May 27, 2005 OK, here is a very simple reply. I tried the function last night and it worked first time on this forum. I will test some more complex cases today. There is a typo on line 83 (the word becuase) . Bob Quote Link to comment Share on other sites More sharing options...
floyd Posted May 27, 2005 Report Share Posted May 27, 2005 Too fast on the keyboard! Quote Link to comment Share on other sites More sharing options...
bobchernow Posted May 27, 2005 Report Share Posted May 27, 2005 Here is another problem. Granted the input fields are for an Account Number and PIN but shouldn't that work. There are two problems. 1) The initial URL comes up wrong. 2) The VBS cannot find any input fields. The URL is: https://ezonline.ibmtefcu.org/ Quote Link to comment Share on other sites More sharing options...
cyberchief Posted May 27, 2005 Report Share Posted May 27, 2005 I don't have the PGM library to run this yet... but I just want to clarify something. Running the Macro for the first time will close all IE windows. Will it also close all IE windows when it is run after that? Nevermind... read through the entire macro. Disregard this question. Quote Link to comment Share on other sites More sharing options...
bobchernow Posted May 27, 2005 Report Share Posted May 27, 2005 I just tested that and it did not close the windows. It opened a new IE session and ran. But I did notice whereas with no windows open it would open the window, fill in the info AND submit it. When I tested it with another window open it started a new window, filled in the info but DID NOT submit it. Quote Link to comment Share on other sites More sharing options...
floyd Posted May 31, 2005 Report Share Posted May 31, 2005 Bob - Thanks for the input. Opening and closing windows: The target macro that gets generated does not close any IE windows when it is fired. This is only done by the {Generate an Internet Login} function as you are creating the target macro. When you stated When I tested it with another window did you mean another IE window or any window? Acct and PIN fields: I think the problem may be that there is no HTML <INPUT TYPE=PASSWORD> type field. Currently this data mining macro works only if there is at least one <INPUT TYPE=TEXT> and <INPUT TYPE=PASSWORD> field. I will look further into this. Quote Link to comment Share on other sites More sharing options...
bobchernow Posted May 31, 2005 Report Share Posted May 31, 2005 did you mean another IE window or any window No, I meant an IE window and yes, as I stated it does not close any that are open. But if there are any IE windows open the running of a login macro will not hit any submit button where it does whjen it is the only ie window open. Acct and PIN fields: I think the problem may be that there is no HTML <INPUT TYPE=PASSWORD> type field. Currently this data mining macro works only if there is at least one <INPUT TYPE=TEXT> and <INPUT TYPE=PASSWORD> field. I will look further into this. Gotcha! Sort of thought so. Did you experience the wrong URL coming up initially. It may be my system since I seem to have the lop.com adware problem. Quote Link to comment Share on other sites More sharing options...
joe Posted June 1, 2005 Author Report Share Posted June 1, 2005 Hello Bob! Did you experience the wrong URL coming up initially Yes. The problem was the macro only tested the input string for an occurrence of "http://" and would prepend it (real word?) if it was not found resulting in "http://https://ezonline.ibmtefcu.org". I changed the macro to also test for "https://" and posted it. Edited (added to response): But if there are any IE windows open the running of a login macro will not hit any submit button where it does whjen it is the only ie window open I've tried duplicating this problem without success. I can have many IE windows open, including a clone of the one that the target macro will open, and everything still works fine. The User ID and Password get entered, and submitted without fail. The underlying VBScript is designed to launch its own instance of IE, navigate to the designated web page, fill in the fields, then hit the <Enter> key via a call to objShell.SendKeys. In other words, the "Submit" button is never touched under any circumstance. Quote Link to comment Share on other sites More sharing options...
randallc Posted June 2, 2005 Report Share Posted June 2, 2005 Hi Joe, Your macro doesn't like hotmail much? "An error occured while examining the "http://login.passport.net/uilogin.srf?lc=3081&id=2" web page. There was no INPUT tag element, or there was no TEXT type field, or there was no PASSWORD type field, or any combination of these." Randall Quote Link to comment Share on other sites More sharing options...
randallc Posted June 2, 2005 Report Share Posted June 2, 2005 Hi again, Randall EDIT:; my 2 webmail sites work fine (edited as initially I messed up the password and got an error! Hotmail still recalcitrant? Looks good? Quote Link to comment Share on other sites More sharing options...
floyd Posted June 2, 2005 Report Share Posted June 2, 2005 It is probably the same thing that Bob ran into in his post. I think the problem may be that there is no HTML <INPUT TYPE=PASSWORD> type field. Currently this data mining macro works only if there is at least one <INPUT TYPE=TEXT> and <INPUT TYPE=PASSWORD> field. I will look further into this. Quote Link to comment Share on other sites More sharing options...
randallc Posted June 3, 2005 Report Share Posted June 3, 2005 I have 2 email addresses at the same site; Yor program reloads the previous login when I run the next login, unpredictably unable to get into the second for a while? Randall EDIT; DON"T WORRY!; this appears to be normal behaviour for this site outside of the macro if the forst login is still active Quote Link to comment Share on other sites More sharing options...
joe Posted June 3, 2005 Author Report Share Posted June 3, 2005 Hello Randall! It is true that some web sites act this way. If you do not log out prior to exiting, it assumes that you are still the same person when logging back in even though you have different identities. PayPal is like this and so is Netscape. I have gotten into the habit of logging out ... which is a good habit as habits go! I still want to determine if it will be possible to generate a macro for those sights that do not contain a <INPUT TYPE=PASSWORD> field. Quote Link to comment Share on other sites More sharing options...
bobchernow Posted June 3, 2005 Report Share Posted June 3, 2005 Just tested the _A version and it now finds the web site with the https type. Great. I do hope you can figure a way past the lack of a <INPUT TYPE=PASSWORD> field Quote Link to comment Share on other sites More sharing options...
joe Posted June 6, 2005 Author Report Share Posted June 6, 2005 Hello Bob! Try creating a login macro using this link and then let us know the results. The page will look strange because it is actually an unformatted FRAME within the main page. A FRAME, however, is just another link to another page. If this works then we will determine what it will take to resolve this type of FRAME situation. By the way, within the FRAME are standard TEXT and PASSWORD fields ... which makes sense. Quote Link to comment Share on other sites More sharing options...
randallc Posted June 7, 2005 Report Share Posted June 7, 2005 Hi, Joe, Are you able to do a similar thing wit Hotmail? I presume I can't test Bob's site? Is the password testing just for a process and "proof of concept"? I would not be happy to make such shortcuts to a banking site, for instance; all the macros I make for such sites have incomplete passwords. The worry after losing a laptop etc with those macros intact would be extreme? Randall Quote Link to comment Share on other sites More sharing options...
bobchernow Posted June 7, 2005 Report Share Posted June 7, 2005 Just tested it with the A version of code and the link provided and it worked like a charm! Quote Link to comment Share on other sites More sharing options...
joe Posted June 7, 2005 Author Report Share Posted June 7, 2005 Randall: The worry after losing a laptop etc with those macros intact would be extreme? This is VERY true. Anybody that generates a macro like this, whether with Macro Express or some other software, should always be aware that the logins and passwords are right there on the hard drive. Yes, they are buried inside scripts and text, but they are still there. The downside to convenience I guess. Bob: Just tested it with the A version of code and the link provided and it worked like a charm! Great news! Thanks. At least we know for sure what the problem was. Edited/Added: After doing some investigation into the FRAMES problem, we are leaning towards not handling these types of logins in this release. A workaround for the user would be to view the source (View | Source) and retrieve the link inside the <IFRAME> tag, which is what I did. Again, this is just how we are leaning. A final decision has not yet been made. We still need to determine if there are a lot of these types of login sites compared to what we are already handling. Quote Link to comment Share on other sites More sharing options...
joe Posted June 7, 2005 Author Report Share Posted June 7, 2005 Randall: Are you able to do a similar thing wit Hotmail? I presume I can't test Bob's site? Have not looked at Hotmail yet, but I will. Is the password testing just for a process and "proof of concept"? No. I have personally set up over 20 logins and use them on a daily basis. They are called from a menu. Each one I generate goes into a folder on the server. When I want to log in to a web site, I run a macro that dynamically gathers them into a Multiple Choice menu. Then I just click on my choice. The advantage of this approach is that I need only to generate a login and save it to the same folder as the others. Since the macro builds the menu dynamically, the new login is automatically included as a choice. The macro itself is fired by simply clicking my mouse in the upper-left corner of my display. Obviously, it is a Mouse Click activated macro. Very clean. Very quick. Very easy! Quote Link to comment Share on other sites More sharing options...
cyberchief Posted June 7, 2005 Report Share Posted June 7, 2005 I am waiting to test this function... but I have a question that came to mind. We use our corporate log in and password to access many sites on the intranet. We are required to change this password about once a month. Is there something in the design that would allow for changing the password without having to re-run the macro set-up? Quote Link to comment Share on other sites More sharing options...
floyd Posted June 7, 2005 Report Share Posted June 7, 2005 Is there something in the design that would allow for changing the password without having to re-run the macro set-up? No. That would be a different macro, though it would very easy to create. You can, however, simply load the generated mxe file into any text editor, search for the password, change it, and save it. Quote Link to comment Share on other sites More sharing options...
bobchernow Posted June 7, 2005 Report Share Posted June 7, 2005 Each one I generate goes into a folder on the server. When I want to log in to a web site, I run a macro that dynamically gathers them into a Multiple Choice menu. Then I just click on my choice. Wanna share the multiple choice macro. Sounds nice. Quote Link to comment Share on other sites More sharing options...
bobchernow Posted June 7, 2005 Report Share Posted June 7, 2005 You can, however, simply load the generated mxe file into any text editor, search for the password, change it, and save it. Are there any options to have the passwords either encrypted or at least obfuscated? Quote Link to comment Share on other sites More sharing options...
floyd Posted June 7, 2005 Report Share Posted June 7, 2005 Wanna share the multiple choice macro. Sounds nice. Here is the {IE Login Popup Menu} function. You will need to edit it to change the repository folder to suit your requirements. The function is well documented and the Mouse Click activation was left intact. Feel free to change this, or anything else to suit your needs. IELoginPopupMenu.mex Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.