Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Auto typer from list ?
#7
@ÜB3R' - Invoke a virtual key event for the Ctrl + A combination, then Delete or Backspace key, I would use this in it's own void or Sub, whatever, C#/VB. Call it when it's needed, Send the string for the listbox item, send Enter, remove ListBox item at index 0. Although with the way you have it going here, I would change things up a bit.

Example in C#:
Code:
private void button1_Click(object sender, EventArgs e)
{
    new Thread(x => SendStrings()).Start();
}

private void SendStrings()
{
    Thread.Sleep(1000);
    int total = listBox1.Items.Count;
    for (int x = 0; x < total; x++)
    {
        //INVOKE!
        SendKeys.SendWait(listBox1.Items[0].ToString());
        SendKeys.SendWait("{ENTER}");
        Invoke((MethodInvoker)delegate {
            listBox1.Items.RemoveAt(0);
            listBox1.Update();
        });
        Thread.Sleep(1000);
    }
}

• Start new thread
• Sleep thread for 1000 milliseconds
• Define a constant total because listBox1.Items.Count will change when we start removing items
• Loop from 0 for as long as x is less than the total that we've defined for our initial listBox1.Items.Count
• SendKeys for the listBox1.Item at index 0 as a string
• Since this is a thread we need to invoke to update the listBox and remove the item at 0
• Sleep for 1000 just for effect, so we can see a more transitional display of what this code does at a viewable pace

Note:
1) Each time we use listBox1 item at index 0, the buffer of items goes up every time through this loop as we continue to use item at index 0 and clear it out. 1 becomes index 0, 2 becomes index 1 and so on, until all of our items are gone, and none remain at index 0, therefore we should have no more listBox items by the time this loop is done with.

2) //INVOKE! - This is where I would be placing the call to the method where we invoke a virtual keypress to select everything, and delete the text from where ever location is currently active with the mouse ibeam.

Virtual Key constants are defined in a short list here: http://forums.codeguru.com/showthread.ph...ost1737427

There's lots more that I know of, although with some research you probably will see what i'm talking about with Virtual Keys Smile I'll leave that up to you to find out what it is though. I've started you off with all that you need to know here, and provided you a good direction for what you're trying to achieve.
Reply


Messages In This Thread
Auto typer from list ? - by ÜB3R - 03-13-2012, 08:24 PM
RE: Auto typer from list ? - by AceInfinity - 03-13-2012, 09:36 PM
RE: Auto typer from list ? - by AceInfinity - 03-16-2012, 06:16 PM
RE: Auto typer from list ? - by ÜB3R - 07-18-2012, 01:17 AM
RE: Auto typer from list ? - by ÜB3R - 07-18-2012, 02:32 AM
RE: Auto typer from list ? - by AceInfinity - 07-18-2012, 06:57 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [RELEASE] Auto Forum Launcher Advanced [Updated 09/01/2012]] FizzyMentos 14 3,154 01-16-2012, 02:13 PM
Last Post: FizzyMentos
  [VB.net] Auto fill - Auto Login fanste 2 2,038 12-17-2011, 03:17 PM
Last Post: fanste
  [HELP] AUTO TYPER MirZan 11 2,989 03-21-2011, 12:28 PM
Last Post: z3r0c00l
  [Tut] How to make an auto text spammer in vb 2008. [Beginner] DeMeR 4 3,929 10-04-2010, 07:57 AM
Last Post: Jordan L.
  Auto Updater DeHaterZ 6 984 07-21-2010, 09:55 PM
Last Post: `P R O D I G Y™

Forum Jump:


Users browsing this thread: 1 Guest(s)