Online INI

Get help with using AutoHotkey and its commands and hotkeys
florisvos
Posts: 20
Joined: 15 Apr 2016, 06:26
Facebook: https://www.facebook.com/floris.vos.77

Online INI

24 May 2016, 08:59

Hello,

Today I made a script that's like a really basic chat program using an INI file stored on a shared folder which updates every second.

I was wondering if it would be possible to create a similar program that stores variables in a file that's online.

Seems like it's more difficult than I thought. Can anybody give me advice on this subject?

-Floris

UPDATE:
Would making an invisible IE COM object that stores text in - for example - a shrib.com note be a good option (I tried it and it works quite fine)? I would prefer something more "slick", going directly to a database or something, but maybe this is very difficult??
User avatar
AlphaBravo
Posts: 491
Joined: 29 Sep 2013, 22:59

Re: Online INI

24 May 2016, 13:08

Use DropBox and share your file, get a url link to it then use UrlDownloadToFile
User avatar
Masonjar13
Posts: 1515
Joined: 20 Jul 2014, 10:16
GitHub: Masonjar13
Location: Не Россия

Re: Online INI

24 May 2016, 15:13

Alternatively, if all the computers need to be authorized/recognized, you could use BitSync (I use it myself to sync my function library across my computers). You could also look into an FTP host (or host your own), then use Windows' built-in FTP program, which I've also done and works well.
OS: Windows 10 Pro | Editor: Notepad++
My Personal Function Library | Old Build - New Build
florisvos
Posts: 20
Joined: 15 Apr 2016, 06:26
Facebook: https://www.facebook.com/floris.vos.77

Re: Online INI

25 May 2016, 12:30

Hi,

Thanks for the help! Just wondering - if I use UrlDownloadToFile, how do I store my Variables back into the file that's in my DropBox? (i hope this isn't a stupid question)

I will look into FTP hosting.

To give an update - I managed to make a very small (1kb) program that makes chatting possible by storing the variables into a shrib.com note by making an invisible IE com object. Though it's completely useless it was fun to make and I will try to make it better just for fun - hopefully with a more professional way of storing the variables online.

Now I was thinking about making it so that the chat program works within an excel sheet. You could use it at your office job and it would look like you are working (entering data in the sheet) even though you are actually just chatting with some mates. Or maybe it could be used by office employees all around the world to start a revolution. Who knows.
User avatar
tidbit
Posts: 1178
Joined: 29 Sep 2013, 17:15
Location: USA

Re: Online INI

25 May 2016, 12:46

"Thanks for the help! Just wondering - if I use UrlDownloadToFile, how do I store my Variables back into the file that's in my DropBox? (i hope this isn't a stupid question)"
dropbox is a local file on your computer that automatically syncs/updates to the DB server (like a 'cloud') and automatically gets downloaded/synced/updated to other shared users. no download needed. just file read/write. but everyone needs dropbox and to have the file/folder sharing permissions

"I will look into FTP hosting."
you can host (and connect) your own FTP server for free with programs like filezilla (not sure if MS's built-in allows hosting or just connecting).
rawr. fear me.
*poke*
Is it December 21, 2012 yet?
User avatar
AlphaBravo
Posts: 491
Joined: 29 Sep 2013, 22:59

Re: Online INI

25 May 2016, 13:21

tidbit wrote:but everyone needs dropbox and to have the file/folder sharing permissions
all what you need to do is to get a dropBox Link, try this:

Code: Select all

MsgBox % URLToVar("https://dl.dropboxusercontent.com/s/pu7evc7ch5httbt/Share%20Test.txt")
return

URLToVar(URL){
    ComObjError(0)
    WebRequest := ComObjCreate("WinHttp.WinHttpRequest.5.1")
    WebRequest.Open("GET", URL)
    WebRequest.Send()
    Return WebRequest.ResponseText()
}
User avatar
tidbit
Posts: 1178
Joined: 29 Sep 2013, 17:15
Location: USA

Re: Online INI

25 May 2016, 16:47

but then that would only be him sharing. if anyone else wanted to talk, they couldn't upload/sync the file(s) to other users.
it'd be a one-way chat only the host (florisvos) could send messages to other people. Don't think that's what he wants.
rawr. fear me.
*poke*
Is it December 21, 2012 yet?
User avatar
AlphaBravo
Posts: 491
Joined: 29 Sep 2013, 22:59

Re: Online INI

25 May 2016, 19:03

tidbit wrote:but then that would only be him sharing. if anyone else wanted to talk, they couldn't upload/sync the file(s) to other users.
it'd be a one-way chat only the host (florisvos) could send messages to other people. Don't think that's what he wants.
I see your point, maybe the OP should give more details.
florisvos
Posts: 20
Joined: 15 Apr 2016, 06:26
Facebook: https://www.facebook.com/floris.vos.77

Re: Online INI

26 May 2016, 03:54

Sorry if I was unclear - tidbit gets the point. It's a chat, so all users should both upload and download.
I checked into the dropbox thing but it doesn't seem to be the solution.

FTP sounds interesting though it might be a bit above my abilities, though I really want to learn it! I'm gonna try to. Seems to me like it's a powerful tool for making scripts that are used by multiple users on different locations with communication between them.

The Shrib.com solution that I found on these forums is working really well. Maybe I'll share my little program on the forum.

Return to “Ask For Help”

Who is online

Users browsing this forum: GamesOfFreak, Lorien, mikeyww, teadrinker, Xtra and 59 guests