Jump to content

Virtual keyboard


Recommended Posts

I am writing a script to emulate a virtual keyboard for the purpose of processing input to an Logon webpage (User name and password). The virtual keyboard script that I have written launches the applicable webpage. How do I keep the logon webpage in view and the virtual keyboard active.

From a functionality point of view each time I mouse click the button representing A-Z or 0-9 that value is passed to the webpage logon input. My script works but I am not sure how to keep the virtual keyboard script as the active screen until all the input has been processed.

CODE
;Includes

#include <GuiConstants.au3>

Run("C:\Program Files\Internet Explorer\iexplore.exe yourbank.com.au/bank/bankmain")

;Floating Screen

$x = Random(300, 600, 1)

$y = Random(100, 400, 1)

;User Interface

GUICreate("Virtual Keyboard", 325, 95, $x, $y, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))

$q = GUICtrlCreateButton("Q", 5, 5, 20, 20)

$w = GUICtrlCreateButton("W", 25, 5, 20, 20)

$e = GUICtrlCreateButton("E", 45, 5, 20, 20)

$r = GUICtrlCreateButton("R", 65, 5, 20, 20)

$t = GUICtrlCreateButton("T", 85, 5, 20, 20)

$y = GUICtrlCreateButton("Y", 105, 5, 20, 20)

$u = GUICtrlCreateButton("U", 125, 5, 20, 20)

$i = GUICtrlCreateButton("I", 145, 5, 20, 20)

$o = GUICtrlCreateButton("O", 165, 5, 20, 20)

$p = GUICtrlCreateButton("P", 185, 5, 20, 20)

$7 = GUICtrlCreateButton("7", 225, 5, 20, 20)

$8 = GUICtrlCreateButton("8", 245, 5, 20, 20)

$9 = GUICtrlCreateButton("9", 265, 5, 20, 20)

$a = GUICtrlCreateButton("A", 10, 25, 20, 20)

$s = GUICtrlCreateButton("S", 30, 25, 20, 20)

$d = GUICtrlCreateButton("D", 50, 25, 20, 20)

$f = GUICtrlCreateButton("F", 70, 25, 20, 20)

$g = GUICtrlCreateButton("G", 90, 25, 20, 20)

$h = GUICtrlCreateButton("H", 110, 25, 20, 20)

$j = GUICtrlCreateButton("J", 130, 25, 20, 20)

$k = GUICtrlCreateButton("K", 150, 25, 20, 20)

$l = GUICtrlCreateButton("L", 170, 25, 20, 20)

$4 = GUICtrlCreateButton("7", 225, 25, 20, 20)

$5 = GUICtrlCreateButton("8", 245, 25, 20, 20)

$6 = GUICtrlCreateButton("9", 265, 25, 20, 20)

$z = GUICtrlCreateButton("Z", 15, 45, 20, 20)

$x = GUICtrlCreateButton("X", 35, 45, 20, 20)

$c = GUICtrlCreateButton("C", 55, 45, 20, 20)

$v = GUICtrlCreateButton("V", 75, 45, 20, 20)

$b = GUICtrlCreateButton("B", 95, 45, 20, 20)

$n = GUICtrlCreateButton("N", 115, 45, 20, 20)

$m = GUICtrlCreateButton("M", 135, 45, 20, 20)

$comma = GUICtrlCreateButton(",", 155, 45, 20, 20)

$Kfullstop = GUICtrlCreateButton(".", 175, 45, 20, 20)

$1 = GUICtrlCreateButton("1", 225, 45, 20, 20)

$2 = GUICtrlCreateButton("2", 245, 45, 20, 20)

$3 = GUICtrlCreateButton("3", 265, 45, 20, 20)

$0 = GUICtrlCreateButton("0", 265, 45, 20, 20)

$Nfullstop = GUICtrlCreateButton(".", 285, 45, 20, 20)

$exitbutton = GUICtrlCreateButton("E", 285, 65, 20, 20)

GUICtrlSetState(-1, $GUI_FOCUS)

GUISetState()

;Keystroke Processor

While 1

$msg = GUIGetMsg()

Select

Case $msg = $GUI_EVENT_CLOSE Or $msg = $exitbutton

GUIDelete()

PLExit()

Case $msg = $1

WinActivate("Logon - ", "")

Send(1)

EndSelect

WEnd

Func PLExit()

Exit

EndFunc ;==>PLExit

I have not written the TAB or Caps Lock functionality as yet to cover situations where the input might be case sensitive

Help is always appreciated

Ant.....

Link to comment
Share on other sites

I have a couple of ideas which might help you.

You can use

WinSetOnTop ( "title", "text", flag )

to keep your GUI window on top.

You might add something like an inputbox to gather what is typed and a Send button to send a whole word rather than 1 character.

Hope any of this would help :)

SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Link to comment
Share on other sites

I have a couple of ideas which might help you.

You can use

WinSetOnTop ( "title", "text", flag )

to keep your GUI window on top.

You might add something like an inputbox to gather what is typed and a Send button to send a whole word rather than 1 character.

Hope any of this would help :rolleyes:

Thanks for your help do you know if what is processed by a 'Send' command can be interpreted by a malware keystroke (keyboard stroke) logger?

Ant..

Link to comment
Share on other sites

Thanks for your help do you know if what is processed by a 'Send' command can be interpreted by a malware keystroke (keyboard stroke) logger?

Ant..

i do not believe it does, it's sending a control on your computer, not recording it and sending it to an online e-mail/server

keylogging is a program which records your keystrokes over a period of time and sends the saved logs to an e-mail/upload server over the world wide web.

~~ AutoIt v3 Minion ~~Name: Kevin "Aces-X" MorrisOrganization: A C DevelopmentE-Mail: AcesX91@acecoding.netOS: XP Professional; Vista package~~ Released Software ~~CPU-Mach: Topic at acecoding.net ForumsProxyzBuddy: Beta testing at the moment, private onlyWHSTool: Not released to the public

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...