locked
Letter Pusher Application RRS feed

  • Question

  • hi there i am trying to get a application im making to push the letter Z every 75 milliseconds and im not sure how to? i have made 2 buttons and a timer. what next guys?  i want the application to stop when i push F2 and start after 2minutes when clicking button 1. can someone please submit coding or sumthing?
    Sunday, February 1, 2009 10:42 AM

Answers

  • Ok fine .... hehe, in testing the sample code here, my app is putting a bunch of z's here in this post as I typed out my response... I found it amusing ....... [cough]......  Should meet the full requirements in your first post (with the exception of the target of the 'z' letters)  Click the button, and after 2 minutes, the z's start showing up every 3/4 of a second in the textbox.  Push F2, and it stops.


    Public Class Form1  
     
        Private myTimer As New Windows.Forms.Timer  
        Private myDelay As New Windows.Forms.Timer  
     
        Private delayStart As DateTime  
     
        Private tb As New TextBox()  
        Private Button1 As New Button  
     
        Private Sub Form1_Load(ByVal sender As System.ObjectByVal e As System.EventArgs) Handles MyBase.Load  
     
            tb.Multiline = True 
            tb.Dock = DockStyle.Fill  
            Me.Controls.Add(tb)  
     
     
            Button1.Dock = DockStyle.Top  
            AddHandler Button1.Click, AddressOf Button1_Click  
            Me.Controls.Add(Button1)  
     
            myTimer.Interval = 750  
            AddHandler myTimer.Tick, AddressOf myTimerTick  
     
            myDelay.Interval = 1
            AddHandler myDelay.Tick, AddressOf myDelayTick  
     
            Me.KeyPreview = True 
            AddHandler Me.KeyDown, AddressOf myKeyDown  
     
        End Sub 
     
        Private Sub Button1_Click(ByVal sender As System.ObjectByVal e As System.EventArgs)  
            delayStart = Date.Now  
            myDelay.Start()  
        End Sub 
     
        Private Sub myDelayTick()  
            Button1.Text = Date.Now  
            If (Date.Now >= DateAdd(DateInterval.Minute, 2, delayStart)) Then 
                myTimer.Start()  
                myDelay.Stop()  
            End If 
        End Sub 
     
        Private Sub myTimerTick()  
            tb.Focus()  
            SendKeys.Send("z")  
        End Sub 
     
        Private Sub myKeyDown(ByVal sender As System.ObjectByVal e As System.Windows.Forms.KeyEventArgs)  
            If (e.KeyCode = Keys.F2) Then 
                myTimer.Stop()  
            End If 
        End Sub 
     
     
    End Class 


    Keep in mind that the SendKeys.Send method will send the keys to the control that currently has focus, thats why I put the tb.focus() in myTimerTick().  If you want to send keys to another application, thats some more work you'll [cough] (or us) will have to do.




    Compensating what I don't know yet, with what I do know now.
    • Edited by Stuck on Code Monday, February 2, 2009 1:27 PM added logic to stop the delay timer
    • Marked as answer by ryannathans23 Thursday, February 5, 2009 9:01 AM
    Monday, February 2, 2009 1:23 PM
  • See this example:

    Public Class Form1  
     
        Private Sub Form1_Load(ByVal sender As System.ObjectByVal e As System.EventArgs) Handles MyBase.Load  
            Dim tb As New TextBox()  
            tb.Multiline = True 
            tb.Dock = DockStyle.Fill  
            Me.Controls.Add(tb)  
     
            Dim timer As New Windows.Forms.Timer  
            timer.Interval = 750  
            AddHandler timer.Tick, AddressOf myElapsed  
            timer.Start()  
        End Sub 
     
        Private Sub myElapsed()  
            SendKeys.Send("z")  
        End Sub 
     
    End Class 

    In this example, SendKeys will send the letter "z" to whatever control currently has focus(i.e. the textbox instantiated as tb), every 3/4 of a second. 

    Compensating what I don't know yet, with what I do know now.
    • Edited by Stuck on Code Monday, February 2, 2009 7:12 AM corrected named as tb to instantiated as tb. Dont want to get bit by code shark.
    • Marked as answer by ryannathans23 Monday, February 2, 2009 12:04 PM
    • Unmarked as answer by ryannathans23 Monday, February 2, 2009 12:34 PM
    • Marked as answer by ryannathans23 Thursday, February 5, 2009 9:01 AM
    Monday, February 2, 2009 6:56 AM
  • Because what your doing is potentially litigous, and morally wrong.  This is a Microsoft forum.  Hacking other people's assets, is for obvious reasons, WRONG!  and depending on the situation, ILLEGAL! 

    Duh!  Do you ever read the license agreements for software you install?  Did you read the license agreement for maplestory?  Honestly, grow up!  Respect other's intellectual rights!  Now a days, big MMO accounts are worth money, and your looking at the possibility of going to prison!  You want that?  Believe you me, the fed's look at a small time hack just the same as they do a big time hack (last I heard anyway) and rightfully so! 
    Compensating what I don't know yet, with what I do know now.
    • Marked as answer by ryannathans23 Thursday, February 5, 2009 9:33 AM
    Thursday, February 5, 2009 9:31 AM

All replies

  • are we supposed to know what "push the letter Z..." means?  show us the code you have, using the paint brush thing in the upper right corner. (why couldn't MS use LINK and CODE)???????????????????
    Looking for work - Zip 65101 http://www.vbforums.com/showthread.php?t=552774
    Sunday, February 1, 2009 3:14 PM
  • i want this application to immitate me pushing the letter Z every 75 milliseconds ( every .75 of a second)
    Monday, February 2, 2009 6:37 AM
  • See this example:

    Public Class Form1  
     
        Private Sub Form1_Load(ByVal sender As System.ObjectByVal e As System.EventArgs) Handles MyBase.Load  
            Dim tb As New TextBox()  
            tb.Multiline = True 
            tb.Dock = DockStyle.Fill  
            Me.Controls.Add(tb)  
     
            Dim timer As New Windows.Forms.Timer  
            timer.Interval = 750  
            AddHandler timer.Tick, AddressOf myElapsed  
            timer.Start()  
        End Sub 
     
        Private Sub myElapsed()  
            SendKeys.Send("z")  
        End Sub 
     
    End Class 

    In this example, SendKeys will send the letter "z" to whatever control currently has focus(i.e. the textbox instantiated as tb), every 3/4 of a second. 

    Compensating what I don't know yet, with what I do know now.
    • Edited by Stuck on Code Monday, February 2, 2009 7:12 AM corrected named as tb to instantiated as tb. Dont want to get bit by code shark.
    • Marked as answer by ryannathans23 Monday, February 2, 2009 12:04 PM
    • Unmarked as answer by ryannathans23 Monday, February 2, 2009 12:34 PM
    • Marked as answer by ryannathans23 Thursday, February 5, 2009 9:01 AM
    Monday, February 2, 2009 6:56 AM
  • uhh nope. can u please add code so that after the form opens it takes 120sec for it to start pushing Z, thanks
    Monday, February 2, 2009 12:05 PM
  • Ok fine .... hehe, in testing the sample code here, my app is putting a bunch of z's here in this post as I typed out my response... I found it amusing ....... [cough]......  Should meet the full requirements in your first post (with the exception of the target of the 'z' letters)  Click the button, and after 2 minutes, the z's start showing up every 3/4 of a second in the textbox.  Push F2, and it stops.


    Public Class Form1  
     
        Private myTimer As New Windows.Forms.Timer  
        Private myDelay As New Windows.Forms.Timer  
     
        Private delayStart As DateTime  
     
        Private tb As New TextBox()  
        Private Button1 As New Button  
     
        Private Sub Form1_Load(ByVal sender As System.ObjectByVal e As System.EventArgs) Handles MyBase.Load  
     
            tb.Multiline = True 
            tb.Dock = DockStyle.Fill  
            Me.Controls.Add(tb)  
     
     
            Button1.Dock = DockStyle.Top  
            AddHandler Button1.Click, AddressOf Button1_Click  
            Me.Controls.Add(Button1)  
     
            myTimer.Interval = 750  
            AddHandler myTimer.Tick, AddressOf myTimerTick  
     
            myDelay.Interval = 1
            AddHandler myDelay.Tick, AddressOf myDelayTick  
     
            Me.KeyPreview = True 
            AddHandler Me.KeyDown, AddressOf myKeyDown  
     
        End Sub 
     
        Private Sub Button1_Click(ByVal sender As System.ObjectByVal e As System.EventArgs)  
            delayStart = Date.Now  
            myDelay.Start()  
        End Sub 
     
        Private Sub myDelayTick()  
            Button1.Text = Date.Now  
            If (Date.Now >= DateAdd(DateInterval.Minute, 2, delayStart)) Then 
                myTimer.Start()  
                myDelay.Stop()  
            End If 
        End Sub 
     
        Private Sub myTimerTick()  
            tb.Focus()  
            SendKeys.Send("z")  
        End Sub 
     
        Private Sub myKeyDown(ByVal sender As System.ObjectByVal e As System.Windows.Forms.KeyEventArgs)  
            If (e.KeyCode = Keys.F2) Then 
                myTimer.Stop()  
            End If 
        End Sub 
     
     
    End Class 


    Keep in mind that the SendKeys.Send method will send the keys to the control that currently has focus, thats why I put the tb.focus() in myTimerTick().  If you want to send keys to another application, thats some more work you'll [cough] (or us) will have to do.




    Compensating what I don't know yet, with what I do know now.
    • Edited by Stuck on Code Monday, February 2, 2009 1:27 PM added logic to stop the delay timer
    • Marked as answer by ryannathans23 Thursday, February 5, 2009 9:01 AM
    Monday, February 2, 2009 1:23 PM
  • ALRITE i worked this out... to push z on a EXE open file!!! but some apps cause an error here it is :A first chance exception of type 'System.Security.SecurityException' occurred in System.Windows.Forms.dll     SendKeys.Send("z") is highlighted in yellow
    Tuesday, February 3, 2009 12:07 PM
  • Please supply the detailed information about your scenario. Really thanks!

    Let me make a couple of recommendations about asking questions.

    1.) When you have a question about your code, post the code. No one can answer questions about why your code isn't working without seeing the code.

    2.) When you have an error, specify exactly what the error is and where it occurs in the code. Minimize the use of pronouns because they are ambiguous. 

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Wednesday, February 4, 2009 8:48 AM
    Moderator
  • Public Class Form1 
     
        Private myTimer As New Windows.Forms.Timer 
        Private myDelay As New Windows.Forms.Timer 
     
        Private delayStart As DateTime 
     
        Private tb As New TextBox() 
        Private Button1 As New Button 
     
        Private Sub Form1_Load(ByVal sender As System.ObjectByVal e As System.EventArgs) Handles MyBase.Load 
     
            tb.Multiline = True 
            tb.Dock = DockStyle.Fill 
            Me.Controls.Add(tb) 
     
     
            Button1.Dock = DockStyle.Top 
            AddHandler Button1.Click, AddressOf Button1_Click 
            Me.Controls.Add(Button1) 
     
            myTimer.Interval = 750 
            AddHandler myTimer.Tick, AddressOf myTimerTick 
     
            myDelay.Interval = 1 
            AddHandler myDelay.Tick, AddressOf myDelayTick 
     
            Me.KeyPreview = True 
            AddHandler Me.KeyDown, AddressOf myKeyDown 
     
        End Sub 
     
        Private Sub Button1_Click(ByVal sender As System.ObjectByVal e As System.EventArgs) 
            delayStart = Date.Now 
            myDelay.Start() 
        End Sub 
     
        Private Sub myDelayTick() 
            Button1.Text = Date.Now 
            If (Date.Now >= DateAdd(DateInterval.Second, 0, delayStart)) Then 
                myTimer.Start() 
                myDelay.Stop() 
            End If 
        End Sub 
     
        Private Sub myTimerTick() 
            SendKeys.Send("z"
        End Sub 
     
        Private Sub myKeyDown(ByVal sender As System.ObjectByVal e As System.Windows.Forms.KeyEventArgs) 
            If (e.KeyCode = Keys.F2) Then 
                myTimer.Stop() 
     
            ElseIf (e.KeyCode = Keys.F3) Then 
                myTimer.Start() 
     
            End If 
        End Sub 
     
     
     
    End Class 
    that was my code and when i use it on maplestory it says" System.Security.SecurityException' occurred in System.Windows.Forms.dll" when im debuggin' thanks
    Wednesday, February 4, 2009 10:17 AM
  • Check security settings in your project:

    1. Right click the project
    2. Properties
    3. Security ->What data is set here?

    Also read Code Access Security for your reference.

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Thursday, February 5, 2009 8:37 AM
    Moderator
  • right click => properties does nothing
    Thursday, February 5, 2009 8:48 AM
  • Then your not right clicking on your project. 
    Compensating what I don't know yet, with what I do know now.
    Thursday, February 5, 2009 8:53 AM
  • its coz ive already got the properties box open..
    Thursday, February 5, 2009 8:54 AM
  • if the project properties tab is not the current tab, then  VS will switch to it when you right click the project and click properties.  Its not because the properties is already open.

    solutionexplorer
    Compensating what I don't know yet, with what I do know now.
    Thursday, February 5, 2009 8:59 AM
  • now what

    Thursday, February 5, 2009 9:00 AM
  • i dont want to bother with this app anymore.... consider it CLOSED
    Thursday, February 5, 2009 9:00 AM
  • Thata boi, give up.  That way you dont progress, and simply remain at your current level.  I'll tell you right now, hacking maplestory or whatever it is, is not easy.... hacking any game is not easy. 


    However, I've hacked runescape (for my own personal enjoyment in vb6, and again in c# simply to test my knowledge of certain hooks.  You will need to use the windows API.  Programming is not some run of the mill dime store technology.  It is incredibly involved, beyond what you can even possibly comprehend at your current level of experience.  Hopefully people will not assist you in hacking other peoples assets


    Compensating what I don't know yet, with what I do know now.
    Thursday, February 5, 2009 9:13 AM
  • ok so i wont give up, what do i need to do to make a auto looter for maple story that will go undetected?
    Thursday, February 5, 2009 9:15 AM
  • hahahaha..... dude, this is soooo hard, you dont even know..... I only have the slightest clue on how to go about it.  I've read forums of auto hack programs ( I forget the name ;) ) where there were a million threads about kids trying to hack maplestory.  Your talking about looking at memory locations, reading hex, and tracking assembly language instructions like jmp....... The runescape hack I did simply allowed me to record mouse movements and click's.  Making things like auto miner's, and fishers, rapid spell casting (pretty cool in the wilderness.  I'd line up an opposing player in front of me, and activate my auto spell.  It would fire like a million fireballs at one click.  hahaha  anyways.... You wont (or shouldnt find an answer here, you need to search elsewhere)
    Compensating what I don't know yet, with what I do know now.
    Thursday, February 5, 2009 9:21 AM
  • so what i had wont work?
    Thursday, February 5, 2009 9:22 AM
  • and why not
    Thursday, February 5, 2009 9:22 AM
  • Because what your doing is potentially litigous, and morally wrong.  This is a Microsoft forum.  Hacking other people's assets, is for obvious reasons, WRONG!  and depending on the situation, ILLEGAL! 

    Duh!  Do you ever read the license agreements for software you install?  Did you read the license agreement for maplestory?  Honestly, grow up!  Respect other's intellectual rights!  Now a days, big MMO accounts are worth money, and your looking at the possibility of going to prison!  You want that?  Believe you me, the fed's look at a small time hack just the same as they do a big time hack (last I heard anyway) and rightfully so! 
    Compensating what I don't know yet, with what I do know now.
    • Marked as answer by ryannathans23 Thursday, February 5, 2009 9:33 AM
    Thursday, February 5, 2009 9:31 AM
  • ok then... i read somewhere auto looters just saved time and were 'leagal' and all they did was push z for you
    Thursday, February 5, 2009 9:33 AM
  • I dont mean to be harsh (and appreciate the post marked as answered) but as a programmer, would you like someone else hacking your code? or stealing your money?  Of course the answer is no.  There is a degree of ethics involved in learning the technologies you are embarking on.  Across the internet, you'll find the criminal element just as you would in your real life day to day interactions.... Its your decision the path you follow..... but head this warning .... its a tenious path, and crossing the line can become like an addiction, until you find yourself in jail or under court order to stay away from computers for 10 years, and a 10,000 dollar fine.  Innocent hacking of maplestory is not so innocent, when you pause and just think about it for a moment.

    If you havent noticed I absolutely HATE hackers. 
    Compensating what I don't know yet, with what I do know now.
    Thursday, February 5, 2009 9:47 AM