Results 1 to 8 of 8

Thread: Making a translator

  1. #1

    Thread Starter
    Addicted Member Mars-Martian's Avatar
    Join Date
    May 2002
    Location
    Canada
    Posts
    185

    Question Making a translator

    Okay,
    I wanna make a translator that finds words and changes them individually.
    So it should,
    1. Find a certain word
    2. Change that word
    3. Repeat step 1 until words are done
    First person to be able to get what song is currently playing in Winamp 3.

  2. #2
    Hyperactive Member Blinky Bill's Avatar
    Join Date
    Mar 2002
    Location
    Happily munching on the greenery in your garden
    Posts
    349
    You could use the Replace function to search for a word something like this
    VB Code:
    1. Option Explicit
    2.  
    3. Private Sub Command1_Click()
    4.     Dim changeWords(1, 1) As String
    5.    
    6.     changeWords(0, 0) = "Hello"
    7.     changeWords(0, 1) = "Goodbye"
    8.     changeWords(1, 0) = "Sorry"
    9.     changeWords(1, 1) = "Not Sorry"
    10.    
    11.     Text2.Text = Replace(Text1.Text, changeWords(0, 0), changeWords(0, 1))
    12. End Sub
    We don't know what's wrong. . . So the best bet might be to remove something surgically.

  3. #3

    Thread Starter
    Addicted Member Mars-Martian's Avatar
    Join Date
    May 2002
    Location
    Canada
    Posts
    185
    so exactly how does that work?
    First person to be able to get what song is currently playing in Winamp 3.

  4. #4

  5. #5

    Thread Starter
    Addicted Member Mars-Martian's Avatar
    Join Date
    May 2002
    Location
    Canada
    Posts
    185
    ohhhhhhhh thanks!!!

  6. #6
    Stiletto
    Guest
    If you use VB5 you wont be able to use the Replace function

  7. #7

    Thread Starter
    Addicted Member Mars-Martian's Avatar
    Join Date
    May 2002
    Location
    Canada
    Posts
    185
    so that actually did add something to vb 6
    anyways is it case-sensitive and if so how do i make it non case-sensitive?

  8. #8
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051
    Use vbTextCompare as the past parameter in the replace function.
    Quotes:
    "I am getting better then you guys.." NoteMe, on his leet english skills.
    "And I am going to meat her again later on tonight." NoteMe
    "I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
    "my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
    Have I helped you? Please Rate my posts.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width