Jump to content
Macro Express Forums

Guidance / Suggestions Welcome

Recommended Posts

I would appreciate any suggestions / tips / guidance etc.


I am developing a set of macros that I plan to distribute to multiple users. The macros automate access to various web sites and perform registration and login functions. The macros were developed using IE 7 with a screen resolution of 1024 x 786.


The "move mouse" settings reflect the locations as found on my computer. Given that the end-users are not very technical and have differant screen resolution and varying lines/rows of "Tool Bar" views, I cannot count on the data-entry locations being the same as what I have programmed.


What is the best way to handle this and minimize the impact or changes to their computer? I am open to any recommendations.

Link to comment
Share on other sites

You will find numerous mentions in the forum that Mouse Move is not a good method. It's fine for fixed web pages, fixed screen display. Once you start varying things it simply does not work. You only have to have someone change the text size and you are out of luck. To account for every possibility would be ridiculously complicated. Even if you try and fix the window size, the toolbars and text etc are going to throw things off.


The most predictable navigation method is to use (Text Type) Tab or Shift+Tab and arrows. If you can navigate close to where you need to be you may be able to (Text Type) Tab from there. Finding text then Tabbing is one method.


There are javascript methods that could load the web page into a new fixed size window with limited or no toolbars etc. Although I've done it myself I'm no expert and certainly have not tried to pick information off such a setup. Below is an example of html link using an image to click - could just as easily be a text link.


<a href="java script:void(window.open('Your.htm', 'Javatest', 'width=600, height=400, location=no, menubar=no, status=no, toolbar=no, scrollbars=yes, resizable=no'))"><img src="yourlinkpic.jpg" alt="to your htm" border="0" height="20" width="164"></a>


I have not tried this out of ME. Typically the above code would be an html link on a web page. My original was resizable but I changed the code for your need. You may need to lose the scrollbars too. You may have to add other parameters to cope with text size etc. I've never had the need to be so specific. I mention the method more to indicate as a possibility.


Forum members that work with multi-users may be more helpful than me. That's all I have for now. You should get plenty of other suggestions on this one!

Link to comment
Share on other sites

One approach is to have a separate "learning" macro, where you prompt the user to navigate manually through the screens. At each point where the screen is to be clicked, have the user put the mouse in the right place (without clicking) and press the ENTER key or some other key. The macro does a WAIT FOR KEY PRESS and when the user presses the key, you get the mouse coordinates and save them to a file. The user only has to go through this process once, and when he is done you have saved coordinates unique to his screen resolution, his version of IE, and so on.


You can get as fancy as you want with this. For example, the learning macro could store pixel colors for key locations, and check them each time the "real" macro runs. That way you can detect whether the user has changed his IE settings, screen resolution, etc. and force him back to the learning macro if something has changed. It's also a good idea to force the IE window to some predetermined size (WINDOW RESIZE) in case the user shrinks it down or goes from smaller to full-screen or whatever.

Link to comment
Share on other sites

Next batch of ideas. Are you trying to do anything other than logins? Logins should be easy to handle because they are always Input or Combo boxes so you can Tab to them and Tab between username and password. Don't forget that many sites can remember logins so that may be a possibility too.


I use a combination of methods for all my logins:

1. Remembering logins with the site or browser is often the easiest. Fine for single user per PC with Windows login protection.

2. For predictable pages a macro loads the URL, Tabs to the username box then use Text Type for the username, Tab to the password and either, hit Enter or Tab to the OK button (depends on layout and default).

3. For more variable pages I (the user) manually click on the username box and hit a hotkey macro. The macro contains all the logins for this method. It reads the page title and chooses the appropriate text to type. Part list:


If Window "mythievingbanksite" is focused //Bank

Text Type (Simulate Keystrokes):mremptywallet

Text Type (Simulate Keystrokes): <TAB>

Text Type (Simulate Keystrokes): 7yenhUIE

Text Type (Simulate Keystrokes): <ENTER>

End If **

If Window "prompt" is focused //Auto Repair Shop


If Window "authentication required" is focused

Text Type (Simulate Keystrokes): guywithnowheels

etc etc

** At the end of each section you can add Macro Stop, or alternatively use "Else" instead of "End If" with a bunch of "End If" at the bottom of the list

A few time delays may be sprinkled in there depending on site.


Something you have to bear in mind is the reaction of the users to any dubious methods. It may not be worth your reputation, "Who's this idiot?", "You cannot be serious!". I suppose if you want to hide passwords from users there may be no choice.

Method 3 is quite effortless and universally applicable to all logins I've met.

Edited by JohnS
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...