Active Topics

 


Reply
Thread Tools
Posts: 2 | Thanked: 0 times | Joined on Nov 2009
#1
Is there some simple shell scripting support in Maemo5? I know python is supported but not sure about its capabilities. I'm looking for something like the applescript in Mac which can easily communicate with installed applications.

e.g. Is it possible to write a simple script which will open up the SMS app, select a hard-coded contact and fill the body with a template and even send the message if needed. Meaning I can send a pre-set SMS with just a single tap

what will be the best way to achieve this?

Thanks,
 
dormant's Avatar
Posts: 332 | Thanked: 76 times | Joined on Oct 2007 @ St. Augustine, Trinidad and Tobago
#2
bash and perl are there for scripting. Probably others as well.

I would hope that most apps are launchable from the command line, so it shouldn't be hard to do the sort of things you describe.
__________________
  • N900
  • N800
  • LD-3W
  • two magic OTG USB adapters
  • crossed fingers
 
jeremiah's Avatar
Posts: 170 | Thanked: 261 times | Joined on Feb 2009 @ Gothenburg, Sweden
#3
Yes, there is shell scripting support in Maemo 5. You can use the default shell (ash) or you can download bash. bash is currently version 2.05.

There is also python 2.5 and perl 5.8.3, both of which you can call from the command line:
-> python -c 'print "hi"'
-> perl -e 'print "hi\n"'

If you want to interact with the device and its various features, one of the ways to do that is to use the dbus interface. There is lots of dbus documentation out there, here is an older maemo wiki entrey: http://maemo.org/community/wiki-closed/dbusguide/
 

The Following 3 Users Say Thank You to jeremiah For This Useful Post:
Posts: 2 | Thanked: 0 times | Joined on Nov 2009
#4
Thanks guys,

didn't knew about the DBUS interface, will look into this. It will be good to see more detailed documentation with python examples on wiki. Found some useful info on python support here: http://pymaemo.garage.maemo.org/development.html
 
Reply


 
Forum Jump


All times are GMT. The time now is 16:46.