Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / [SOLVED] gettextinput to name picture to save not working

Author
Message
chromatic3d
13
Years of Service
User Offline
Joined: 7th Oct 2011
Location: rnd
Posted: 4th Nov 2023 10:09
I would like to use gettextinput to let users name a picture to save. I use starttextinput (the initial string doesn't seem to work either). I get the box and type in it and press enter. Everything seems fine but the string doesn't save a file name to the image. I am not sure if I have to change the input to be able to use it. I was adding the titlepic$+last$ together but it only names the file .png with no inputtext. I am using agk classic 12-12-22.

The author of this post has marked a post as an answer.

Go to answer

Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 4th Nov 2023 12:57 Edited at: 4th Nov 2023 13:01
This post has been marked by the post author as the answer.
can't say i've much experience with that command but:


meanwhile, i didn't see a RenameFile() command so it wouldn't have to make a copy of the file but i expect MadBit's FileExplore has one.

short on time ATM so i'll have to leave this here for now. hope that helps
chromatic3d
13
Years of Service
User Offline
Joined: 7th Oct 2011
Location: rnd
Posted: 4th Nov 2023 20:22
Thank you that fixed it. To make it clear this is what I use.

startTextInput()
repeat
sync()
until GetTextInputComplete()
SaveImage(2, GetTextInput()+".png")
deleteImage(2)

What I had problems with was I didn't use a repeat until loop and no sync(). Also I didn't know you can just GetTextInput() to get the typed text without using a string$. Thank you again Nomad for the help.

Login to post a reply

Server time is: 2024-11-21 15:47:34
Your offset time is: 2024-11-21 15:47:34