Results 1 to 9 of 9

Thread: [RESOLVED] I Forget HowTo Write Code That Will Click on Button From My Program (Simple!)

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2014
    Posts
    90

    Resolved [RESOLVED] I Forget HowTo Write Code That Will Click on Button From My Program (Simple!)

    hey guys,

    i remember i used code that if few words only but i forget him
    it's was somethings with: "eButton"
    let's say that i have button1 and i have button2 and if i will click on button1 it's will click on button2

    how i am doing it?

  2. #2
    Still learning kebo's Avatar
    Join Date
    Apr 2004
    Location
    Gardnerville,nv
    Posts
    3,758

    Re: I Forget HowTo Write Code That Will Click on Button From My Program (Simple!)

    To click a button from code use Button1.PerformClick
    kevin
    Process control doesn't give you good quality, it gives you consistent quality.
    Good quality comes from consistently doing the right things.

    Vague general questions have vague general answers.
    A $100 donation is required for me to help you if you PM me asking for help. Instructions for donating to one of our local charities will be provided.

    ______________________________
    Last edited by kebo : Now. Reason: superfluous typo's

  3. #3
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    11,755

    Re: I Forget HowTo Write Code That Will Click on Button From My Program (Simple!)

    Try:
    Code:
    Button2.PerformClick()
    Edit: kevin beat me to it!
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | Code Tags | Sword of Fury - Jameram

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Aug 2014
    Posts
    90

    Re: I Forget HowTo Write Code That Will Click on Button From My Program (Simple!)

    Hahaha thank guys

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Aug 2014
    Posts
    90

    Re: I Forget HowTo Write Code That Will Click on Button From My Program (Simple!)

    Quote Originally Posted by kebo View Post
    To click a button from code use Button1.PerformClick
    kevin
    Quote Originally Posted by dday9 View Post
    Try:
    Code:
    Button2.PerformClick()
    Edit: kevin beat me to it!
    Maybe do you know more way please?


  6. #6
    Still learning kebo's Avatar
    Join Date
    Apr 2004
    Location
    Gardnerville,nv
    Posts
    3,758

    Re: [RESOLVED] I Forget HowTo Write Code That Will Click on Button From My Program (S

    PerformClick is for a button. Apparently it doesn't work for DotNetBar.ButtonItem. (I don't know what a DotNetBar is I know what a NutBar is though)

    You could always move the code in the ButtonItem click event to a new routine, then call the routine from the ClickEvent and whenever you need to simulate the click.
    kevin
    Process control doesn't give you good quality, it gives you consistent quality.
    Good quality comes from consistently doing the right things.

    Vague general questions have vague general answers.
    A $100 donation is required for me to help you if you PM me asking for help. Instructions for donating to one of our local charities will be provided.

    ______________________________
    Last edited by kebo : Now. Reason: superfluous typo's

  7. #7
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    11,755

    Re: [RESOLVED] I Forget HowTo Write Code That Will Click on Button From My Program (S

    By the way, is this to bypass a captch?
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | Code Tags | Sword of Fury - Jameram

  8. #8

    Thread Starter
    Lively Member
    Join Date
    Aug 2014
    Posts
    90

    Re: [RESOLVED] I Forget HowTo Write Code That Will Click on Button From My Program (S

    Quote Originally Posted by kebo View Post
    PerformClick is for a button. Apparently it doesn't work for DotNetBar.ButtonItem. (I don't know what a DotNetBar is I know what a NutBar is though)

    You could always move the code in the ButtonItem click event to a new routine, then call the routine from the ClickEvent and whenever you need to simulate the click.
    kevin
    Okay i got it, if i will use normal button it's will work on him? i'll try.

    Quote Originally Posted by dday9 View Post
    By the way, is this to bypass a captch?
    it's takes screenshot of the captcha place, call captcha service and write the solution.
    it's very long so to avoid problems if i can click on him from the program it's will be great.
    i'll try copy paste the code for normal button.

  9. #9
    Super Moderator FunkyDexter's Avatar
    Join Date
    Apr 2005
    Location
    An obscure body in the SK system. The inhabitants call it Earth
    Posts
    7,902

    Re: [RESOLVED] I Forget HowTo Write Code That Will Click on Button From My Program (S

    Our AUP explicitely prohibits bypassing a captcha in this way so I'm closing this thread.
    The best argument against democracy is a five minute conversation with the average voter - Winston Churchill

    Hadoop actually sounds more like the way they greet each other in Yorkshire - Inferrd

Posting Permissions

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



Click Here to Expand Forum to Full Width