News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

whats wrong with this app?

Started by Coderx, June 27, 2011, 06:17:11 PM

Previous topic - Next topic

Coderx

hello all
i wrote a program which repeats user inputs ( using Journal record /playback ) , and for making that automatic
i used a timer , so that e.g each 5 seconds the program sits and records users behavior and in the next 5 seconds repeats it  .
the problem is this application works fine only for the first time ,!
when this program goes for the next round of recording current events and wants to play it , it gives an error message which says  ," File not found!" while the file  is there !
and some times program can successfully record/play users action for 3 times but after that it gives that error again .
i mean it seems its all by chance !
i actually used a source code and modified it this way , i attach both files in hope some body can help me get rid of this problem :)

and some thing else , this program runs in windows xp ( in compatibility mode for window 98 or it wont playback what its recorded) .
and i have no idea why it is like this , can anyone point out where this problem comes from too?

(win Makro is the original application with source code and the second file is my application which has the bug mentioned above )
thanks in advance

Coderx

Quote from: Coderx on June 27, 2011, 06:17:11 PM
hello all
i wrote a program which repeats user inputs ( using Journal record /playback ) , and for making that automatic
i used a timer , so that e.g each 5 seconds the program sits and records users behavior and in the next 5 seconds repeats it  .
the problem is this application works fine only for the first time ,!
when this program goes for the next round of recording current events and wants to play it , it gives an error message which says  ," File not found!" while the file  is there !
and some times program can successfully record/play users action for 3 times but after that it gives that error again .
i mean it seems its all by chance !
i actually used a source code and modified it this way , i attach both files in hope some body can help me get rid of this problem :)

and some thing else , this program runs in windows xp ( in compatibility mode for window 98 or it wont playback what its recorded) .
and i have no idea why it is like this , can anyone point out where this problem comes from too?

(win Makro is the original application with source code and the second file is my application which has the bug mentioned above )
thanks in advance

any help ? :(
i really need to solve this problem ,
please someone give me a hand :(

Vortex

Quote from: Coderx on June 27, 2011, 06:17:11 PM
hello all
i wrote a program which repeats user inputs ( using Journal record /playback ) , and for making that automatic

Could you tell us what exactly are you trying to achieve?

Coderx

Quote from: Vortex on June 28, 2011, 07:54:32 AM
Quote from: Coderx on June 27, 2011, 06:17:11 PM
hello all
i wrote a program which repeats user inputs ( using Journal record /playback ) , and for making that automatic

Could you tell us what exactly are you trying to achieve?
hello thank you for your attention :)
this is an assignment for assembly course ( final project )
the instructor asked to write a program in windows assembly which repeats users action , be it typing a character or pressing a button
the program should repeat it as if user himself/herself did it twice .
we first thought to go with keyboard hook , but since  keyboard was not enough , we searched more and found out about journals (record and playback ) which helps us record system events and then play them back .
we search for a sample and found one ( the one i attached ) , then after reading some tutorials from here ( at http://win32assembly.online.fr/)   we added a timer so that in some time slice , the program records users action using journalrecord hook and then , plays it by journal playback hook .
the program we altered works fine , but with a serious problem of crashing at some early points of running .
i mean when program runs , for the first 5 seconds ( time slice) , it records user inputs and plays it back just fine , but when it tries to go to the next round of recording and playing , it gives an error message " file could not be found " ,
program again might work 3 round of recording /playing successfully , but undoubtedly it crashes after that .
i myself think this has sth to with handles maybe , but im not sure , and i dont know how to go about it :(
this is all the story we had .
we asked for help at code guru but no one could help us so far :( , and i just found this place by chance, and asked my question hoping assembly professionals here help me .

BogdanOntanu

#4
Sorry,

Unfortunately this could be used as a mouse / key logger and it is also a homework assignment ...

Breaks two forum rules :D
Ambition is a lame excuse for the ones not brave enough to be lazy.
http://www.oby.ro