.KEYWORD pscripts
.FLYINGHEAD POWER USER POWER
.TITLE Automate everything with pScripts
.DEPT
.SUMMARY In his fourth article in a series on using hacks to extend the power of your Palm handheld, Contributing Editor Michael Connick will show you how two programs, LapTopHack and peditPro, can be used in conjunction to automate many of the routine functions you perform on your Palm handheld. He’ll also introduce you to the powerful concept of pScripting, which is guaranteed to save you time and effort by simplifying common tasks.
.AUTHOR Michael Connick
This is the fourth article in a series on using hacks to extend the power of your Palm handheld. The first article (at http://www.palmpowerenterprise.com/issues/issue200205/hack001.html) discussed what hacks are and the hack management software needed to utilize them on your Palm handheld.
The second month’s article (at http://www.palmpowerenterprise.com/issues/issue200206/laptophack001.html) talked about how to use LapTopHack to greatly improve the usability of a Palm OS keyboard accessory.
Last month (at http://www.palmpowerenterprise.com/issues/issue200207/megawiki001.html) we talked about using the MegaWiki Hack to create Web-like hyperlinks between documents on your Palm handheld.
This month’s article will discuss using two programs: LapTopHack and peditPro (at http://home.columbus.rr.com/nevai/palm/) to automate many of the routine functions you may be performing on your Palm handheld.
.H1 What happened to the scheduled article on MacroPlay?
Readers of my past articles with good memories will recall that I’d promised an article on the MacroPlay for this month. MacroPlay (at http://www.palmgear.com/software/showsoftware.cfm?prodID=29076) is a great little hack that allows you to record your stylus taps, save them, and then replay them anytime you want. This allows you to automate many of the repetitive functions you may perform on your Palm handheld.
I used MacroPlay on my Palm handheld back when I promised to write an article on it. However, a few months ago I found a more powerful solution for automating activities on my handheld: pScripting. Don’t get me wrong, MacroPlay is a very nice piece of software. It’s just that pScripting is a far more powerful approach to automating Palm OS operations.
.H1 Why would I want to automate operations on my Palm handheld?
Let’s start off with a simple example. Deleting an appointment from your Date Book requires the following operations:
.BEGIN_LIST
.BULLET Tap the item to delete;
.BULLET Tap the Details button;
.BULLET Tap the Delete button in the Details Dialog box;
.BULLET Tap the OK button to confirm the deletion.
.END_LIST
Now, wouldn’t it be nice if you could automate this operation so that just one tap could make this entire operation take place, and have it happen just as quickly as your Palm handheld could perform the operations? How about even more complicated operations, like copying the contents of email message into Memo Pad notes, or creating templates in Memo Pad notes for recording meeting minutes? Wouldn’t it be great if they could just happen automatically?
That’s the whole purpose of this type of task automation: to make routine Palm OS operations easy and quick to perform. This type of automated computer task operation is commonly known as a macro. Macro packages are commonly available for PCs. MacroPlay and pScripting provide macro capabilities to Palm handhelds.
.H1 What is pScripting?
pScripting is scripting language. A scripting language is specialized programming language that can be used to drive the operation of another program or system. Simply put, it allows you to easily write programs that can make your Palm handheld automatically perform tasks that would normally require you to perform them manually.
pScripting is the scripting language that’s contained in the peditPro text editing software. It was first developed to automate operations within the peditPro software itself. However, when it’s used in conjunction with LapTopHack, it allows the operation of pScripts to be performed on any program on your Palm handheld.
pScripting allows you to create very sophisticated macros for your Palm handheld. More than just a recorder of screen taps, this powerful programming language allows you to simulate the entering of Graffiti input and even to branch to different macro logic depending upon the data contained in your Palm handheld.
.H1 What is peditPro?
peditPro is a very sophisticated text editor for the Palm OS. It can utilize the built-in Memo Pad database or use its own database to support notes of greater than 4,096 characters in length. It supports very sophisticated find and replace operations, and it provides excellent support for keyboard use.
In summary, peditPro is a worthy addition to almost anyone’s Palm handheld, just for its advanced text editing capabilities. What turned it into a "must have" for me is the fact that if you have it installed along with LapTopHack, its pScripting functions can be used with any Palm OS program.
.H1 How does pScripting work?
A pScript is basically a small computer program that’s written using peditPro. When you execute a pScript, peditPro steps through its contents and performs the actions you have defined. pScripts are stored in a special location within peditPro called the scriptPad.
Below is an example of a simple pScript. When executed, it will automatically type "Hello World!" into a text area in your current application.
.BEGIN_CODE
{hello::Hello/xsWorld!}
.END_CODE
Although the idea of writing "a small computer program" may sound daunting, creating pScripts is actually very simple. The documentation that comes with peditPro contains extensive information on pScripting, along with lots of examples. The benefits you can derive from the small amount of work it will take for you to learn pScripting should make the effort well worthwhile.
.H1 Just what can pScripting do?
Let me give you an example of something I use pScripting for everyday. In my article, "A simple solution for staying organized," in the February 2002 issue of PalmPower’s Enterprise Edition (at http://www.palmpowerenterprise.com/issues/issue200202/organized001.html), I showed a way to use the Memo Pad application for task management. I still use this technique today for laying out tasks to be performed in upcoming days. However, I now use an application called MindManager Mobile (at http://www.mindjet.com/products/mindmanager_mobile/mmme.htm) to create and maintain a "daily diary mind map" which contains, among other things, today’s tasks to perform. In the near future I plan on writing an article about using mind maps with your Palm handheld.
I use a pScript to automatically move tasks due today from the Memo Pad into MindManager Mobile. The important thing about this pScript is that it not only automatically copies the task from the Memo Pad, deletes the Memo Pad note that contained it, and copies it into MindManager Mobile, but it even moves it into the correct branch of the MindManager Mobile mind map based on the context of the task. Without this type of automation, it would be far too tedious for me to utilize this technique for managing my day’s activities.
.H1 Should I use pScripting?
If you find yourself performing the same multi-step tasks each day on your Palm handheld and wish that somehow it was smart enough to do this routine work itself, then pScripting may be just what you need. Even if you’ve never written any type of computer program before, if you start slowly you can master enough of pScripting to make it very valuable to you quite quickly.
.H1 Where can I get more pScripting information and support?
A huge help in learning how to create your own pScripts is the excellent support available on the Internet. First, there’s a Yahoo Groups mailing list devoted to using pScripting. It’s available at http://groups.yahoo.com/group/peditors/. Novices as well as experts regularly participate in this mailing list, and the experts are happy to answer beginners’ questions on pScripting.
Second, there’s a Web site devoted to pScripting. It’s located at http://peditors.com. It contains tutorials on using pScripting as well as example pScripts.
.H1 How about documentation?
The documentation is quite good. Almost half of the peditPro manual is devoted to pScripting. Every single feature of the scripting language is discussed in detail with lots of examples being used. Using the manual and the supplementary material discussed above, just about anyone should be able to pick up the pScripting language.
.BEGIN_KEEP
.H1 Conclusion
Installing LapTopHack and peditPro together on your Palm handheld will enable you to utilize a very powerful scripting language, pScripting, to automate almost any Palm OS operation you regularly perform. The full use of this very powerful tool is limited only by your imagination. Good documentation and a wealth of supporting material should enable just about anyone with an interest in automating activities on their Palm OS device to utilize pScripting.
.BEGIN_SIDEBAR
.H1 Product availability and resources
For more information on LapTopHack and peditPro, visit http://home.columbus.rr.com/nevai/palm/.
For more information on MacroPlay, visit http://www.palmgear.com/software/showsoftware.cfm?prodID=29076.
For more information on MindManager Mobile, visit http://www.mindjet.com/products/mindmanager_mobile/mmme.htm.
For the Yahoo Groups mailing list devoted to using pScripting, visit http://groups.yahoo.com/group/peditors/.
For a Web site devoted to pScripting, visit http://peditors.com.
For the article, "A simple solution for staying organized," by Michael Connick in the February 2002 issue of PalmPower’s Enterprise Edition, visit http://www.palmpowerenterprise.com/issues/issue200202/organized001.html.
For more information on Palm handhelds, visit http://www.palm.com.
.H1 Easy, flexible article reprints
ZATZ now offers a quick, easy, flexible and inexpensive way to use article reprints in your marketing and promotion efforts. You can now get article reprints for a one-time fee of only $200. For details, visit http://mediakit.zatz.com/reprints.
.END_SIDEBAR
.BIO
.DISCUSS http://powerboards.zatz.com/cgi-bin/webx?50@@.ee70113
.END_KEEP


