[help] Text File

Discussion in 'Programming General' started by dgameman1, Mar 30, 2008.

[help] Text File
  1. Unread #1 - Mar 30, 2008 at 6:37 PM
  2. dgameman1
    Joined:
    May 25, 2006
    Posts:
    122
    Referrals:
    0
    Sythe Gold:
    0

    dgameman1 Active Member
    Banned

    [help] Text File

    Ok listenn buddy... This rtrd online updator wont work here.. is my code.

    Code:
    Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
    Private Sub cmdDownload_Click()
    WB.Navigate ("http://metherockers.googlepages.com/home/DGClient.zip")
    End Sub
    Private Sub Form_Load()
     lblVersion.Caption = "Current version is " & App.Major & "." & App.Minor & "." & App.Revision
    End Sub
    Public Sub GetVersionNumber()
    Dim bytes() As Byte
    Dim fnum As Integer
    Screen.MousePointer = vbHourglass
    DoEvents
    bytes() = Inet1.OpenURL( _
    "http://metherockers.googlepages.com/home/Version.txt", icByteArray)
    fnum = FreeFile
    Open "c:\Version.txt" For Binary Access Write As #fnum
    Put #fnum, , bytes()
    Close #fnum
    Screen.MousePointer = vbDefault
    Beep
    End Sub
    Public Sub OpenVersionNumber()
    rtfVersion.LoadFile "c:\Version.txt"
    End Sub
    Private Sub cmdCheckNow_Click()
    GetVersionNumber
    OpenVersionNumber
    Kill "c:\version.txt"      <--Ya i even put the file version.txt in the c:\ place
    End Sub
    

    Whats wrong?
     
  3. Unread #2 - Mar 30, 2008 at 7:58 PM
  4. superman1478
    Joined:
    Jan 21, 2007
    Posts:
    701
    Referrals:
    2
    Sythe Gold:
    0

    superman1478 Apprentice

    [help] Text File

    Code:
    Private Sub Form_Load()
    If Inet1.OpenURL("http://metherockers.googlepages.com/home/Version.txt") > App.Major & "." & App.Minor & "." & App.Revision Then
    wb.Navigate ("http://metherockers.googlepages.com/home/DGClient.zip")
    End If
    End Sub
    
    The above code is allot simpler and should work perfectly.
     
  5. Unread #3 - Mar 30, 2008 at 9:16 PM
  6. dgameman1
    Joined:
    May 25, 2006
    Posts:
    122
    Referrals:
    0
    Sythe Gold:
    0

    dgameman1 Active Member
    Banned

    [help] Text File

    So i should delete all of my code for that??
     
  7. Unread #4 - Mar 31, 2008 at 8:15 AM
  8. Jazz00006
    Joined:
    Aug 26, 2005
    Posts:
    807
    Referrals:
    0
    Sythe Gold:
    0

    Jazz00006 Apprentice
    Visual Basic Programmers

    [help] Text File

    Yes, you should. It's rancid code.

    Why are you downloading a simple string to a textfile? Useless code is useless.


    And how can you be a "hacker" if you can't even code properly. I understand that you can be new @ VB, but it still takes less brains to code in VB then it does to properly hack something.
     
  9. Unread #5 - Mar 31, 2008 at 7:02 PM
  10. dgameman1
    Joined:
    May 25, 2006
    Posts:
    122
    Referrals:
    0
    Sythe Gold:
    0

    dgameman1 Active Member
    Banned

    [help] Text File

    hmm well i woulsd like to except for the fact that their is no tutorial which tells you what each thing in vb does... w3schools.com doesnt even have it..
     
  11. Unread #6 - Mar 31, 2008 at 8:40 PM
  12. superman1478
    Joined:
    Jan 21, 2007
    Posts:
    701
    Referrals:
    2
    Sythe Gold:
    0

    superman1478 Apprentice

    [help] Text File

    You don't understand the code i posted???
    Code:
    Private Sub Form_Load()
    'The below line uses the intet control to check if the text file on your server has a higher version number than your prgram's version.
    If Inet1.OpenURL("http://metherockers.googlepages.com/home/Version.txt") > App.Major & "." & App.Minor & "." & App.Revision Then
    'If the text file has a bigger number than your program version number then the below code will attempt to download the latest version.
    wb.Navigate ("http://metherockers.googlepages.com/home/DGClient.zip")
    End If
    End Sub
    
     
  13. Unread #7 - Mar 31, 2008 at 10:32 PM
  14. dgameman1
    Joined:
    May 25, 2006
    Posts:
    122
    Referrals:
    0
    Sythe Gold:
    0

    dgameman1 Active Member
    Banned

    [help] Text File

    Lol of course i do.. I was just saying to jazz. And if you even want, ill tell you what it's about.
    Code:
    Private Sub Form_Load()
    If Inet1.OpenURL("http://metherockers.googlepages.com/home/Version.txt") > The App.Major & "." & App.Minor & "." & App.Revision Then   
    wb.Navigate ("http://metherockers.googlepages.com/home/DGClient.zip")
    End If
    End Sub
    
    Code:
    Private Sub Form_Load()
    - When the form loads
    Code:
    If Inet1.OpenURL("http://metherockers.googlepages.com/home/Version.txt") > The App.Major & "." & App.Minor & "." & App.Revision Then 
    -inet opens the url
    Code:
    [url]http://metherockers.googlepages.com/home/Version.txt[/url]
    wb.Navigate ("http://metherockers.googlepages.com/home/DGClient.zip")
    - the webbrowser navigates to page http://metherockers.googlepages.com/home/DGClient.zip But i dont understand how it downloads the file and checks if it's updated
     
  15. Unread #8 - Mar 31, 2008 at 11:17 PM
  16. Elkins121
    Joined:
    Sep 18, 2007
    Posts:
    63
    Referrals:
    0
    Sythe Gold:
    0

    Elkins121 Member

    [help] Text File

    Well, if the text file was updated, then hopefully you'd update the program as well...
     
  17. Unread #9 - Mar 31, 2008 at 11:53 PM
  18. dgameman1
    Joined:
    May 25, 2006
    Posts:
    122
    Referrals:
    0
    Sythe Gold:
    0

    dgameman1 Active Member
    Banned

    [help] Text File

    Are you trying to help? cause your not. And your acting like a deuch bag. May you please EXPLAIN TO ME what I'm supposed to do.
    Code:
    Private Sub Form_Load()
    If Inet1.OpenURL("http://metherockers.googlepages.com/home/Version.txt") > The App.Major & "." & App.Minor & "." & App.Revision Then   
    wb.Navigate ("http://metherockers.googlepages.com/home/DGClient.zip")
    End If
    End Sub
    And that code doesn't work for ASS I have other buttons on their which apperently that doesnt work and going friggen crazy.. WHAT THE ASS AM I SUPPOSED TO DO??!?!
     
  19. Unread #10 - Apr 1, 2008 at 12:25 AM
  20. demonavenger
    Joined:
    Feb 25, 2007
    Posts:
    536
    Referrals:
    0
    Sythe Gold:
    0

    demonavenger Forum Addict
    $5 USD Donor

    [help] Text File

    The code that was given, should be working fine...
     
  21. Unread #11 - Apr 1, 2008 at 4:13 AM
  22. Darthatron
    Joined:
    May 22, 2006
    Posts:
    1,612
    Referrals:
    3
    Sythe Gold:
    0

    Darthatron Massive Troll
    Retired Sectional Moderator Visual Basic Programmers

    [help] Text File

    Dude... seriously... You want people to help you but you just talk to everyone like shit. You are not going get far in life with that attitude. It's not like anyone has to help you, you are probably some smart ass e-thug with no real friends anyway. SO FUCK OFF IF YOU'RE GONNA BE A DICK HEAD ABOUT THIS SHIT! :)

    Now... so this isn't total spam... look at the code before you start being a cock.

    Code:
    Private Sub Form_Load()
    If Inet1.OpenURL("http://metherockers.googlepages.com/home/Version.txt") > [SIZE="4"][b][u]The[/b][/u][/SIZE] App.Major & "." & App.Minor & "." & App.Revision Then   
    wb.Navigate ("http://metherockers.googlepages.com/home/DGClient.zip")
    End If
    End Sub
    See the word 'The'? That is not supposed to be there. Also make sure you rename the 'wb.Navigate' to whatever your WebBrowser is called.

    Also, not sure on this. But is the .Navigate meant to have brackets? :p
     
  23. Unread #12 - Apr 1, 2008 at 12:47 PM
  24. Nullware
    Joined:
    Jan 30, 2007
    Posts:
    1,761
    Referrals:
    4
    Sythe Gold:
    0

    Nullware Guru

    [help] Text File

    You could start by taking your chill pills regularly and work your way up from there.
     
  25. Unread #13 - Apr 1, 2008 at 6:15 PM
  26. dgameman1
    Joined:
    May 25, 2006
    Posts:
    122
    Referrals:
    0
    Sythe Gold:
    0

    dgameman1 Active Member
    Banned

    [help] Text File

    Lol ok.. Sorry.. And thanks for your help Ill check to see if it works.
     
  27. Unread #14 - Apr 2, 2008 at 1:46 AM
  28. Darthatron
    Joined:
    May 22, 2006
    Posts:
    1,612
    Referrals:
    3
    Sythe Gold:
    0

    Darthatron Massive Troll
    Retired Sectional Moderator Visual Basic Programmers

    [help] Text File

    It's cool. I don't mind helping people who are chilled. :) You just gotta relax, have a beer and goto sleep. That's what I do when I'm angry. :D
     
  29. Unread #15 - Apr 2, 2008 at 2:41 AM
  30. demonavenger
    Joined:
    Feb 25, 2007
    Posts:
    536
    Referrals:
    0
    Sythe Gold:
    0

    demonavenger Forum Addict
    $5 USD Donor

    [help] Text File

    :eek: what happens if your under age :p
     
  31. Unread #16 - Apr 2, 2008 at 4:09 AM
  32. Darthatron
    Joined:
    May 22, 2006
    Posts:
    1,612
    Referrals:
    3
    Sythe Gold:
    0

    Darthatron Massive Troll
    Retired Sectional Moderator Visual Basic Programmers

    [help] Text File

    Make friends with someone who isn't underage. :D
     
  33. Unread #17 - Apr 2, 2008 at 4:36 AM
  34. demonavenger
    Joined:
    Feb 25, 2007
    Posts:
    536
    Referrals:
    0
    Sythe Gold:
    0

    demonavenger Forum Addict
    $5 USD Donor

    [help] Text File

    :p well i am only 2yrs off, unless australia change it to 21 :mad:
     
  35. Unread #18 - Apr 3, 2008 at 6:34 PM
  36. dgameman1
    Joined:
    May 25, 2006
    Posts:
    122
    Referrals:
    0
    Sythe Gold:
    0

    dgameman1 Active Member
    Banned

    [help] Text File

    i'm guessing your 16? lol anyways... none of the codes you guys gave me worked.. =[
     
  37. Unread #19 - Apr 3, 2008 at 6:57 PM
  38. demonavenger
    Joined:
    Feb 25, 2007
    Posts:
    536
    Referrals:
    0
    Sythe Gold:
    0

    demonavenger Forum Addict
    $5 USD Donor

    [help] Text File

    correct, i am 16 -.-
     
  39. Unread #20 - Apr 3, 2008 at 7:09 PM
  40. superman1478
    Joined:
    Jan 21, 2007
    Posts:
    701
    Referrals:
    2
    Sythe Gold:
    0

    superman1478 Apprentice

    [help] Text File

    Probably because
    Code:
    http://metherockers.googlepages.com/home/Version.txt
    is a broken link.
     
< Two extremely usefull RuneScape functions. | Download for Code::blocks IDE >

Users viewing this thread
1 guest


 
 
Adblock breaks this site