Jump to content
Macro Express Forums

Automate login


PotterHarry

Recommended Posts

I wish to have part of my macro open a web page and login to a site (a banking account) where there are three boxes into which you have to input three characters from your password. I can work out how to do that, but the challenging bit is to get the macro to read off the screen the desired numbers of the random letters. For example just now it is asking for Character 6: character 5: character 2. What would be the most economical way of doing this? How would I get the 6,5 and 2 into my variables?

Link to comment
Share on other sites

1. Is it possible to double click the numbers to select them? Drag the mouse to select the numbers? Select the numbers via the keyboard?

 

If yes to at least one of the above...

 

2. Can you copy the selected text to the clipboard, and paste it somewhere else?

 

If yes, then it may be possible to automate the process with Macro Express. You will need to select the first number, copy it to the clipboard, and assign a variable to the value of the clipboard. Do this for all three numbers. Then move the cursor to the appropriate field, and spit out the three variables. The code might look something like this. (The Mouse Move statements are are theoretical. There may be more reliable ways to navigate to the numbers.)

 

// Get first number...
Mouse Move: 10, 10 Relative to Current Window // Position of first number
Mouse Left Double Click
Clipboard Copy
Variable Set String %N1% from the clipboard contents
// Get second number...
Mouse Move: 20, 20 Relative to Current Window // Position of second number
Mouse Left Double Click
Clipboard Copy
Variable Set String %N2% from the clipboard contents
// Get third number...
Mouse Move: 30, 30 Relative to Current Window // Position of third number
Mouse Left Double Click
Clipboard Copy
Variable Set String %N3% from the clipboard contents
// Move the cursor and spit out the three numbers...
Mouse Move: 100, 100 Relative to Current Window // Position of field that takes the three numbers
Mouse Left Click
Text Type (Simulate Keystrokes): %N1%%N2%%N3%

Link to comment
Share on other sites

It worked! ... eventually. Thanks a hell of a lot.

I had to left click down, drag and then left click up to enable me to copy to clipboard.

I had a major problem because I dragged too far on one of the characters and introduced a spurious blank character.

 

This is most of the script for anyone who may wish to simplify bank login. I have substituted x's in order to preserve my millions.

 

// Get Character 3 from login screen ......

// Input the second number

Macro Run: WAIT UNTIL xx IS OPEN

Mouse Move Screen 510, 580

Mouse Left Button Down

Mouse Move Screen 519, 586

Delay 0.5 Seconds

Mouse Left Button Up

Clipboard Copy

Variable Set String %T1% from Clipboard

Mouse Move Screen 623, 579

Mouse Left Button Down

Mouse Move Screen 632, 585

Delay 0.5 Seconds

Mouse Left Button Up

Clipboard Copy

Variable Set String %T2% from Clipboard

Mouse Move Screen 739, 580

Mouse Left Button Down

Mouse Move Screen 748, 586

Delay 0.5 Seconds

Mouse Left Button Up

Clipboard Copy

Variable Set String %T3% from Clipboard

Mouse Move Screen 18, 200

Delay 1 Seconds

Get Pixel: Under Mouse into %N90%

Mouse Left Button Double Click

Mouse Move Screen 667, 558

Mouse Left Button Double Click

Mouse Move Screen 434, 557

Mouse Left Button Click

If Variable %T1% = "1"

Text Type: x

End If

If Variable %T1% = "2"

Text Type: x

End If

If Variable %T1% = "3"

Text Type: x

End If

If Variable %T1% = "4"

Text Type: x

End If

If Variable %T1% = "5"

Text Type: x

End If

If Variable %T1% = "6"

Text Type: x

End If

Mouse Move Screen 550, 557

Mouse Left Button Click

Mouse Left Button Click

If Variable %T2% = "1"

Text Type: x

End If

If Variable %T2% = "2"

Text Type: x

End If

If Variable %T2% = "3"

etc.

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.

Guest
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.

Loading...
×
×
  • Create New...