2words4uready Posted August 1, 2008 Posted August 1, 2008 why doesnt this code work? Inet returns -1 (error) expandcollapse popup#include <GUIConstants.au3> #Include <GuiDateTimePicker.au3> #Region ### START Koda GUI section ### Form=c:\documents and settings\tyler\desktop\new folder\koda_1.7.0.1\forms\downlaod.kxf $Form1_1 = GUICreate("Form1", 275, 171, 193, 125) $loc = GUICtrlCreateInput("File path", 8, 16, 257, 21) $down = GUICtrlCreateButton("Download", 64, 136, 121, 33, 0) $hour = GUICtrlCreateInput("Start", 72, 80, 41, 21) $min = GUICtrlCreateInput("Time", 112, 80, 41, 21) $hour2 = GUICtrlCreateInput("Stop", 72, 104, 41, 21) $min2 = GUICtrlCreateInput("Time", 112, 104, 41, 21) $sec = GUICtrlCreateInput("sec", 152, 80, 41, 21) $sec2 = GUICtrlCreateInput("", 152, 104, 41, 21) $save = GUICtrlCreateInput("Save Path", 8, 40, 257, 21) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch If $nMsg = $down Then ToolTip("Download Progress: " & @InetGetBytesRead,0,0) $loc1 = GUICtrlRead($loc) $save1 = GUICtrlRead($save) If @HOUR = $hour And @MIN = $min And @SEC = $sec Then InetGet($loc1, $save1) EndIf If @HOUR = $hour2 And @MIN = $min2 And @SEC = $sec2 +1 Then Exit EndIf EndIf WEnd
Szhlopp Posted August 1, 2008 Posted August 1, 2008 expandcollapse popup#include <GUIConstants.au3> #Include <GuiDateTimePicker.au3> $Form1_1 = GUICreate("Form1", 275, 171, 193, 125) $loc = GUICtrlCreateInput("File path", 8, 16, 257, 21) $down = GUICtrlCreateButton("Download", 64, 136, 121, 33, 0) $hour = GUICtrlCreateInput("Start", 72, 80, 41, 21) $min = GUICtrlCreateInput("Time", 112, 80, 41, 21) $hour2 = GUICtrlCreateInput("Stop", 72, 104, 41, 21) $min2 = GUICtrlCreateInput("Time", 112, 104, 41, 21) $sec = GUICtrlCreateInput("sec", 152, 80, 41, 21) $sec2 = GUICtrlCreateInput("", 152, 104, 41, 21) $save = GUICtrlCreateInput("Save Path", 8, 40, 257, 21) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $down $loc1 = GUICtrlRead($loc) $save1 = GUICtrlRead($save) InetGet($loc1, $save1, 1) $time = TimerInit() While @InetGetActive TrayTip("Downloading", "Bytes = " & @InetGetBytesRead, 10, 16) Sleep(250) Wend $time = TimerDiff($time) ToolTip("Downloading completed in " & $time & " seconds!") Sleep(2000) ToolTip("") EndSwitch WEnd RegEx/RegExRep Tester!Nerd Olympics - Community App!Login UDFMemory UDF - "Game.exe+753EC" - CE pointer to AU3Password Manager W/ SourceDataFiler - Include files in your au3!--- Was I helpful? Click the little green '+'
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