AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Automate Autohotkey.net WITHOUT using ftp?

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> General Chat
View previous topic :: View next topic  
Author Message
thefunnyman



Joined: 04 Aug 2007
Posts: 22

PostPosted: Mon Aug 06, 2007 6:07 pm    Post subject: Automate Autohotkey.net WITHOUT using ftp? Reply with quote

I'm curious if there is a way to auto-upload a file to my autohotkey.net space WITHOUT using ftp. The reason I make this request is, that I do not have authority to use ftp at work. I can go into the site and upload a file all I want, but ftp access is DENIED!

I am ok with physically navigating to the page and performing all the functions in a macro, i just don't like counting tabs and putting sleeps into the code to make it perform everything it needs to. I was wondering if there was a better, more efficient, way, possibly through javascript ( I have no javascript knowledge so i'm not sure if this would be possible ) or something like that.

Any thoughts from anyone?
Back to top
View user's profile Send private message
engunneer



Joined: 30 Aug 2005
Posts: 6551
Location: Pacific Northwest, US

PostPosted: Mon Aug 06, 2007 6:51 pm    Post subject: Reply with quote

search the forum for bookmarklets. Also, this should be in the ask for help section. A moderator may move it eventually.
_________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM
Back to top
View user's profile Send private message Visit poster's website
thefunnyman



Joined: 04 Aug 2007
Posts: 22

PostPosted: Mon Aug 06, 2007 7:14 pm    Post subject: Reply with quote

The reason I posted this here is b/c I didn't think that it was technically an AHK question. I guess it's all a matter of perception. Thanks for the search tip though...maybe i can muddle my way through some basic javascript, assuming it's possible.
Back to top
View user's profile Send private message
engunneer



Joined: 30 Aug 2005
Posts: 6551
Location: Pacific Northwest, US

PostPosted: Mon Aug 06, 2007 8:27 pm    Post subject: Reply with quote

well if you are trying to automate it through ahk, it becomes an ahk question
_________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM
Back to top
View user's profile Send private message Visit poster's website
Titan



Joined: 11 Aug 2004
Posts: 5026
Location: imaginationland

PostPosted: Mon Aug 06, 2007 8:31 pm    Post subject: Reply with quote

The file manager uses standard HTTP Post for file uploads and session cookies for user authentication so you should be able to manage files without using macros using cURL.

I've moved this to ask for help because you basically want a macro.
_________________

RegExReplace("irc.freenode.net/autohotkey", "^(?=(.(?=[\0-r\[]*((?<=\.).))))(?:[c-\x73]{2,8}(\S))+((2)|\b[^\2-]){2}\D++$", "$u3$1$3$4$2")
Back to top
View user's profile Send private message Visit poster's website
thefunnyman



Joined: 04 Aug 2007
Posts: 22

PostPosted: Mon Aug 06, 2007 9:23 pm    Post subject: Reply with quote

No ahk help was needed/wanted...I tried it w/ ahk and didn't like how it worked, so i posted to a place that was not a designated area for ahk help. That way, i could get advice from the nice, knowledgeable, people of this community about a NON-AHK problem. Thanks Titan. I'll see what I can do with that information.
Back to top
View user's profile Send private message
Titan



Joined: 11 Aug 2004
Posts: 5026
Location: imaginationland

PostPosted: Mon Aug 06, 2007 9:37 pm    Post subject: Reply with quote

Sorry for the misunderstanding, I've moved it back.
_________________

RegExReplace("irc.freenode.net/autohotkey", "^(?=(.(?=[\0-r\[]*((?<=\.).))))(?:[c-\x73]{2,8}(\S))+((2)|\b[^\2-]){2}\D++$", "$u3$1$3$4$2")
Back to top
View user's profile Send private message Visit poster's website
thefunnyman



Joined: 04 Aug 2007
Posts: 22

PostPosted: Mon Aug 06, 2007 9:54 pm    Post subject: Reply with quote

Not a problem at all. I just didn't want to clutter up an already overflowing ask forum. I appreciate your help again, thanks.
Back to top
View user's profile Send private message
Titan



Joined: 11 Aug 2004
Posts: 5026
Location: imaginationland

PostPosted: Thu Aug 09, 2007 12:07 pm    Post subject: Uploading files to AutoHotkey.net without FTP using CURL Reply with quote

Here's a demonstration:

Code:
; your account details:
username =
password =

file = %A_Temp%\test.txt ; file to upload
name = uploaded_test.txt ; filename to save as

cookies = %A_Temp%\ahk.net cookies.dat ; temporary file to store cookies
uri = http://www.autohotkey.net/file/index.php ; file manager website
curl = curl.exe ; your path to CURL

; login to your account:
RunWait, %curl% -c "%cookies%" -d "username=%username%&password=%password%&act=login&op=in" %uri%, , Hide
; upload file:
RunWait, %curl% -b "%cookies%" -F "local=@%file%" -F act=list -F op=upload -F remote=%name% %uri%, , Hide
RunWait, %curl% %uri%?act=login&op=out ; log out
FileDelete, %cookies% ; delete cookies

_________________

RegExReplace("irc.freenode.net/autohotkey", "^(?=(.(?=[\0-r\[]*((?<=\.).))))(?:[c-\x73]{2,8}(\S))+((2)|\b[^\2-]){2}\D++$", "$u3$1$3$4$2")
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> General Chat All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group