kideas
Junior Member
Posts: 69
|
Post by kideas on Jan 4, 2019 18:53:24 GMT
how do I send an http request to my script from browser or command line(curl). Since I'm using pro my script will be running nonstop; I want to be able to send some commands from browser which will trigger certain functions to make a POST request. thanks
|
|
|
Post by AnkuLua on Jan 5, 2019 1:13:02 GMT
You can use a server or a cloud drive file to make it real. For a server, send the http request to the server. Then the script check the data on the server by another http request.
It's almost the same for a cloud drive file. Just modify or update the cloud drive directly, instead of the http request.
|
|
kideas
Junior Member
Posts: 69
|
Post by kideas on Jan 5, 2019 16:15:21 GMT
You can use a server or a cloud drive file to make it real. For a server, send the http request to the server. Then the script check the data on the server by another http request. It's almost the same for a cloud drive file. Just modify or update the cloud drive directly, instead of the http request. thanks for the response. but please can you elaborate on the cloud drive for me. I'm lost. thanks
|
|
kideas
Junior Member
Posts: 69
|
Post by kideas on Jan 5, 2019 16:29:41 GMT
how do I make the connection between between the script and the server to stay Alive
|
|
|
Post by AnkuLua on Jan 5, 2019 23:09:33 GMT
You can use a server or a cloud drive file to make it real. For a server, send the http request to the server. Then the script check the data on the server by another http request. It's almost the same for a cloud drive file. Just modify or update the cloud drive directly, instead of the http request. thanks for the response. but please can you elaborate on the cloud drive for me. I'm lost. thanks Here is a example of drive box. 1. Have a file on the drop box called version.lua latestVersion = "1.3.4" 2. Get the link to dropbox. Modify and make sure the link ends with "?dl=1" 3. Try following script versionString = httpGet("https://www.dropbox.com/s/9g9ihn0uko97cah/version.lua?dl=1")
print (versionString)
f = loadstring(versionString) f()
print (latestVersion )
|
|
|
Post by AnkuLua on Jan 5, 2019 23:10:57 GMT
how do I make the connection between between the script and the server to stay Alive Didn't catch you. If the server is alive, then the connection is alive.
|
|
kideas
Junior Member
Posts: 69
|
Post by kideas on Jan 7, 2019 14:24:53 GMT
how do I make the connection between between the script and the server to stay Alive Didn't catch you. If the server is alive, then the connection is alive. Thanks for the response. I get the concept now but I still have a question. So with this approach the script has to check for the data on seconds basis or only once? Cos the goal is to respond to a change or update in the cloud file whilst the script is already running- how do I achieve that please??
|
|
|
Post by AnkuLua on Jan 7, 2019 14:27:33 GMT
Didn't catch you. If the server is alive, then the connection is alive. Thanks for the response. I get the concept now but I still have a question. So with this approach the script has to check for the data on seconds basis or only once? Cos the goal is to respond to a change or update in the cloud file whilst the script is already running- how do I achieve that please?? The script need to check the data regularly. As how long to check the the data, it's up to you.
|
|
kideas
Junior Member
Posts: 69
|
Post by kideas on Jan 7, 2019 14:33:10 GMT
OK. so how can I check it synchronously whilst the script performs other foreground tasks. For instance, the script will be doing some clicks whilst it checks the data simultaneously at the background...thanks
|
|
|
Post by AnkuLua on Jan 7, 2019 22:05:42 GMT
OK. so how can I check it synchronously whilst the script performs other foreground tasks. For instance, the script will be doing some clicks whilst it checks the data simultaneously at the background...thanks No. You can't do them synchronously. You can do it if you know that the script is just waiting some event to happen. For example, waits the auto battle to end.
|
|