D4rk^S0ul Posted April 12, 2007 Share Posted April 12, 2007 (edited) For some reason when i try to use fileopen and fileread with a @directory it doesnt see it, this is code i got atm it simple i was using fileopen to check see to if it existed but it never was able to read the file, but if i just use the full path it read it. Does anyone know why this is? InetGet("http://*****************/check.ini", @TempDir & "\Check.ini", 0) $FileR = FileRead(@TempDir & "\Check.ini") If @error = 1 Then MsgBox(24, "Failed", "Failed to access internet, please check your firewall settings.") Exit EndIf If $FileR = "no" Then MsgBox(0, "Disabled", "This program has been disabled!") EndIf FileDelete(@TempDir & "\Check.ini") Edited April 12, 2007 by D4rk^S0ul Link to comment Share on other sites More sharing options...
jvanegmond Posted April 12, 2007 Share Posted April 12, 2007 $InetGetReturn = InetGet("http://*****************/check.ini", @TempDir & "\Check.ini", 0) $FileExistsReturn = FileExists(@TempDir & "\Check.ini") $FileReadReturn = FileRead(@TempDir & "\Check.ini") $FileReadError = @error #cs If @error = 1 Then ;MsgBox(24, "Failed", "Failed to access internet, please check your firewall settings.") ;Exit EndIf If $FileR = "no" Then ;MsgBox(0, "Disabled", "This program has been disabled!") EndIf #ce $FileDeleteReturn = FileDelete(@TempDir & "\Check.ini") MsgBox(0, "End of Program - Debug data", "$InetGetReturn " & @TAB & $InetGetReturn & @LF & "$FileExistsReturn " & @TAB & $FileExistsReturn & @LF & "$FileReadReturn " & @TAB & $FileReadReturn & @LF & "$FileReadError " & @TAB & $FileReadError & @LF & "$FileDeleteReturn " & @TAB & $FileDeleteReturn) Does this help? github.com/jvanegmond Link to comment Share on other sites More sharing options...
D4rk^S0ul Posted April 12, 2007 Author Share Posted April 12, 2007 (edited) thx worked... Really strange i had almost the exact thing yet it never returned functions right... Edited April 12, 2007 by D4rk^S0ul Link to comment Share on other sites More sharing options...
D4rk^S0ul Posted April 12, 2007 Author Share Posted April 12, 2007 (edited) There seems to be a problem with Else function it never runs. EDIT: NVM it turns out i was just using wrong code for msgbox Edited April 12, 2007 by D4rk^S0ul Link to comment Share on other sites More sharing options...
jvanegmond Posted April 12, 2007 Share Posted April 12, 2007 There seems to be a problem with Else function it never runs.EDIT: NVM it turns out i was just using wrong code for msgboxThat would honestly be strange.. Suddenly, all if-else statements do not work anymore.. While not updating AutoIt or anything.. github.com/jvanegmond 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