corrupt
Joined: 29 Dec 2004 Posts: 2436
|
Posted: Sun Apr 24, 2005 2:33 am Post subject: |
|
|
Here's a possible solution? and a possible starting point for a virtual keyboard script? ...
| Code: | ; Generated using SmartGUI Creator 3.4 (of course...)
Gui, Add, Button, x6 y10 w30 h20 gSendIt, Esc
Gui, Add, Button, x56 y60 w30 h20 gSendIt, Q
Gui, Add, Button, x56 y10 w30 h20 gSendIt, F1
Gui, Add, Button, x86 y10 w30 h20 gSendIt, F2
Gui, Add, Button, x116 y10 w30 h20 gSendIt, F3
Gui, Add, Button, x146 y10 w30 h20 gSendIt, F4
Gui, Add, Button, x6 y60 w50 h20 gSendIt, Tab
Gui, Add, Button, x196 y10 w30 h20 gSendIt, F5
Gui, Add, Button, x226 y10 w30 h20 gSendIt, F6
Gui, Add, Button, x256 y10 w30 h20 gSendIt, F7
Gui, Add, Button, x86 y60 w30 h20 gSendIt, W
Gui, Add, Button, x336 y10 w30 h20 gSendIt, F9
Gui, Add, Button, x366 y10 w30 h20 gSendIt, F10
Gui, Add, Button, x396 y10 w30 h20 gSendIt, F11
Gui, Add, Button, x426 y10 w30 h20 gSendIt, F12
Gui, Add, Button, x116 y60 w30 h20 gSendIt, E
Gui, Add, Button, x466 y10 w30 h20 gSendIt, Psc
Gui, Add, Button, x496 y10 w30 h20 gSendIt, Scr
Gui, Add, Button, x526 y10 w30 h20 gSendIt, Brk
Gui, Add, Button, x6 y40 w30 h20 gSendIt, ``
Gui, Add, Button, x36 y40 w30 h20 gSendIt, 1
Gui, Add, Button, x66 y40 w30 h20 gSendIt, 2
Gui, Add, Button, x96 y40 w30 h20 gSendIt, 3
Gui, Add, Button, x126 y40 w30 h20 gSendIt, 4
Gui, Add, Button, x156 y40 w30 h20 gSendIt, 5
Gui, Add, Button, x186 y40 w30 h20 gSendIt, 6
Gui, Add, Button, x216 y40 w30 h20 gSendIt, 7
Gui, Add, Button, x246 y40 w30 h20 gSendIt, 8
Gui, Add, Button, x276 y40 w30 h20 gSendIt, 9
Gui, Add, Button, x306 y40 w30 h20 gSendIt, 0
Gui, Add, Button, x336 y40 w30 h20 gSendIt, -
Gui, Add, Button, x366 y40 w30 h20 gSendIt, =
Gui, Add, Button, x396 y40 w30 h20 gSendIt, \
Gui, Add, Button, x146 y60 w30 h20 gSendIt, R
Gui, Add, Button, x466 y40 w30 h20 gSendIt, Ins
Gui, Add, Button, x496 y60 w30 h20 gSendIt, End
Gui, Add, Button, x526 y40 w30 h20 gSendIt, PU
Gui, Add, Button, x566 y40 w30 h20 gSendIt, Nlk
Gui, Add, Button, x596 y40 w30 h20 gSendIt, 1
Gui, Add, Button, x286 y10 w30 h20 gSendIt, F8
Gui, Add, Button, x626 y40 w30 h20 gSendIt, *
Gui, Add, Button, x656 y40 w30 h20 gSendIt, -
Gui, Add, Button, x526 y60 w30 h20 gSendIt, PD
Gui, Add, Button, x496 y40 w30 h20 gSendIt, Hm
Gui, Add, Button, x466 y60 w30 h20 gSendIt, Del
Gui, Add, Button, x426 y40 w30 h20 gSendIt, <-
Gui, Add, Button, x176 y60 w30 h20 gSendIt, T
Gui, Add, Button, x206 y60 w30 h20 gSendIt, Y
Gui, Add, Button, x236 y60 w30 h20 gSendIt, U
Gui, Add, Button, x266 y60 w30 h20 gSendIt, I
Gui, Add, Button, x296 y60 w30 h20 gSendIt, O
Gui, Add, Button, x326 y60 w30 h20 gSendIt, P
Gui, Add, Button, x356 y60 w30 h20 gSendIt, [
Gui, Add, Button, x386 y60 w30 h20 gSendIt, ]
Gui, Add, Button, x416 y60 w40 h60 gSendIt, Enter
Gui, Add, Button, x6 y80 w60 h20 gSendIt, Caps
Gui, Add, Button, x6 y100 w70 h20 gSendIt, Shift
Gui, Add, Button, x6 y120 w30 h20 gSendIt, Ctrl
Gui, Add, Button, x566 y60 w30 h20 gSendIt, 7
Gui, Add, Button, x596 y60 w30 h20 gSendIt, 8
Gui, Add, Button, x626 y60 w30 h20 gSendIt, 9
Gui, Add, Button, x656 y60 w30 h40 gSendIt, +
Gui, Add, Button, x656 y100 w30 h40 gSendIt, Ent
Gui, Add, Button, x566 y80 w30 h20 gSendIt, 4
Gui, Add, Button, x596 y80 w30 h20 gSendIt, 5
Gui, Add, Button, x626 y80 w30 h20 gSendIt, 6
Gui, Add, Button, x566 y100 w30 h20 gSendIt, 1
Gui, Add, Button, x596 y100 w30 h20 gSendIt, 2
Gui, Add, Button, x626 y100 w30 h20 gSendIt, 3
Gui, Add, Button, x566 y120 w60 h20 gSendIt, 0
Gui, Add, Button, x626 y120 w30 h20 gSendIt, .
Gui, Add, Button, x66 y80 w30 h20 gSendIt, A
Gui, Add, Button, x96 y80 w30 h20 gSendIt, S
Gui, Add, Button, x126 y80 w30 h20 gSendIt, D
Gui, Add, Button, x156 y80 w30 h20 gSendIt, F
Gui, Add, Button, x186 y80 w30 h20 gSendIt, G
Gui, Add, Button, x216 y80 w30 h20 gSendIt, H
Gui, Add, Button, x246 y80 w30 h20 gSendIt, J
Gui, Add, Button, x276 y80 w30 h20 gSendIt, K
Gui, Add, Button, x306 y80 w30 h20 gSendIt, L
Gui, Add, Button, x336 y80 w30 h20 gSendIt, `;
Gui, Add, Button, x366 y80 w30 h20 gSendIt, '
Gui, Add, Button, x76 y100 w30 h20 gSendIt, Z
Gui, Add, Button, x106 y100 w30 h20 gSendIt, X
Gui, Add, Button, x136 y100 w30 h20 gSendIt, C
Gui, Add, Button, x166 y100 w30 h20 gSendIt, V
Gui, Add, Button, x196 y100 w30 h20 gSendIt, B
Gui, Add, Button, x226 y100 w30 h20 gSendIt, N
Gui, Add, Button, x256 y100 w30 h20 gSendIt, M
Gui, Add, Button, x286 y100 w30 h20 gSendIt, `,
Gui, Add, Button, x316 y100 w30 h20 gSendIt, .
Gui, Add, Button, x346 y100 w30 h20 gSendIt, /
Gui, Add, Button, x36 y120 w30 h20 gSendIt, Lwn
Gui, Add, Button, x66 y120 w30 h20 gSendIt, Alt
Gui, Add, Button, x336 y120 w30 h20 gSendIt, Alt
Gui, Add, Button, x376 y100 w40 h20 gSendIt, Shift
Gui, Add, Button, x366 y120 w30 h20 gSendIt, Win
Gui, Add, Button, x426 y120 w30 h20 gSendIt, Ctrl
Gui, Add, Button, x396 y120 w30 h20 gSendIt, Rwn
Gui, Add, Button, x96 y120 w240 h20 gSendIt, Space
Gui, Add, Button, x496 y100 w30 h20 gSendIt, ^
Gui, Add, Button, x466 y120 w30 h20 gSendIt, <
Gui, Add, Button, x526 y120 w30 h20 gSendIt, >
Gui, Add, Button, x496 y120 w30 h20 gSendIt, v
Gui, Show, h149 w694 , Virtual Keyboard
WinGet, ThisGUI, ID, Virtual Keyboard
WinSet, AlwaysOnTop, On, ahk_id %ThisGUI%
SetTimer, IdWin, 250
Return
IdWin:
WinGetActiveTitle, ActWin
WinGet, ActiveWin, ID, %ActWin%
if ActWin <> %LastWin%
{
MouseGetPos,,, xLastWin, xLastControl, 1
if xLastWin = %ActiveWin%
if xLastWin <> %ThisGUI%
if xLastControl <>
{
LastWin = %xLastWin%
LastControl = %xLastControl%
}
}
Return
SendIt:
; Many more exceptions, conditions, etc... need to be added for
; expected functionality. This is only a possible starting point...
if A_GuiControl = Space
SendThis := " "
else if A_GuiControl = Enter
SendThis = {ENTER}
else
SendThis = %A_GuiControl%
ControlSend, %LastControl%, %SendThis%, ahk_id %LastWin%
Return
GuiClose:
ExitApp
|
|
|