hi all
help
multibyte Language dosnt work


mov al,byte ptr
or al,al
jz finish
push edx
invoke SendMessage,handle,WM_CHAR,eax,0
invoke Sleep,500



it fine work
but cant make delay
need delay

mov al,byte ptr
or al,al
jz finish
push edx
invoke PostMessage,handle,WM_CHAR,eax,0


:confused:

sorry,my english
Posted on 2003-01-13 22:17:45 by playh
Not sure why sleep doesn't work cause the below works here...


.386
.model flat,stdcall
option casemap:none

include windows.inc
include user32.inc
include kernel32.inc
includelib user32.lib
includelib kernel32.lib

.data
msg BYTE 'Hello my friend!',13,10
BYTE 'What about you?',0
app BYTE 'notepad.exe',0 ;'c:\windows\notepad.exe',0 < don't have
; and you shouldn't "hardcode" a path!!!
; not in windows on my machine or many "power users"
wndclass BYTE 'Notepad',0
childclass BYTE 'Edit',0

.data?
handle DWORD ?

.code
start:

invoke WinExec,ADDR app,SW_SHOW
call fndhandle
mov edx,offset msg
restart:
xor eax,eax
mov al,byte ptr [edx]
or al,al
jz finish
push edx
invoke SendMessage,handle,WM_CHAR,eax,0
invoke Sleep,10 ;500 <<< 500 works and 10 works.. looks more like my typing :-)
pop edx
inc edx
jmp restart
finish:
invoke ExitProcess,NULL

fndhandle proc
LOCAL temp :dword
invoke FindWindow,addr wndclass,0
mov temp,eax
invoke SetForegroundWindow,eax
invoke FindWindowEx,temp,0,addr childclass,0
mov handle,eax
ret
fndhandle endp

end start
Posted on 2003-01-13 22:43:41 by Gunner
fine work now

ok thx!!

restart:
xor eax,eax
mov al,byte ptr

or al,al
jz finish
push edx

.if(al & 80h) ; or IsDBCSLeadByte
mov ax,word ptr
invoke SendMessage,handle,WM_CHAR,eax,0
invoke Sleep,10
pop edx
add edx,2
.else
invoke SendMessage,handle,WM_CHAR,eax,0
invoke Sleep,10
pop edx
inc edx
.endif
jmp restart
Posted on 2003-01-14 00:46:39 by playh