The first sleep is to wait for the messaging application to open. If it doesn't open within 4 seconds, then the current application is going to get a bunch of keystrokes that hopefully won't hurt it.
The second sleep is because the script seemed to just stop after the "g" keystroke. I thought maybe it was hitting the "t" to quickly, and the sleep(500) fixed it.
This will work for now. At some point I'd like to figure out how to do it without the first pause and use "WaitForActive" instead, but I just don't know how I could do it.
The first sleep is to wait for the messaging application to open. If it doesn't open within 4 seconds, then the current application is going to get a bunch of keystrokes that hopefully won't hurt it.
The second sleep is because the script seemed to just stop after the "g" keystroke. I thought maybe it was hitting the "t" to quickly, and the sleep(500) fixed it.
This will work for now. At some point I'd like to figure out how to do it without the first pause and use "WaitForActive" instead, but I just don't know how I could do it.
Try a SendContext at the sleep 500
Put something like this at the top for when you get famous:
# NewText.mscr
# for Treo 700 WX
#
# Note -- this code does not work with Treo 700w (yet).
# ....
I challenge you to create a version that works for both or either.
Hint: search for "Treo" in the registry.
Also, the "g" would change to a "w" for the 700w.
Put something like this at the top for when you get famous:
# NewText.mscr
# for Treo 700 WX
#
# Note -- this code does not work with Treo 700w (yet).
# ....
I challenge you to create a version that works for both or either.
Hint: search for "Treo" in the registry.
Also, the "g" would change to a "w" for the 700w.
-- JDC
I have neither the 700w or the 700wx, I have an 8525. But I accept your challenge.
Code:
x = RegKeyExists ([some key that only exists on the 700w])
if ( x=1 )
New( "Message" )
WaitForActive( "Messaging", 10 )
SendKeys( "Messaging", "t" )
Sleep (1000)
SendCR ("Messaging")
Else
Run( "\Windows\Start Menu\Messaging.lnk")
Sleep (4000)
SendRightSoft()
SendKeys("g" )
Sleep (500)
SendKeys("t" )
SendLeftSoft()
EndIf
Of course, my if statement didn't work at all before, so I don't know if this one would work, and I don't have access to a treo to look at the registry to see what keys I might be able to use.
Is there a key that might just contain the name of the device but couldn't find anything.
My real next scripting project will be to figure out how to turn on the camera flash so I can use it as a flashlight. The camera app which you have to use to access it does not have any keyboard commands.
I have neither the 700w or the 700wx, I have an 8525. But I accept your challenge.
Code:
x = RegKeyExists ([some key that only exists on the 700w])
if ( x=1 )
New( "Message" )
WaitForActive( "Messaging", 10 )
SendKeys( "Messaging", "t" )
Sleep (1000)
SendCR ("Messaging")
Else
Run( "\Windows\Start Menu\Messaging.lnk")
Sleep (4000)
SendRightSoft()
SendKeys("g" )
Sleep (500)
SendKeys("t" )
SendLeftSoft()
EndIf
Of course, my if statement didn't work at all before, so I don't know if this one would work, and I don't have access to a treo to look at the registry to see what keys I might be able to use.
Is there a key that might just contain the name of the device but couldn't find anything.
My mistake, I thought you had a Treo.
The IF logic looks ok-ish. If the script found its way onto another WM phone.. or a PC, it might not work... and on the PC, it would definately not work.
All I could find in the registry related to the Treo 700w was a USB serial driver referenced, but that's not difinitive. I was asking not cuz I knew.. but hoped you'd finger it out for me.
My real next scripting project will be to figure out how to turn on the camera flash so I can use it as a flashlight. The camera app which you have to use to access it does not have any keyboard commands.
Here's my pitiful install of a free "flashlight".
Please don't laugh at me.
While posting this, I thout of another Script... this one for the PC...
Both my screencap pgms create .bmp files. These raster formats are not very space friendly... I usually convert these 400k files to .jpg and they end up less than 20k -- same 240x240 resolution.
Even IF there is a product to batch process an entire dir full of bmp --> .jpg, I still want to create a script... to experiment with dir and file manipulations.
SendContext != In my documentation. I think I need to upgrade!
my assumption is that it's the center button on the 4-way pad.
someone correct me if I'm wrong... or wong. I can take it, even when I can't keep my eyes o............................................................... .... .........
While posting this, I thout of another Script... this one for the PC...
Both my screencap pgms create .bmp files. These raster formats are not very space friendly... I usually convert these 400k files to .jpg and they end up less than 20k -- same 240x240 resolution.
Even IF there is a product to batch process an entire dir full of bmp --> .jpg, I still want to create a script... to experiment with dir and file manipulations.
Comes with a "lite" version that will just turn on and off the lamp when it's called. Only works on HTC phones, sorry Palm users
Okay, now my real next scripting project is an application launcher. I want it to work by hitting a button, then allowing me to hit any other button to launch a specific app. I had a program like this on my treo 650 and it turned 4 hardware buttons into 16 application launching buttons.
I put together this tool to create personal aliases and to automate message creation. I've put it through the paces on my Treo, and it seems to work, although I would appreciate feedback from anyone brave enough to try it
I'm sure there must be some kinks to work out...
#
# Mailbot: automatically construct messages based on templates
#
# - Create custom templates for email
# - Create personal aliases
# - Customized signatures per email alias or template
# - Create blind distribution lists
# - Create aliases for text-messaging with canned content & signatures
# - Allows for very large signatures and body (which mailto and poutlook don't support)
There is an included README file that explains a little about it, but if you look at the included config file (mailbot.cfg) it should be fairly obvious. Essentially, you create templates for email or text messaging using an editor on the config file, and then mailbot parses the config file, prompts you for which template to use, and then automatically starts up a new message with everything you've specified already in it.
As a postscript, this tool is somewhat of a compromise because I really tried to avoid implementing this via simulated input and copy/paste (in terms of creating a clean solution). Unfortunately, Pocket Outlook, PIE, and WM conspired against me; the mailto implementation is too flaky and has too many limitations, at least in WM5.
Last edited by zbop; 02/19/2007 at 03:09 PM.
Reason: new version, should be more portable
zbop - once again, that's some amazing code. it all worked for me -- as writ -- except the last option had the subject line in one of the dist'n lists.
if you continue like this, providing gems with every post, then we may have to send a mass-mailing to mort's paypal acct in your honor.
-- JDC
(e-signature sent via PalmŪ Treo 700w
running a self-propelled MortScript
commanded to execute by voice
while driving my car handsfree)
Last edited by jdcochran; 02/19/2007 at 10:31 AM.
Reason: looks like i was asleep when I posted the first attempt.
hmm
Diverguy I could write it into your treo on mute.
I could REGREAD CURRENT Charger connect setting then on ringer mute REGWRITE the NO SOUND MID.That would of coures be tied into my version nled-led alert script- ringer mute led off.
Update.
If you want to hold off on the reg edit above I will mod ledalert script.I will have it for you on thursday.
Thanks, slingbox. I appreciate the willingness but it turns out it won't be necessary.
I checked the Windows folder and found the file ChargerDisconnect.mid. Employing massive quantities of deductive reasoning, I figured this is probably the sound the plays when disconnecting from the charger. So, I used PHM Registry Editor and ran a search for that file. It was found in HK Current User, ControlPanel, Volume, ChargerDisconnectSound. I edited the value of the only key in there, deleted that midi file, then waited about ten minutes before performing a soft reset. That took care of the problem!
Not sure that which treo you are using, looking at the examples, I am assuming that it is not a 750. That said, "should" I be able to point to "Messaging" or does the account already have to have part of pocket outlook? Thanks.
Jeff
Originally Posted by zbop
Okay, since we're on the subject of messaging...
I put together this tool to create personal aliases and to automate message creation. I've put it through the paces on my Treo, and it seems to work, although I would appreciate feedback from anyone brave enough to try it
I'm sure there must be some kinks to work out...
Not sure that which treo you are using, looking at the examples, I am assuming that it is not a 750. That said, "should" I be able to point to "Messaging" or does the account already have to have part of pocket outlook? Thanks.
Jeff
We went thru this analysis with Sam-I-am... he's not using a Treo. My guess is that it'll work to some degree if "Message" is registered at:
Try it out. If it don't work, take note of the error messages. If it hangs up, look at the running programs with (a) Task Manager and stop the script's execution.
Thanks for responses regarding using the treo700w as a gps camera for uploading images. There is no data copied to the buffer. The GPS data comes in a data stream from the com8 port and the values for lat,lon,alt are comma delimited with a particular syntax.
Perhaps using the camera app to take a picture, then initiating a script to send the picture as a message to flickr account. Flickr has the ability to pull apart the body of a message received that has an image attached if the body of the message contains the GPS data. All that is needed is a script that when initiated say after an image has been taken, creates send message, grabs com8 output, and drops it in the body of a message, and sends to flickr account.
Obviously what is really needed is a better camera app that actually contemplates geotagging as part of it's functionality.