ghostriderofthenite Ultimate Bot project

Viewing 15 posts - 31 through 45 (of 291 total)
  • Author
    Posts
  • #94937

    I’m getting close to having the trivia work , got it so questions and answers are linked and for now using a next button shows next question trying to figure out the loop method and 45 sec delay between questions and posting correct answer if not answered and point scoring all that hahah so still alot to do

    #94941

    thing im exploreing some these

    http://allenbrowne.com/ser-29.html
    Microsoft Access tips: VBA Traps: Working with Recordsets

    Microsoft Access tips: VBA Traps: Working with Recordsets

    Common mistakes developers make when working with Recordsets in a Microsoft Access database

    5. MoveNext without testing EOF

    A MoveNext may take you to the end of the recordset (EOF) or a MovePrevious to the beginning of the recordset (BOF). Failure to test for these conditions means your code works for most cases, but generates an error one day when the last/first record is accessed.

    The problem is prevalent when you have another exit condition in mind for your loop, so you are not thinking of EOF. Test for EOF (or BOF if moving backwards) before checking the real exit condition for your loop.
    Solution:

    Use this construct for looping through Access recordsets:

        Do while Not rst.EOF
            If rst![MyField] <> Something Then  'The real loop exit condition.
                Exit Do
            End If
            ' Rest of your code here.
            rst.MoveNext
        Loop

    and

    Another solution would be to use a timer control. You could set the time to 30000 msecs
    and enable the timer. In the Timer_Timer() event you will disable the timer.
    In your code you need a line to wait for the disabled timer.
    Assume Timer1 added to your form
    Code:

    Private Sub Timer1_Timer()
      Timer1.Enabled = False
    End Sub

    ‘in your code loop

    While Timer1.Enabled: DoEvents: Wend ‘wait for the timer to expire

    or this possibily

    For the sake of a complete set of solutions:

    If you’re using vb6 in an application environment (like excel), you can use

    Application.OnTime (now + TimeValue(“00:00:30”)), “ProcedurePart2”

    to call a procedure (with no parameters) after 30 seconds without locking up the application or consuming CPU power.

    This would, for instance, work in any VBA environment. Depending on the nature of your VB6 app (standalone vs add-on), this option may be available to you.

    Public Sub delay(PauseTime as integer)
        Dim start As single
        start = Timer  
       Do While Timer < start + PauseTime
        If (Timer < start) Then 'midnight crossover
            start = start - (86400 + 1)
        End If  
        DoEvents   ' Yield to other processes.
    
        Loop
    End Sub
    #94965
    Locohacker
    Administrator

    Nice, for most of your code I really need time to understand it 🙂 So basically all you need from me is to connect and un-connect from the Paltalk’s rooms?
    And sorry for my late replies, Summers in NY I am almost neva home lol

    #94997

    Ny lol I’m in upstate Ny, Well Yes I need connect and exit Paltalk but also how to post timer in room and when trivia finished how to post in room and accept responses and award points and the like

    #95005

    intersting so now on classic paltalk if ya view cams they dc you hahahah

    #95091

    i think dis is part of the codes for the trivia i need just trying figure out how make work Use this construct for looping through Access recordsets:

    	Do while Not rst.EOF
            If rst![MyField] <> Something Then  'The real loop exit condition.
                Exit Do
            End If
            ' Rest of your code here.
            rst.MoveNext
        Loop

    This would, for instance, work in any VBA environment. Depending on the nature of your VB6 app (standalone vs add-on), this option may be available to you.

    Public Sub delay(PauseTime as integer)
        Dim start As single
        start = Timer  
       Do While Timer < start + PauseTime
        If (Timer < start) Then 'midnight crossover
            start = start - (86400 + 1)
    #95119
    Locohacker
    Administrator

    Yeps 🙂 okay next week I should have more time so we can work on it.

    #95124

    ok I’m still working trivia almost working and have meeting robin tonite help finish it hopefully I created a local form as test run see it works then would need that work in paltalk

    #95195

    some how this code not correct – I created Form5 as trial form to simulate a paltalk room so to run and answer questions but the code only brings the answer into the text box for question and answer does not bring in the actual answer

    Form4
    Private Sub Text2_Change()
        Load Form5
        Set Form5.txtTest = Text2
        Form5.Show
    End Sub
    Private Sub Text3_Change()
        Load Form5
        Set Form5.txtTest = Text3
        Form5.Show
    End Sub
    
    
    Form5
    Public txtTest As TextBox
    Private Sub Form_Activate()
      Text1.Text = txtTest.Text
      Text6.Text = txtTest.Text
    End Sub
    Private Sub Text2_Change()
    txtTest.Text = Text1.Text
    End Sub
    Private Sub Text6_Change()
    txtTest.Text = Text6.Text
    End Sub
    #95242

    wonder if change code to this for the textbox respectively would work might try it lol

    (form1)

    private sub command1_click ()

    me.hide

    form2.show

    form2.textbox1.text = me.textbox1.text

    end sub

    (form2)

    private sub command1_click ()

    me.hide

    form1.show

    form1.textbox1.text = me.textbox1.text

    end sub

    #95243

    lol couldnt make that work either i’m missing something

    #95246
    #95251

    forget that one i uploaded wrong version left out form 5
    heres one im working on
    https://www.dropbox.com/s/ycuw25i06r92tlm/NewBot%20Project%20files.zip?dl=0

    #95377

    Reinstalled 806 classic right from Paltalk and now it works again with all cams and no dc hahahha

    #95477

    I wonder if using this (with changes to correct text and forms will work)

        Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
            Form2.TextBox1.Text = TextBox1.Text
        End Sub
    
        Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
            Form2.Show()
        End Sub
Viewing 15 posts - 31 through 45 (of 291 total)
  • You must be logged in to reply to this topic.