Robonglious Posted July 11, 2012 Share Posted July 11, 2012 (edited) What is wrong with the code below? It seems very straight forward to me. Does anyone see anything wrong? You would have to change the bottom code if you would want to test this. Is inetget not the best function for this type of thing? All I want to do is move some files around and see how long it takes. Why is this so unreliable? Also, I'm having trouble wrapping my brain around how/why to make my own functions. Do I only want to use this if I am calling a section of code over and over? I'm probably breaking some kind of etiquette by asking so many questions. $begin = TimerInit() $hDownload = InetGet("[url="http://www.upyondafarm.com/Photos/Eastern_Grey_Squirrel.jpg"]http://www.upyondafarm.com/Photos/Eastern_Grey_Squirrel.jpg[/url]", "c:filestest.jpg", 1, 0) $EndCount = TimerDiff($begin) $hDownloadSize = FileGetSize("c:filestest.jpg") $dlsizeRectify = $hDownloadSize/1024 FileDelete("c:filestest.jpg") $EndCountSec = $EndCount / 1000 $avg = (($hDownloadSize / 1024) / $EndCountSec) InetClose($hDownload) $DownTime = TimerInit() FileCopy("data1FrontUtilitytestfilerandom.jpg", "c:filesfile.jpg", 1) $DownTimeEnd = TimerDiff($DownTime) $hData1DLS = FileGetSize("c:filesfile.jpg") $hDataKB = $hData1DLS / 1024 $PreRound = $DownTimeEnd / 1000 $DSpeed = Round($PreRound, 2) $UpTime = TimerInit() FileCopy("c:filesfile.jpg", "data1FrontUtilitytestfileuser" & $Ran & ".jpg", 1) $UptTimeEnd = TimerDiff($UpTime) $PreRoundUp = $UptTimeEnd / 1000 $UPSpeed = Round($PreRoundUp, 2) FileDelete("data1FrontUtilitytestfileuser" & $Ran & ".jpg") Edited July 11, 2012 by Robonglious Link to comment Share on other sites More sharing options...
gcue Posted July 11, 2012 Share Posted July 11, 2012 copying a small jpg file might not be the best way to measure speed Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted July 11, 2012 Moderators Share Posted July 11, 2012 I'm probably breaking some kind of etiquette by asking so many questions.It is a fair question why you would start a new thread on the same topic, when you already have one going and people are attempting to assist you. You're not making it any easier for us to help you "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
gcue Posted July 11, 2012 Share Posted July 11, 2012 if you really wanted to do this, maybe you can pipe into one of those speed test web services? Link to comment Share on other sites More sharing options...
Robonglious Posted July 11, 2012 Author Share Posted July 11, 2012 (edited) if you really wanted to do this, maybe you can pipe into one of those speed test web services?Yeah I wanted to do that but it isn't supported on our web servers. Or did you mean I would have the script go to the site and click the links? It may be worthwhile to set up one specifically for this but I haven't done it yet. Oddly enough that's how they work too. They just move large image files and time how long they take... the files I'm using are from www.speedtest.net .It is a fair question why you would start a new thread on the same topic, when you already have one going and people are attempting to assist you. You're not making it any easier for us to help you I asked this question on an old thread but nobody was looking at it but was getting no response so I asked again. Sorry to be pushy I'm just really confused and frustrated with this. I love AutoIT though. Edited July 11, 2012 by Robonglious Link to comment Share on other sites More sharing options...
Robonglious Posted July 16, 2012 Author Share Posted July 16, 2012 So it looks like the issue might be with the inetgetinfo, I hard coded the file sizes and it seems to be much better now. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now