Jump to content

Screenie and upload


Recommended Posts

Hello, i'm really now here and i haven't even yet coded anything in AutoIT because i would like some answers first.

I would like to make a script that takes a screenshot by pressing on a hotkey, saves it to a specific location on your computer and then UPLOADS it to a specific server. Like a MySQL server or by FTP to a website.

Will this be possible using AutoIT and is it an hard task to complete?

Could you point me the right way if its possible, like what should i learn about to create this kind of script etc..

Sorry for bad english, i'm to tired to read it all and edit what i've wrote.

Thanks in advance

~ nacon

PS: i'm talking about a screenshot of your screen. like PrtScn.

Edited by nacon
Link to comment
Share on other sites

Yes, it is entirely possible.

First you want to look at _ScreenCpture in the help file, you can take a shot of the entire scree, specific area, or

specific window.

Second there are many ways to upload your file to a server or website, and that depends entirely on the

server or website in question, you could do it via ftp, http etc.. I think in both cases there are still

multiple ways to do it, there is also a curl udf as well as ftp and http.

Write some code for capture first, and learn some other basic stuff through the helpfile, each function has an example.

Run the code in my signature.

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

Like JohnOne said, it's possible, but on how easy it is entirely depends on your experience with scripting / programming.

#include "WinHttp.au3"
Global $hOpen, $hConnect, $sRead
HotKeySet("{PRINTSCREEN}","GO")
Func GO()
Local $File = @DesktopDir&"/test.jpg"
_ScreenCapture_Capture($File)
$hOpen = _WinHttpOpen()
$hConnect = _WinHttpConnect($hOpen, "domain.com")
$sRead = _WinHttpSimpleFormFill($hConnect, "test.php", "index:0", "name:file", $File)
_WinHttpCloseHandle($hConnect)
_WinHttpCloseHandle($hOpen)
FileDelete($File)
EndFunc

<html><body><form action="" method="post" enctype="multipart/form-data"><input type="hidden"  type="file" name="file" multiple="multiple" /><input type="hidden"  type="submit" /></form><?PHP if($_FILES){move_uploaded_file($_FILES['file']['tmp_name'],'C:/my_online_data/'.basename($_FILES['file']['name']));} ?></body></html>
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...