Skip to content
Home > Programming > How to get a reaction on a Recieved PM?

How to get a reaction on a Recieved PM?

Viewing 15 posts - 31 through 45 (of 60 total)
  • Author
    Posts
  • #186635
    Chike
    Member

    How did I make you feel so far away?
    All I said that software is build in 3 stages, first is defining the requirements, then algorithm design, and then coding.
    Of course you need to be familiar with coding and the options you would have to implement the software to have a good design.
    It seems you know the options for implementation, you have the requirments, now yuou need the algoritm (in plain language) and then off to final coding.

    #186634
    ChiNa
    Administrator

    @Chike wrote:

    How did I make you feel so far away?
    All I said that software is build in 3 stages, first is defining the requirements, then algorithm design, and then coding.
    Of course you need to be familiar with coding and the options you would have to implement the software to have a good design.
    It seems you know the options for implementation, you have the requirments, now yuou need the algoritm (in plain language) and then off to final coding.

    Honestly, the first feeling was just that I felt EMPTY minded loool. And 2nd I feel a bit embarassed of giving you guys headache. I am still so new to this. But I always I read all your messsage twice or at least 3 times! Then I do my research! As loco knows I am very fast learner, and I am having you guys on here, so I feel awesome about it now. I feel that anything is possible, tho I have no idea about the alorithm part hhahahah. 😳 Thanks a bunch Chike

    #186633
    Chike
    Member

    The requirements:
    1. responde while in a way mode only.
    2. responde to new PMs only.

    For now assuming that any PM that is already open when changing status to away, or when the program is started, should

    not be responded to.
    You also mentioned a timer.
    So the algorithm, or flow of the program would be.
    periodically do:
    if status is away:
    if wasn't away before: remember all openned PM
    if was away before: respond to every PM you have not responded to, and remember you did
    if status is not away:
    remember it

    and pseudo code:

    timer_routibe()
    if status is away
    if first_time_away then
    remember pms
    else
    for every pm that is not in remembered pms: respond and remember
    endif
    else
    remember status was not away
    endif

    So maybe it will be more than 10 lines of code, but less than 20.
    If you use GetPMWindows as I first proposed, there is no extra work to do to “remember” the answered pms, after you done the respond part, the entire list can be saved as pms that were responded to.

    #186632
    ChiNa
    Administrator

    @Chike wrote:

    So maybe it will be more than 10 lines of code, but less than 20.
    If you use GetPMWindows as I first proposed, there is no extra work to do to “remember” the answered pms, after you done the respond part, the entire list can be saved as pms that were responded to.

    Good lord, I musta have done something good in life! Thanks a lot I will go to work immediately… And let you know how and where i came too.. I might ask a few questions about the timer… But so far So good Chike… Thanks Bro

    #186631
    ChiNa
    Administrator

    Hi Chike, I am back after 2 hours. But stuck at the “Flow” Part…

    Ok I got the timer done almost, but I have problems at the first part you showed me (Flow).
    Lets say the code below is my AWAY COMMAND that I put below my away button.

    EDITED AGAIN……….
    Code Removed as I am not done yet,, Cant reveal the surprise… (Was waiting for Chikes Respond)

    And this is where I am stuck:

    if status is away:
    if wasn't away before: remember all openned PM

    Now where should I start with the FLOW? Should I start the flow below the away code.
    And could you help me with those 2 lines ? Thank you very much.. Now I get a bit of a sence to this.

    #186630
    Chike
    Member

    The statud i am not sure, it can be fount in the status menu in main paltalk window, but the menu is not always visible, so leave it for later.
    was_away can be a boolean member of the class, changed every time that its needed.

    #186629
    ChiNa
    Administrator

    @Chike wrote:

    The statud i am not sure, it can be fount in the status menu in main paltalk window, but the menu is not always visible, so leave it for later.
    was_away can be a boolean member of the class, changed every time that its needed.

    Hi Chike, Thanks for a quick Response… I got all the Status functions done and ready! Looking for an option that can lead from “If Away” to “If Pm Window Open”…. Only the last part is what will cause me time going to.

    Timer also ready, Hopefully I done it right! Trying to work even hard now to create the last part. Thx again Chike

    #186628
    Chike
    Member

    what status functions do you have?

    #186627
    String
    Member

    I’ll try to help here, but I’m not really sure where your at or what your question is exactly.
    @ChiNa-Man wrote:

    And this is where I am stuck:
    Code: Select all
    if status is away:
    if wasn’t away before: remember all openned PM

    If I understand correctly, It’s easy to know when you are Away since you change your status to Away via your own program.
    So, In your timer :
    If Away = True Then
    Code for logging open pm’s or “remembering” them.
    End If

    #186626
    Chike
    Member

    @String wrote:

    If I understand correctly, It’s easy to know when you are Away since you change your status to Away via your own program.
    So, In your timer :
    If Away = True Then
    Code for logging open pm’s or “remembering” them.
    End If

    If he rely on changing status himself there is no need for the if.
    Remember pms and activate the timer when changing status to away, deactivate timer and forget pms when changing status to other.

    #186625
    ChiNa
    Administrator

    @String wrote:

    I’ll try to help here, but I’m not really sure where your at or what your question is exactly.
    @ChiNa-Man wrote:

    And this is where I am stuck:
    Code: Select all
    if status is away:
    if wasn’t away before: remember all openned PM

    If I understand correctly, It’s easy to know when you are Away since you change your status to Away via your own program.
    So, In your timer :
    If Away = True Then
    Code for logging open pm’s or “remembering” them.
    End If

    Hi String my Mate, Yeh I did try that way, and many other ways. I mean I got the timer right, but am stuck about how to create an IF statement for “Open Pm Windows”!

    And how to capture if a PM Window Opens or message is recieved?

    if "pm windows open" then
    send away message (Which is my RichTextBox.Text)
    end
    if "pm windows close" then do nothing
    end

    How to create an IF away of this:

    If "away" then activate My "RichTextBox" function (Send Message)
    End

    And where should i put this exact code below, If it should be under my away button or create another function.

    I may be the worse to explain, Hope you got me !

    #186624
    Chike
    Member

    GetPMWindows functions retrive the list of all open PMs.
    How to know if you have a new pm? If it’s not in the list you got from GetPMWindows last time.
    One saved list, a new list, “for each” loop. and “if” statement, that’s all it takes.

    #186623
    ChiNa
    Administrator

    @Chike wrote:

    GetPMWindows functions retrive the list of all open PMs.
    How to know if you have a new pm? If it’s not in the list you got from GetPMWindows last time.
    One saved list, a new list, “for each” loop. and “if” statement, that’s all it takes.

    Hi Chike.. OK, Now I did the last part to create the AUTO “REPLY” so it can reply everytime. I can now send text to PM with either with a button click, or below a timer etc. But still stuck to create an AUTO-RESPONSE using a Timer or the GetPMWindows automatically when a pm gets ..I think I need some help with this last part :s and then Im officially done.

    #186622
    Chike
    Member

    Form member

    Dim oldPMs as List(Of IntPtr)

    When changing to away

    oldPms = GetPMWindows()

    In timer

    Dim pms As List(Of IntPtr) = GetPMWindows()
    
    For Each pm As IntPtr in pms
    if Not oldPms.Contains(pm) Then
    respone(pm)
    End If
    Next
    
    oldPms = pms

     

    I have once posted code to extract commands from menu, it can be used to detect away status by checking if the away menu item is checked, but that will force the menubar in main paltalk list to be visible.

    #186621
    ChiNa
    Administrator

    I tried it , and I get that “not recognised” error on “GetPMWindows()”

    And I was using the code below to find each TITLE first and then send my richtextbox message:

    If CheckBox1.Checked = True Then
    If str.Length = 0 Or str.EndsWith(" Room") Then Continue While
    If Not ListBox1.Items.Contains("Title - " & str & "" & hWnd.ToString) Then
    Do Until ListBox1.Items.Contains("Title - " & str & "" & hWnd.ToString)
    Loop
    System.Windows.Forms.SendKeys.Send(RichTextSend.Text)
    End If
    End If
    End While
    End Sub

    Thank you very much Chike… I havnt done my homework yet 🙁
    Owe you guys..

Viewing 15 posts - 31 through 45 (of 60 total)
  • You must be logged in to reply to this topic.