Don't have an account yet? Then register once and completely free of charge and use our wide range of topics, features and great options. As a registered member on our site, you can use all functions to actively participate in community life. Write posts, open topics, upload your pictures, put your videos online, talk to other members and help us to constantly improve our project and grow together! So, what are you waiting for? Become a part of us today!
To get support for a technical issue such as installing the software, to query a purchase that you've made/would like to make, or anything other than using our software, please visit our Customer Service Desk:
Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.
A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.
Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!
So this is what I have, I have a get object that's accessing an external web page and I'd like to check the response code to display a different message.
Right now I have "On Get Complete" set to change the alterable text of my string object to the response code and then it displays that alterable text.
I'd like this to be a little more informative to the end user, however, but I can't seem to figure out how to do if statments in CF.
I'd like to do this....
Code
if( Recieved$( "Response Code" ) == 404 ) {
set alterable string to "404 Page not Found, please contact the admin"
} else if ( Recieved$( "Response Code" ) == 404 ) {
set alterable string to "200 Status Okay, request recieved."
}
I'm a PHP developer and this is my very first attempt at anything in CF so I'm a little confused on how to write such a conditional statement in CF.
I dont know much about the GET object but here is some Python script that can POST data to a PHP server.
Code
import socket
# Create a TCP/IP socket
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
# Get data to send
temperature = input("Enter Temp: ")
# Connect the socket to the port where the server is listening
ip = socket.gethostbyname('iot.mitchelectronics.co.uk')
server_address = (ip, 80)
print('connecting to {} por {}'.format(*server_address))
try:
sock.connect(server_address)
except Exception as e:
print("something's wrong with %s:%d. Exception is %s" % (address, port, e))
finally:
dataToSend = "temperature=" + str(temperature) + "&var=20"
POSTDATA = "POST /submit.php HTTP/1.1\r\n" + "Host: iot.mitchelectronics.co.uk\r\n" + "Content-Type: application/x-www-form-urlencoded\r\n" + "Content-Length: " + str(len(dataToSend)) + "\r\n" + "\r\n" + dataToSend
sock.send(POSTDATA.encode())
sock.close()
print(POSTDATA)
Display More
Here is some info on GET and POST
Please login to see this link. Please login to see this link.
I imagine that with the GET object, you simply sent a GET request to a HTTP website (MUST contain Please login to see this link. and the website returns some data which you can get once the GET is done (see the attached simple example). POST data is interesting, you send a variable name and then you assign a value to that name (see the python code about).
The Get object is really simple. It can send and retrieve data. You can send Get Data in the url like this: Please login to see this link.. You can also send Post Data using the Add Post Data action.
I don't speak PHP (I'm a .Net guy), so I don't know exactly what you must do to retrieve the Get and Post calls on your server, but it seems it involves using $_POST and $_GET. Google it! Basically you create code that collects the data and use it the way you want.
To call your server from Fusion, add Post data and THEN get the url. The order is important. To retrieve the data, create a new event and add the On Get Complete condition. You may display the data using a string, edit object or similar and setting it to Received$( "Get Object" ).
That was absolutely what I needed to know! I'm a PHP developer myself so doing the PHP is no issue at all, but I had no clue how to get started with the GET Object and trying to google that has turned out to be frustrating to say the least!
Thank you so much, this will help me significantly!
This is probably a silly question as I'm sure there's a ton out there but I'm not able to find a tutorial on using the GET Object. Could someone point me to a good...video or text.
I'm attempting to send some data to a PHP script sitting on my web server and wait for the response from the page. However, I can't find anything on the GET Object, and the search term "Clickteam Fusion Get Object" pulls up everything BUT the GET Object. The only tutorial I saw was on YouTube...and it was in Russian (I speak English).
Seems like you have it set for API17 and you don't have that installed. Try changing that to the version you have installed with the SDK Manager (21 and up)
I just figured it out and was coming here to post it. You're absolutely right, I didn't have the appropriate API installed. I've installed thema and I'm good to go now! Thanks so much for the help!
I'll admit up front, I'm not an android developer, and this is my first time using CF (so maybe I have a setting checked that shouldn't be). I was pulling my hair out trying to figure out this SDK thing until I came to this thread, so that's one problem solved. Is this something CF will be addressing (if anyone knows), the removal of the ant folder by google.