I'm trying to create an app that let the user:
- fill in a number in a text entry field
then
- Capture a picture with the camera
then
Send this picture by e-mail to a predetermined e-mail address with the text entered in the 'text entry field' as a subject but with fixed text in front of the entered text. Attached to the e-mail the picture with the date and time as filename. The send from address must be from the default account of the user.
The text entry field must only accept numbers and dots.
- How can I add the dot as an accepted key?
- How can I limit the input field to max 9 characters?
Code: Select all
on keyDown theKey
## Check whether theKey is a number or dot
if theKey is not a number or theKey is not a "." then
## If not beep to alert the user
beep
else
## If it is pass keyDown up the message path
## The engine will handle the message and the key will appear in the field
pass keyDown
end if
end keyDown
Code: Select all
on mouseUp
mobilePickPhoto "camera"
end mouseUp
Code: Select all
put tempPhoto into myData["file"]
put "image/jpg" into myData["type"]
put "File Name" into myData["name"]
mobileComposeMail "My subject", , , , "My body", myData
To answer also a question you have after reading this; yes I'm trying to program
