Jump to content

FTP Upload ERROR


lifesux
 Share

Recommended Posts

Use ctrl+left mouse button to select area than just wait.

Why it doesnt upload picture ?

#NoTrayIcon
#RequireAdmin
 
 
 
#Include<ScreenCapture.au3>
#include <FTPEx.au3>
#include <File.au3>
#include <Array.au3>
 
 
Opt("TrayMenuMode", 1)
Opt("TrayOnEventMode", 1)
 
If WinExists ("BulutResim.com V 1.0 Aracı") Then ProcessClose (WinGetProcess ("BulutResim.com V 1.0 Aracı"))
AutoitWinSetTitle ("BulutResim.com V 1.0 Aracı")
 
 
Global $sDataDump = @TempDir & "\BulutResim.com\"
Global $sLog = @ScriptDir & "\kayit.ini"
Global $nClick = 10
 
If Not FileExists ($sDataDump) Then DirCreate ($sDataDump)
 
Global $hUser32 = DllOpen ("User32.dll")
Global $hGUI = GUICreate("", @DesktopWidth, @DesktopHeight, 0, 0, -2147483648, 136)
 
 
 
 
 
MsgBox(0,"BulutResim.com Resim Çek-Paylaş Aracı V 1.0","Bu araç LifeSuxTR tarafından BulutResim.com için geliştirilmiştir")
 
TraySetIcon ("C:\WINDOWS\system32\SHELL32.dll", 23)
TraySetState ()
TraySetTooltip ("Pencere Kayıt Edici")
TraySetClick (16)
TrayCreateItem ("Ekranı Çek")
TrayItemSetOnEvent (-1, "_cek")
TrayCreateItem ("Pencereyi Çek")
TrayItemSetOnEvent (-1, "_cekpenc")
TrayCreateItem ("")
TrayCreateItem ("Resimlerin Dizinini Aç")
TrayItemSetOnEvent (-1, "_Ac")
TrayCreateItem ("Tüm Resimleri Sil")
TrayItemSetOnEvent (-1, "_Temizle")
TrayCreateItem ("")
TrayCreateItem ("İşlem Kayıtlarını Aç")
TrayItemSetOnEvent (-1, "_Kayitac")
TrayCreateItem ("İşlem Kayıtlarını Sil")
TrayItemSetOnEvent (-1, "_Kayittemizle")
TrayCreateItem ("")
TrayCreateItem ("Çıkış")
TrayItemSetOnEvent (-1, "_Cikis")
TrayTip ("BulutResim.com Araci v 1.0", "CTRL+Sol tık  kullanarak belirli bir alanı yada pencereyi seçiniz." & @CRLF & @CRLF & _
"Aynı fonksiyonlara menüdende ulaşabilirsiniz.", 5, 1)
 
GUICtrlSetResizing (-1, 802)
WinSetTrans ($hGUI, "", 100)
 
While 1
If _basildi ("Ctrl") And _basildi ("Left") Then
$hWnd = WinGetHandle ("[active]", "")
WinSetState ($hWnd, "", @SW_DISABLE)
$aPos = _alansec ()
If ($aPos[2] - $aPos[0] < $nClick) Or ($aPos[3] - $aPos[1] < $nClick) Then
$aPos = WinGetPos ($hWnd, "")
$aPos[2] += $aPos[0]
$aPos[3] += $aPos[1]
EndIf
WinSetState ($hWnd, "", @SW_ENABLE)
$sFile = _GetFile ()
_ScreenCapture_Capture ($sFile, $aPos[0], $aPos[1], $aPos[2], $aPos[3], False)
ClipPut ($sFile)
_kayityaz ($sFile, 1)
ElseIf _basildi ("Print") Then
$sFile = _GetFile ()
_ScreenCapture_Capture ($sFile, 0, 0, @DesktopWidth, @DesktopHeight, False)
ClipPut ($sFile)
_kayityaz ($sFile, 2)
EndIf
Sleep (10)
WEnd
 
Func _GetFile ()
 
While 1
$randomSeq = ""
For $i = 1 to 12
$rNum = Random(48, 122, 1)
If $rNum < 58 OR $rNum > 96 Then
$randomSeq = Chr($rNum) & $randomSeq
Else
$i -= 1
EndIf
Next
 
If Not FileExists ($sDataDump & $randomseq & ".jpg") Then Return $sDataDump & $randomseq & ".jpg"
WEnd
EndFunc
 
Func _basildi ($key)
Switch StringLower ($key)
Case "Left"
$iHex = "01"
Case "middle"
$iHex = "04"
Case "ctrl"
$iHex = "11"
Case "print"
$iHex = "2C"
Case Else
Return -1
EndSwitch
$aIsbasildi = DllCall($hUser32, "int", "GetAsyncKeyState", "int", "0x" & $iHex)
If @Error Or (BitAND ($aIsbasildi[0], 0x8000) <> 0x8000) Then Return 0
Return 1
EndFunc
 
Func _alansec ()
Local $aPos = MouseGetPos (), $aLast[2] = [-1, -1], $aPosFirst = MouseGetPos (), $aRet[4]
WinMove ($hGUI, "", $aPosFirst[0], $aPosFirst[1], 1, 1)
GUISetState(@SW_SHOW, $hGUI)
 
While _basildi ("Left")
$aPos = MouseGetPos ()
If ($aPos[0] <> $aLast[0]) Or ($aPos[1] <> $aLast[1]) Then
$aRet[0] = $aPosFirst[0]
$aRet[1] = $aPosFirst[1]
 
$aRet[2] = $aPos[0]
$aRet[3] = $aPos[1]
 
If $aRet[0] > $aRet[2] Then
$tmp = $aRet[0]
$aRet[0] = $aRet[2]
$aRet[2] = $tmp
EndIf
If $aRet[1] > $aRet[3] Then
$tmp = $aRet[1]
$aRet[1] = $aRet[2]
$aRet[2] = $tmp
EndIf
 
WinMove ($hGUI, "", $aRet[0], $aRet[1], $aRet[2] - $aRet[0], $aRet[3] - $aRet[1])
$aLast = $aPos
EndIf
Tooltip ($aRet[2] - $aRet[0] & " x " & $aRet[3] - $aRet[1])
Sleep (10)
WEnd
Tooltip ("")
GUISetState (@SW_HIDE, $hGUI)
Return $aRet
EndFunc
 
Func _kayityaz ($sFile, $nType)
IniWrite ($sLog, @MDAY & "." & @MON & "." & @YEAR, @MIN & ":" & @HOUR & "_" & $nType, StringRegExpReplace ($sFile, ".*\\", ""))
 
$kur = _FTP_Open('FTP') ; FTP bağlantısı başlatalım
 
Local $baglan = _FTP_Connect($kur, '31.170.160.109', 'a6544809', 'yunusemre12') ; FTP'ye bağlanalım
 
Local $szDrive, $szDir, $szFName, $szExt
Local $filename = _PathSplit($sFile, $szDrive, $szDir, $szFName, $szExt) ; Dosya yolunu ayrıştıralım
 
$filename = $filename[3] & $filename[4]
 
$x = ProgressOn("Yükleniyor","Resim Yükleniyor")
$uploadresim = _FTP_ProgressUpload($baglan, $sFile, "/" & $filename, "_UpdateParts") ; Dosyamızı sunucuya gönderelim
Sleep(2000)
ProgressOff()
 
if $uploadresim = 1 Then
MsgBox(64, 0, "Dosya Yüklendi! Adresi: http://bulutresim.com/" & $filename) ; Dosya yolunu gösterelim
else
MsgBox(16, 0, "Dosya yüklenemedi.")
endif
 
ClipPut("http://lifesuxtrmap.tk/" & $filename)
 
_FTP_Close($kur) ; FTP bağlantısını kapatalım
 
Endfunc
 
Func _cek ()
$sFile = _GetFile ()
_ScreenCapture_Capture ($sFile, 0, 0, @DesktopWidth, @DesktopHeight, False)
ClipPut ($sFile)
_kayityaz ($sFile, 3)
Endfunc
 
Func _cekpenc ()
WinSetTrans ($hGUI, "", 1)
WinMove ($hGUI, "", 0, 0, @DesktopWidth, @DesktopHeight)
GUISetCursor (3, 1, $hGUI)
GUISetState (@SW_SHOW, $hGUI)
While Not _basildi ("Left")
WEnd
GUISetState (@SW_HIDE, $hGUI)
GUISetCursor (1, 1, $hGUI)
MouseClick ("")
$aPos = WinGetPos ("[active]")
WinSetTrans ($hGUI, "", 100)
$aPos[2] += $aPos[0]
$aPos[3] += $aPos[1]
$sFile = _GetFile ()
_ScreenCapture_Capture ($sFile, $aPos[0], $aPos[1], $aPos[2], $aPos[3], False)
ClipPut ($sFile)
_kayityaz ($sFile, 4)
Endfunc
 
Func _Kayitac ()
ShellExecute ($sLog)
EndFunc
 
Func _Kayittemizle ()
FileDelete ($sLog)
EndFunc
 
Func _Ac ()
ShellExecute ($sDataDump)
EndFunc
 
Func _Temizle ()
Dirremove ($sDataDump, 1)
DirCreate ($sDataDump)
_kayityaz ("\temizlenmis resim", 5)
EndFunc
 
Func _Cikis ()
Exit
EndFunc
Link to comment
Share on other sites

What error does it give?

$kur = _FTP_Open('FTP') ; FTP bağlantısı başlatalım
 
Local $baglan = _FTP_Connect($kur, '31.170.160.109', 'a6544809', 'yunusemre12') ; FTP'ye bağlanalım
 
Local $szDrive, $szDir, $szFName, $szExt
Local $filename = _PathSplit($sFile, $szDrive, $szDir, $szFName, $szExt) ; Dosya yolunu ayrıştıralım
 
$filename = $filename[3] & $filename[4]
 
$x = ProgressOn("Yükleniyor","Resim Yükleniyor")
$uploadresim = _FTP_ProgressUpload($baglan, $sFile, "/" & $filename, "_UpdateParts") ; Dosyamızı sunucuya gönderelim
Sleep(2000)
ProgressOff()
 
if $uploadresim = 1 Then
MsgBox(64, 0, "Dosya Yüklendi! Adresi: http://bulutresim.com/" & $filename) ; Dosya yolunu gösterelim
else
MsgBox(16, 0, "Dosya yüklenemedi.")
endif
if $uploadresim = 1 Then
MsgBox(64, 0, "Dosya Yüklendi! Adresi: http://bulutresim.com/" & $filename) ; Dosya yolunu gösterelim
else
MsgBox(16, 0, "Error.")
endif
Link to comment
Share on other sites

Check status of @error

 

It pop-ups a message box it only writes "0"  ???

here please test it

#NoTrayIcon
#RequireAdmin
 
 
 
#Include<ScreenCapture.au3>
#include <FTPEx.au3>
#include <File.au3>
#include <Array.au3>
 
 
Opt("TrayMenuMode", 1)
Opt("TrayOnEventMode", 1)
 
If WinExists ("BulutResim.com V 1.0 Aracı") Then ProcessClose (WinGetProcess ("BulutResim.com V 1.0 Aracı"))
AutoitWinSetTitle ("BulutResim.com V 1.0 Aracı")
 
 
Global $sDataDump = @TempDir & "\BulutResim.com\"
Global $sLog = @ScriptDir & "\kayit.ini"
Global $nClick = 10
 
If Not FileExists ($sDataDump) Then DirCreate ($sDataDump)
 
Global $hUser32 = DllOpen ("User32.dll")
Global $hGUI = GUICreate("", @DesktopWidth, @DesktopHeight, 0, 0, -2147483648, 136)
 
 
 
 
 
MsgBox(0,"BulutResim.com Resim Çek-Paylaş Aracı V 1.0","Bu araç LifeSuxTR tarafından BulutResim.com için geliştirilmiştir")
 
TraySetIcon ("C:\WINDOWS\system32\SHELL32.dll", 23)
TraySetState ()
TraySetTooltip ("Pencere Kayıt Edici")
TraySetClick (16)
TrayCreateItem ("Ekranı Çek")
TrayItemSetOnEvent (-1, "_cek")
TrayCreateItem ("Pencereyi Çek")
TrayItemSetOnEvent (-1, "_cekpenc")
TrayCreateItem ("")
TrayCreateItem ("Resimlerin Dizinini Aç")
TrayItemSetOnEvent (-1, "_Ac")
TrayCreateItem ("Tüm Resimleri Sil")
TrayItemSetOnEvent (-1, "_Temizle")
TrayCreateItem ("")
TrayCreateItem ("İşlem Kayıtlarını Aç")
TrayItemSetOnEvent (-1, "_Kayitac")
TrayCreateItem ("İşlem Kayıtlarını Sil")
TrayItemSetOnEvent (-1, "_Kayittemizle")
TrayCreateItem ("")
TrayCreateItem ("Çıkış")
TrayItemSetOnEvent (-1, "_Cikis")
TrayTip ("BulutResim.com Araci v 1.0", "CTRL+Sol tık  kullanarak belirli bir alanı yada pencereyi seçiniz." & @CRLF & @CRLF & _
"Aynı fonksiyonlara menüdende ulaşabilirsiniz.", 5, 1)
 
GUICtrlSetResizing (-1, 802)
WinSetTrans ($hGUI, "", 100)
 
While 1
If _basildi ("Ctrl") And _basildi ("Left") Then
$hWnd = WinGetHandle ("[active]", "")
WinSetState ($hWnd, "", @SW_DISABLE)
$aPos = _alansec ()
If ($aPos[2] - $aPos[0] < $nClick) Or ($aPos[3] - $aPos[1] < $nClick) Then
$aPos = WinGetPos ($hWnd, "")
$aPos[2] += $aPos[0]
$aPos[3] += $aPos[1]
EndIf
WinSetState ($hWnd, "", @SW_ENABLE)
$sFile = _GetFile ()
_ScreenCapture_Capture ($sFile, $aPos[0], $aPos[1], $aPos[2], $aPos[3], False)
ClipPut ($sFile)
_kayityaz ($sFile, 1)
ElseIf _basildi ("Print") Then
$sFile = _GetFile ()
_ScreenCapture_Capture ($sFile, 0, 0, @DesktopWidth, @DesktopHeight, False)
ClipPut ($sFile)
_kayityaz ($sFile, 2)
EndIf
Sleep (10)
WEnd
 
Func _GetFile ()
 
While 1
$randomSeq = ""
For $i = 1 to 12
$rNum = Random(48, 122, 1)
If $rNum < 58 OR $rNum > 96 Then
$randomSeq = Chr($rNum) & $randomSeq
Else
$i -= 1
EndIf
Next
 
If Not FileExists ($sDataDump & $randomseq & ".jpg") Then Return $sDataDump & $randomseq & ".jpg"
WEnd
EndFunc
 
Func _basildi ($key)
Switch StringLower ($key)
Case "Left"
$iHex = "01"
Case "middle"
$iHex = "04"
Case "ctrl"
$iHex = "11"
Case "print"
$iHex = "2C"
Case Else
Return -1
EndSwitch
$aIsbasildi = DllCall($hUser32, "int", "GetAsyncKeyState", "int", "0x" & $iHex)
If @Error Or (BitAND ($aIsbasildi[0], 0x8000) <> 0x8000) Then Return 0
Return 1
EndFunc
 
Func _alansec ()
Local $aPos = MouseGetPos (), $aLast[2] = [-1, -1], $aPosFirst = MouseGetPos (), $aRet[4]
WinMove ($hGUI, "", $aPosFirst[0], $aPosFirst[1], 1, 1)
GUISetState(@SW_SHOW, $hGUI)
 
While _basildi ("Left")
$aPos = MouseGetPos ()
If ($aPos[0] <> $aLast[0]) Or ($aPos[1] <> $aLast[1]) Then
$aRet[0] = $aPosFirst[0]
$aRet[1] = $aPosFirst[1]
 
$aRet[2] = $aPos[0]
$aRet[3] = $aPos[1]
 
If $aRet[0] > $aRet[2] Then
$tmp = $aRet[0]
$aRet[0] = $aRet[2]
$aRet[2] = $tmp
EndIf
If $aRet[1] > $aRet[3] Then
$tmp = $aRet[1]
$aRet[1] = $aRet[2]
$aRet[2] = $tmp
EndIf
 
WinMove ($hGUI, "", $aRet[0], $aRet[1], $aRet[2] - $aRet[0], $aRet[3] - $aRet[1])
$aLast = $aPos
EndIf
Tooltip ($aRet[2] - $aRet[0] & " x " & $aRet[3] - $aRet[1])
Sleep (10)
WEnd
Tooltip ("")
GUISetState (@SW_HIDE, $hGUI)
Return $aRet
EndFunc
 
Func _kayityaz ($sFile, $nType)
IniWrite ($sLog, @MDAY & "." & @MON & "." & @YEAR, @MIN & ":" & @HOUR & "_" & $nType, StringRegExpReplace ($sFile, ".*\\", ""))
 
$kur = _FTP_Open('FTP') ; FTP bağlantısı başlatalım
 
Local $baglan = _FTP_Connect($kur, '31.170.160.109', 'a6544809', 'yunusemre12') ; FTP'ye bağlanalım
 
Local $szDrive, $szDir, $szFName, $szExt
Local $filename = _PathSplit($sFile, $szDrive, $szDir, $szFName, $szExt) ; Dosya yolunu ayrıştıralım
 
$filename = $filename[3] & $filename[4]
 
$x = ProgressOn("Yükleniyor","Resim Yükleniyor")
$uploadresim = _FTP_ProgressUpload($baglan, $sFile, "/public_html" & $filename, "_UpdateParts") ; Dosyamızı sunucuya gönderelim
Sleep(2000)
ProgressOff()
 
if $uploadresim = 1 Then
MsgBox(64, 0, "Dosya Yüklendi! Adresi: http://bulutresim.com/" & $filename) ; Dosya yolunu gösterelim
else
MsgBox(16, 0, @error)

 
ClipPut("http://lifesuxtrmap.tk/" & $filename)
 
_FTP_Close($kur) ; FTP bağlantısını kapatalım
 EndIf
Endfunc
 
Func _cek ()
$sFile = _GetFile ()
_ScreenCapture_Capture ($sFile, 0, 0, @DesktopWidth, @DesktopHeight, False)
ClipPut ($sFile)
_kayityaz ($sFile, 3)
Endfunc
 
Func _cekpenc ()
WinSetTrans ($hGUI, "", 1)
WinMove ($hGUI, "", 0, 0, @DesktopWidth, @DesktopHeight)
GUISetCursor (3, 1, $hGUI)
GUISetState (@SW_SHOW, $hGUI)
While Not _basildi ("Left")
WEnd
GUISetState (@SW_HIDE, $hGUI)
GUISetCursor (1, 1, $hGUI)
MouseClick ("")
$aPos = WinGetPos ("[active]")
WinSetTrans ($hGUI, "", 100)
$aPos[2] += $aPos[0]
$aPos[3] += $aPos[1]
$sFile = _GetFile ()
_ScreenCapture_Capture ($sFile, $aPos[0], $aPos[1], $aPos[2], $aPos[3], False)
ClipPut ($sFile)
_kayityaz ($sFile, 4)
Endfunc
 
Func _Kayitac ()
ShellExecute ($sLog)
EndFunc
 
Func _Kayittemizle ()
FileDelete ($sLog)
EndFunc
 
Func _Ac ()
ShellExecute ($sDataDump)
EndFunc
 
Func _Temizle ()
Dirremove ($sDataDump, 1)
DirCreate ($sDataDump)
_kayityaz ("\temizlenmis resim", 5)
EndFunc
 
Func _Cikis ()
Exit
EndFunc
Link to comment
Share on other sites

Can you tell me what the hi-lighted parameter is?

$uploadresim = _FTP_ProgressUpload($baglan, $sFile, "/public_html" & $filename, "_UpdateParts")

 

OMG Man you are awesome i did it.Now i have one more question.If u tested the script u must see that if u are trying to select area on a browser it select everything.Like that here one pic by my script

http://lifesuxtrmap.tk/joooiawck52w.jpg

How to fix it ? Please try it first :) 

Link to comment
Share on other sites

Sorry, I never tested the script.

I do not generally click on links people post, for reasons I am unwilling to get into.

EDIT:

If you want to post a picture, I suggest you use a known free host such as imageshack or similar.

Edited by JohnOne

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

Sorry, I never tested the script.

I do not generally click on links people post, for reasons I am unwilling to get into.

EDIT:

If you want to post a picture, I suggest you use a known free host such as imageshack or similar.

 

So okay let me post it like that :D I am coding that script for my imagehost website.Its just a test host.

joooiawck52w.jpg

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...