Skip to main content

Posts

Showing posts with the label scripting

sl4a python notify question

I have two questions regarding the sl4a scripting language. I'd like to develop a python script that will be periodically contacted by a server and post some information to the notification bar.

How do you use scripting language (PHP, Python, etc) to improve your productivity?

I'm a Delphi developer on the Windows platform, recently read the PHP tutorial at W3CSchools, it looks interesting. We all know scripting languages are very good at web site development, but I also want to utilize it to improve my productivity or get some tedious tasks done quickly, maybe some quick-and-dirty string/file processing? What do you usually do with scripting languages apart from software development? And we need a responsive, decent IDE/editor in order to gain productivity when writing scripts for this purpose? Source: Tips4all

monkey runner random generation

When I want to input some character I do it like this device.press("0",MonkeyDevice.DOWN_AND_UP) this makes input of char '0', and it works great but the problem is I want to enter random numbers between 0 and 9 for let say 1000 times how can I do this ? how can I play with random generation in monkeyrunner I want randomly to choose between: device.press("0",MonkeyDevice.DOWN_AND_UP) device.press("1",MonkeyDevice.DOWN_AND_UP) device.press("2",MonkeyDevice.DOWN_AND_UP) device.press("3",MonkeyDevice.DOWN_AND_UP) ... device.press("9",MonkeyDevice.DOWN_AND_UP) EDIT I want to do this device.press("Random Number between zero and nine",MonkeyDevice.DOWN_AND_UP) device.press("Random Number between zero and nine",MonkeyDevice.DOWN_AND_UP) device.press("Random Number between zero and nine",MonkeyDevice.DOWN_AND_UP) device.press("Random Number between zero and nine",MonkeyDevi