Scott,
Here is the script you asked, an adaptation of a Dixie's script.
it works fine,except you have to double click on a word to open native control cut,copy,paste,replace,define and speak and click on speak.
The next step called "doSpeakByMyexternal" is not available but you can click on the speak btn.
I hope someone can find a way to do directly
Best regards
Jean-Marc
Code: Select all
local inputID
on openCard
if environment() <> "mobile" then exit openCard
iphoneControlCreate "multiline"
put the result into inputID
iphoneControlSet inputID, "rect", the rect of grc 2
iphoneControlSet inputID, "visible", "true"
iphoneControlSet inputID, "opaque", "false"
iphoneControlSet inputID, "fontName", "Helvetica"
iphoneControlSet inputID, "fontSize", 24
iphoneControlSet inputID, "textColor", "0,0,0"
iphoneControlSet inputID, "borderStyle", "none"
--iphoneControlSet inputID, "clearButtonMode", "unless editing"
iphoneControlSet inputID, "autoCapitalizationType", "sentences"
iphoneControlSet inputID, "autoCorrectionType", "Yes"
iphoneControlSet inputID, "autoClear", "true"
iphoneControlSet inputID, "text", "bonjour"
end openCard
on doSetTextInNatFld
get fld "fText"
put 1 & "," & the num of chars of it into tSelect
iphoneControlSet inputID, "text", it
iphoneControlDo inputID, "focus"
iphoneControlSet inputID, "selectedRange", tSelect
--•• ToDo
-- send doSpeakByMyexternal-- not available
--•••
end doSetTextInNatFld
on closeCard
iphoneControlDelete inputID
end closeCard
on inputBeginEditing
--put iphonecontrolGet(inputID, "text") into fld "fDev"
--iphoneControlSet inputID, "textColor", "0,0,0"
end inputBeginEditing
on inputTextChanged
--iphoneControlSet inputID, "textColor", "0,0,0"
--put iphonecontrolGet(inputID, "text") into fld "fDev"
end inputTextChanged
on inputEndEditing
put iphonecontrolGet(inputID, "text") into fld "fDev"
iphoneControlSet inputID, "textColor", "0,0,0"
--answer iphonecontrolGet(inputID, "text")
end inputEndEditing