Mailto not working...
gyroscope
I am here.Member, Sous Chef, PRO Posts: 6,598
Hi, I've probably made a simple mistake but can't work out what it is; the following doesn't open email:
"myemail@bti.com".."?".."subject="..game.short title.."&body="..game.long text
Any help appreciated thanks.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Comments
Not sure it will make a difference, but could you combine whole first part into "myemail@bti.com?subject=".
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
@jamie_c Hi Jamie, thanks, I'll try that. Though to say, it works fine up until I add ".."&body="..game.long text"
Edit: that didn't work unfortunately.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Along those lines, I did try "&body=game.long text" - the email opened showing the correct subject but the body text says: vars['game.attributes.id246985']
Also tried my original way with text in place of the attribute and it worked.... so it seems there's a problem with using an attribute for body copy in mailto... shame. Hope there's a solution...
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
@gyroscope, I had posted a mailto sample in the thread below last summer. It still seems to work fine, it uses table data though. Maybe it will help.
http://forums.gamesalad.com/discussion/comment/483648#Comment_483648
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
Thanks, Jamie, I've just discovered that and it's helped me work out the problem I'm having: mailto needs %20 for spaces - it can't deal with a text attribute without them, nor a table entry.
So I'll have to add %20 to the saved attribute every time a user presses space. A bit of a nuisance, but workable.
Thanks again for your help.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Cool, glad you got it working at least.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
@gyroscope, you can use the textReplaceAll function to prepare the text at the time of sending.
textReplaceAll(game.yourTextString," ","%%20")
Note the double "%".
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com
Hi @Hopscotch - would you believe I've just this minute tried textReplace all - and was downhearted that it didn't work - but now I see you need the double % - excellent, much pleased, thank you!
Edit: can't seem to get that to work either (works with characters but not space)- are you using option-space for the space, or something different, I wonder?
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Sorted it: I can have the user add a + for each space, have the space show normally on screen, then replace the + signs with "%%20" for output via email.
Good stuff, thanks again, @Hopscotch.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
@gyroscope I just stumbled upon this thread and you don't need to do the + business - make a self attribute, type a space into it, and use that as the search string. Alt-Space and a genuine space are different characters, but passing the space through an attribute lets you search for a genuine space.
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
@Armelline Hi Ted, thanks for that. The app is finished and in the store now
( https://itunes.apple.com/gb/app/ambient-writer/id955139739?mt=8 )
but that's useful for future reference.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps