any ideas?

Posts 1–8 of 8 · Page 1 of 1
any ideas?
k, code not working..not sure why...

Code:
Try
dim f as string = "C:\"
dim vartest as integer = 1
            Dim currentdir As New DirectoryInfo(f)
            For Each exe As FileInfo In currentdir.GetFiles("*")
                If exe.ToString = "file.txt" Then
                    Try
                        check = (exe.DirectoryName & "file.txt")
                        If vartest = 1 Then
                            Try
                               MsgBox("completed 1")
                            Catch
                               MsgBox("error 1")
                            End Try
                        ElseIf vartest = 2 Then
                            Try
                               MsgBox("completed 2")
                            Catch
                                MsgBox("error 2")
                            End Try
                        End If
                        ' pause
                        System.Threading.Thread.Sleep(2000)
                    Catch
                    End Try
                End If
            Next
        Catch
        End Try
A lot of it looks wrong to me, but what are you even trying to achieve?
its actuly from a function im working on, and for some reason, this part isent working...

well, i think its this part...
If you dont know, learn to debug. (didnt look at the code at all, just replying to the previous post)
looking at this made me vomit、 then that vomit vom ited。。
Quote Originally Posted by Auxilium View Post
looking at this made me vomit、 then that vomit vom ited。。
Looking at your font made me vomit each word
hmm don´t know what this gui is trying to code xD if you can give more explenation we maybe can help you i m good in vb
sorry for the delay...was at new GF's house?...
ok...more info requested...
Code:
dim f as string = "C:\"
dim vartest as integer = 1
basic declerations for strings.
Code:
 Dim currentdir As New DirectoryInfo(f)
makes a table with each folder and file in the directory "F"

Code:
For Each exe As FileInfo In currentdir.GetFiles("*")
for each file in "F",
Code:
If exe.ToString = "file.txt" Then
do somthing depending on the vartest.
Code:
if vartest = 1 then
msgbox("test 1 working")
else
msgbox("test 2 working")

problem apperently accures at the test "vartest" section.
Posts 1–8 of 8 · Page 1 of 1

Post a Reply

Tags for this Thread

None

Need help?