| View previous topic :: View next topic |
| Author |
Message |
thefunnyman
Joined: 04 Aug 2007 Posts: 22
|
Posted: Mon Aug 06, 2007 6:07 pm Post subject: Automate Autohotkey.net WITHOUT using ftp? |
|
|
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 |
|
 |
engunneer
Joined: 30 Aug 2005 Posts: 6551 Location: Pacific Northwest, US
|
Posted: Mon Aug 06, 2007 6:51 pm Post subject: |
|
|
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 |
|
 |
thefunnyman
Joined: 04 Aug 2007 Posts: 22
|
Posted: Mon Aug 06, 2007 7:14 pm Post subject: |
|
|
| 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 |
|
 |
engunneer
Joined: 30 Aug 2005 Posts: 6551 Location: Pacific Northwest, US
|
Posted: Mon Aug 06, 2007 8:27 pm Post subject: |
|
|
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 |
|
 |
Titan
Joined: 11 Aug 2004 Posts: 5026 Location: imaginationland
|
Posted: Mon Aug 06, 2007 8:31 pm Post subject: |
|
|
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 |
|
 |
thefunnyman
Joined: 04 Aug 2007 Posts: 22
|
Posted: Mon Aug 06, 2007 9:23 pm Post subject: |
|
|
| 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 |
|
 |
Titan
Joined: 11 Aug 2004 Posts: 5026 Location: imaginationland
|
Posted: Mon Aug 06, 2007 9:37 pm Post subject: |
|
|
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 |
|
 |
thefunnyman
Joined: 04 Aug 2007 Posts: 22
|
Posted: Mon Aug 06, 2007 9:54 pm Post subject: |
|
|
| 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 |
|
 |
Titan
Joined: 11 Aug 2004 Posts: 5026 Location: imaginationland
|
Posted: Thu Aug 09, 2007 12:07 pm Post subject: Uploading files to AutoHotkey.net without FTP using CURL |
|
|
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 |
|
 |
|