Results 1 to 10 of 10

Thread: [VB.NET] Sending a PM through clraik using a link

  1. #1

    Joined
    Nov 2012
    Posts
    29
    Thanks
    4
    Thanked
    16/6
    DL/UL
    52/0
    Mentioned
    4 times
    Time Online
    2d 36m
    Avg. Time Online
    N/A

    [VB.NET] Sending a PM through clraik using a link

    Hey, I've been working on a program for the past few hours getting back into the groove and am wondering how I could open a user's default browser up, navigate to the messaging section of clraik, and add a default user to send to as "Noxush" and the title to be "So and so title."

    I tried:

    Code:
    System.Diagnostics.Process.Start("http://clraik.com/forum/private.php?do=newpm&recipients=noxush&title=Titlehere&message=messagehere")
    But, it just automatically sends a blank message to myself, so how would I get it to not send the request but just fill in the proper data?

  2. #2
    Saiyan Race
    j03's Avatar
    Joined
    Dec 2011
    Posts
    13,720
    Userbars
    166
    Thanks
    5,906
    Thanked
    33,076/6,608
    DL/UL
    23/36
    Mentioned
    3,867 times
    Time Online
    563d 4h 55m
    Avg. Time Online
    3h 14m
    Heading to bed, but if no one answers this by tomorrow afternoon then I'll help you out.

    Edit: Actually yeah not sure.. never really worked with web browsers with .NET yet. Maybe @(you need an account to see links) can help.
    Last edited by j03; 12-01-2012 at 06:49 PM.
    (you need an account to see links)
    (you need an account to see links)(you need an account to see links)

    ------------------------
    [02/24/2013] Stealth CORE is made into the first standalone Neopets auto-player.
    ------------------------


  3. #3
    Black on Black Vegeta's Avatar
    Joined
    Dec 2011
    Posts
    121
    Userbars
    9
    Thanks
    40
    Thanked
    211/58
    DL/UL
    33/0
    Mentioned
    33 times
    Time Online
    7d 7h 13m
    Avg. Time Online
    2m
    Tagging for reminder @(you need an account to see links)

  4. #4

    Joined
    Nov 2012
    Posts
    29
    Thanks
    4
    Thanked
    16/6
    DL/UL
    52/0
    Mentioned
    4 times
    Time Online
    2d 36m
    Avg. Time Online
    N/A
    Okay, I'll see if he pops up, if not I'll just send a quick PM.

  5. #5
    Zachafer's Avatar
    Joined
    Dec 2011
    Posts
    1,235
    Userbars
    11
    Thanks
    769
    Thanked
    1,466/678
    DL/UL
    98/0
    Mentioned
    512 times
    Time Online
    24d 13h 9m
    Avg. Time Online
    8m
    Quote Originally Posted by Noxush View Post
    Hey, I've been working on a program for the past few hours getting back into the groove and am wondering how I could open a user's default browser up, navigate to the messaging section of clraik, and add a default user to send to as "Noxush" and the title to be "So and so title."

    I tried:

    Code:
    System.Diagnostics.Process.Start("http://clraik.com/forum/private.php?do=newpm&recipients=noxush&title=Titlehere&message=messagehere")
    But, it just automatically sends a blank message to myself, so how would I get it to not send the request but just fill in the proper data?
    The link is incorrect. private.php would have to look for variables in the $_REQUEST array indexed "do", "recipients", "title", "message". As of 2/26/11 vBulletin only reads the "do" and "u" link variables.

    Short answer: No you can't because vBulletin isn't setup like a (you need an account to see links).

    If you want to do this in VBNet, you could use the WebBrowser control and then put a value into the "Title" textbox:
    Code:
    WebBrowser1.Document.GetElementById("title").SetAttribute("value", "Title Here")

  6. The Following User Says Thank You to Zachafer For This Useful Post:

    Noxush (12-02-2012)

  7. #6

    Joined
    Nov 2012
    Posts
    29
    Thanks
    4
    Thanked
    16/6
    DL/UL
    52/0
    Mentioned
    4 times
    Time Online
    2d 36m
    Avg. Time Online
    N/A
    Strange, I'm sure I saw someone do what I'm looking to do in Vb.Net a while back, I'll play around with your suggestion and see what I can do.

  8. #7
    Zachafer's Avatar
    Joined
    Dec 2011
    Posts
    1,235
    Userbars
    11
    Thanks
    769
    Thanked
    1,466/678
    DL/UL
    98/0
    Mentioned
    512 times
    Time Online
    24d 13h 9m
    Avg. Time Online
    8m
    Use your wrapper to send a PM using their clraik auth info? (clear it with joe first)

    I'm sure you could try something like this in VBNet: (you need an account to see links)

    Personally, I'd use the webbrowser control on a form... that thing is great.

  9. #8

    Joined
    Nov 2012
    Posts
    29
    Thanks
    4
    Thanked
    16/6
    DL/UL
    52/0
    Mentioned
    4 times
    Time Online
    2d 36m
    Avg. Time Online
    N/A
    Well, it opened a web browser and if they were logged in, it would go to the messaging page, put in a predefined title as well as contact, and allowed you to type a message to send. I was planning on using it as a "Contact Me" control.

    EDIT: Oh, I had an epiphany and am testing with web browser controls, will reply later.

    EDIT: Okay, I tried
    Code:
    WebBrowser1.Navigate("http://clraik.com/forum/private.php?do=newpm")
    WebBrowser1.Document.GetElementById("title").SetAttribute("value", "Program Help")
    But it just throws me a "A first chance exception of type 'System.NullReferenceException' occurred in program.exe"
    Last edited by Noxush; 12-03-2012 at 07:17 PM.

  10. #9
    Zachafer's Avatar
    Joined
    Dec 2011
    Posts
    1,235
    Userbars
    11
    Thanks
    769
    Thanked
    1,466/678
    DL/UL
    98/0
    Mentioned
    512 times
    Time Online
    24d 13h 9m
    Avg. Time Online
    8m
    First of all use WebBrowswer1.Navigate ("http://clraik.com/forum/private.php?do=newpm&u=6069") 'notice the changed URL

    The null exception is occurring because once you call the Navigate method it doesn't pause execution. It will start loading the webpage and move on to the next code. So the Element with ID "title" does not (yet) exist in WebBrowser1.Document because it hasn't fully loaded when that line of code is ran.

    Also, once you fix that, you will have to deal with logging in the user because a new WebBrowser has cleared cookies so the user will not be logged into clraik.

  11. #10

    Joined
    Nov 2012
    Posts
    29
    Thanks
    4
    Thanked
    16/6
    DL/UL
    52/0
    Mentioned
    4 times
    Time Online
    2d 36m
    Avg. Time Online
    N/A
    Oh crazy, maybe not such a good idea then and probably preferably an email may be a solution.
    Last edited by Noxush; 12-04-2012 at 07:07 PM. Reason: Figured it out

  12. The Following User Says Thank You to Noxush For This Useful Post:

    Zachafer (12-07-2012)

Posting Permissions

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