okay, i'm trying to get the same thing working. i am doing this and I see --
C:\test>adb shell monkey -p com.test --setup scriptfile -v -f /sdcard/ test.txt 1 :Monkey: seed=0 count=1 :AllowPackage: com.slacker.radio :IncludeCategory: android.intent.category.LAUNCHER :IncludeCategory: android.intent.category.MONKEY Replaying 0 events with speed 1.0 C:\test> My test.txt file looks like this -- # sample tap 160 200 # quit quit And my scriptfile looks like this -- # Script to start "monkey" on the device, which has a very rudimentary # shell. # base=/system export CLASSPATH=$base/framework/monkey.jar exec app_process $base/bin com.android.commands.monkey.Monkey $* ---- But nothing happens. Any ideas? tia. On Sep 12, 11:19 pm, Tez <earlencefe...@gmail.com> wrote: > Monkey network control working correctly. > Must be careful about scaling co-ordinates while using it. > > I hope this post helps others when they have problems. > > Cheers, > Earlence > > On Sep 12, 11:21 pm, Tez <earlencefe...@gmail.com> wrote: > > > count= number of events > > speed= in ms > > start data >> > > DispatchPointer(long downTime, long eventTime, int action, > > float x, float y, float pressure, float size, int metaState, > > float xPrecision, float yPrecision, int device, int edgeFlags) > > DispatchTrackball same as DispatchPointer > > DispatchKey(long downTime, long eventTime, int action, int code, > > int repeat, int metaState, int device, int scancode) > > DispatchFlip(boolean keyboardOpen) > > DispatchPress(int keyCode) > > LaunchActivity(String pkg_name, String cl_name) > > UserWait(long sleeptime) > > LongPress() > > > This is the format. > > You should be careful to ensure that the co-ordinates are correct. > > What you specify here are raw co-ords i.e before any window > > adjustments etc take place. You must take this into account while > > calculating co-ords. > > > I am yet to try the network control - Lets see what happens. > > > Cheers, > > Earlence > > > On Sep 12, 10:20 pm, Tez <earlencefe...@gmail.com> wrote: > > > > An update: > > > > I was using an incorrect script file. > > > The correct version is as described here > > > >http://android.git.kernel.org/?p=platform/development.git;a=blob;f=cm... > > > > I am trying to figure out what device code I need to use. Events are > > > being sent, but I cannot see output. > > > Will posts here once I get things working. > > > (I think the Network Control/scriptfile docs are confusing) > > > > Cheers, > > > Earlence > > > > On Sep 12, 9:34 pm, Tez <earlencefe...@gmail.com> wrote: > > > > > Hi, > > > > > I am trying to do 2 things with monkey > > > > > 1. Execute a script with a command like > > > > > adb shell monkey -p MY_PACKAGE --setup scriptfile -f /sdcard/ > > > > mon_script1.txt 1 > > > > > where mon_script.txt contains a few touch commands. After I execute > > > > this, I see nothing happening on the screen. It even does not give me > > > > the "Number of events injected message". > > > > I have verified that my touch co-ordinates fall over actual UI > > > > elements. > > > > > This is the script file I am using > > > > > tap 79 29 > > > > tap 100 100 > > > > tap 200 200 > > > > tap 300 300 > > > > quit > > > > > 2. Execute Monkey Network control to type commands individually. > > > > I start up monkey to listen to a port and use PuTTY to send commands. > > > > I get "OK" return messages, but nothing happens on the screen. > > > > > Whenever I use monkey in the random mode, I see interaction on the > > > > screen. > > > > But I need to get one of the above 2 methods to work. > > > > I have seen the sources of monkey and nothing seems to be wrong. > > > > Has anyone used monkey in the above described way? If so, please tell > > > > me what I am doing wrong. > > > > > Cheers, > > > > Earlence > > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en