kjpolker Posted October 14, 2009 Share Posted October 14, 2009 So I wrote a quick program that I want to make each letter on your keyboard equal a different letter, so when you try and type, it really types giberish. I don't know whats wrong with it though, it won't work please help me fix it. expandcollapse popup#include <GUIConstants.au3> #include <WindowsConstants.au3> GUICreate("Screwover", 200, 150, -1, -1) $Button1 = GUICtrlCreateButton("OK", -1, -1, 50, 20) $a = '{a}' $b = '{b}' $c = '{c}' $d = '{d}' $e = '{e}' $f = '{f}' $g = '{g}' $h = '{h}' $i = '{i}' $j = '{j}' $k = '{k}' $l = '{l}' $m = '{m}' $n = '{n}' $o = '{o}' $p = '{p}' $q = '{q}' $r = '{r}' $s = '{s}' $t = '{t}' $u = '{u}' $v = '{v}' $w = '{w}' $x = '{x}' $y = '{y}' $z = '{z}' $a1 = '{e}' $b1 = '{m}' $c1 = '{h}' $d1 = '{q}' $e1 = '{b}' $f1 = '{l}' $g1 = '{w}' $h1 = '{d}' $i1 = '{p}' $j1 = '{g}' $k1 = '{k}' $l1 = '{y}' $m1 = '{a}' $n1 = '{u}' $o1 = '{z}' $p1 = '{n}' $q1 = '{s}' $r1 = '{i}' $s1 = '{x}' $t1 = '{c}' $u1 = '{v}' $v1 = '{r}' $w1 = '{o}' $x1 = '{f}' $y1 = '{j}' $z1 = '{t}' GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 Run("Notepad.exe") WinWaitActive("[TITLE:UNTITLED - NOTEPAD]") case $a Send(GUICtrlRead($a1)) case $b Send(GUICtrlRead($b1)) case $c Send(GUICtrlRead($c1)) case $d Send(GUICtrlRead($d1)) case $e Send(GUICtrlRead($e1)) case $f Send(GUICtrlRead($f1)) case $g Send(GUICtrlRead($g1)) case $h Send(GUICtrlRead($h1)) case $i Send(GUICtrlRead($i1)) case $j Send(GUICtrlRead($j1)) case $k Send(GUICtrlRead($k1)) case $l Send(GUICtrlRead($l1)) case $m Send(GUICtrlRead($m1)) case $n Send(GUICtrlRead($n1)) case $o Send(GUICtrlRead($o1)) case $p Send(GUICtrlRead($p1)) case $q Send(GUICtrlRead($q1)) case $r Send(GUICtrlRead($r1)) case $s Send(GUICtrlRead($s1)) case $t Send(GUICtrlRead($t1)) case $u Send(GUICtrlRead($u1)) case $v Send(GUICtrlRead($v1)) case $w Send(GUICtrlRead($w1)) case $x Send(GUICtrlRead($x1)) case $y Send(GUICtrlRead($y1)) case $z Send(GUICtrlRead($z1)) EndSwitch WEnd Link to comment Share on other sites More sharing options...
somdcomputerguy Posted October 14, 2009 Share Posted October 14, 2009 Take out the GUICtrlRead()'s - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
Zedna Posted October 14, 2009 Share Posted October 14, 2009 Look at _IsPressed(). Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
kjpolker Posted October 14, 2009 Author Share Posted October 14, 2009 I still can't get it to work and the _IsPressed confused me about the DLL's Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now