need help with OnEvent command
Moderators: Dorian (MJT support), JRL
need help with OnEvent command
I ran this test code for the OnEvent command to see if it would execute
as I expected.
Label>start
OnEvent>KEY_DOWN,a,0,KeyPress1
OnEvent>KEY_DOWN,s,0,KeyPress2
OnEvent>KEY_DOWN,d,0,KeyPress3
OnEvent>KEY_DOWN,f,0,KeyPress4
SRT>KeyPress1
MessageModal>a was pressed
END>KeyPress1
SRT>KeyPress2
MessageModal>s was pressed
END>KeyPress2
SRT>KeyPress3
MessageModal>d was pressed
END>KeyPress3
SRT>KeyPress4
MessageModal>f was pressed
END>KeyPress4
Goto>start
When run the message box displays after the first event, then if I close out the message box and
and try another key I get violation messages.
ex.
'access violation at address 0048021B in module 'mssched.exe'.read of address 00000180'
as I expected.
Label>start
OnEvent>KEY_DOWN,a,0,KeyPress1
OnEvent>KEY_DOWN,s,0,KeyPress2
OnEvent>KEY_DOWN,d,0,KeyPress3
OnEvent>KEY_DOWN,f,0,KeyPress4
SRT>KeyPress1
MessageModal>a was pressed
END>KeyPress1
SRT>KeyPress2
MessageModal>s was pressed
END>KeyPress2
SRT>KeyPress3
MessageModal>d was pressed
END>KeyPress3
SRT>KeyPress4
MessageModal>f was pressed
END>KeyPress4
Goto>start
When run the message box displays after the first event, then if I close out the message box and
and try another key I get violation messages.
ex.
'access violation at address 0048021B in module 'mssched.exe'.read of address 00000180'
Works for me...
Try adding a small wait at the end
OnEvent>KEY_DOWN,a,0,KeyPress1
OnEvent>KEY_DOWN,s,0,KeyPress2
OnEvent>KEY_DOWN,d,0,KeyPress3
OnEvent>KEY_DOWN,f,0,KeyPress4
Label>start
SRT>KeyPress1
MessageModal>a was pressed
END>KeyPress1
SRT>KeyPress2
MessageModal>s was pressed
END>KeyPress2
SRT>KeyPress3
MessageModal>d was pressed
END>KeyPress3
SRT>KeyPress4
MessageModal>f was pressed
END>KeyPress4
Wait>0.1
Goto>start
Try adding a small wait at the end
OnEvent>KEY_DOWN,a,0,KeyPress1
OnEvent>KEY_DOWN,s,0,KeyPress2
OnEvent>KEY_DOWN,d,0,KeyPress3
OnEvent>KEY_DOWN,f,0,KeyPress4
Label>start
SRT>KeyPress1
MessageModal>a was pressed
END>KeyPress1
SRT>KeyPress2
MessageModal>s was pressed
END>KeyPress2
SRT>KeyPress3
MessageModal>d was pressed
END>KeyPress3
SRT>KeyPress4
MessageModal>f was pressed
END>KeyPress4
Wait>0.1
Goto>start
Problems still do resurface with this code . With the Wait it executes as expected most of the time but the violation messages still apprear on
occasion. I have cranked up the Wait to various times and that doesn't
seem to effect the occassional violation messages.
Is there any possibilty that this code can fail depending on the windows
that are opened?
occasion. I have cranked up the Wait to various times and that doesn't
seem to effect the occassional violation messages.
Is there any possibilty that this code can fail depending on the windows
that are opened?
I tried opening different apps and could not make this script fail.
The error "access violation at address xxxxx" would indicate a memory conflict. This could be related to something running on your computer perhaps even a background application. It might also be related to your operating system.
I'm running WinXP SP1. I have nothing special running in the background. I don't have any memory intensive apps like CAD, Image editing or games.
This may be a question Marcus will have to answer. Or perhaps someone who has high memory usage apps could test this script?
Later,
Dick
The error "access violation at address xxxxx" would indicate a memory conflict. This could be related to something running on your computer perhaps even a background application. It might also be related to your operating system.
I'm running WinXP SP1. I have nothing special running in the background. I don't have any memory intensive apps like CAD, Image editing or games.
This may be a question Marcus will have to answer. Or perhaps someone who has high memory usage apps could test this script?
Later,
Dick
I'm also running xp (pro) and I don't have anything unusual running in the
background.
As a matter of fact when I am working my way through learning the program outside of a firewall it's the only program running.
This violation will occur when I have the main window of MS open rather than minimized.
I would like Marcus to answer this but I'm not sure how I can get him to do that.
I have reinstalled the ghost image of my OS to factory and have reinstalled MS just to cover as many bases as I can.
background.
As a matter of fact when I am working my way through learning the program outside of a firewall it's the only program running.
This violation will occur when I have the main window of MS open rather than minimized.
I would like Marcus to answer this but I'm not sure how I can get him to do that.
I have reinstalled the ghost image of my OS to factory and have reinstalled MS just to cover as many bases as I can.