Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. An application for mouse click event

An application for mouse click event

Scheduled Pinned Locked Moved C / C++ / MFC
sysadmintoolshelptutorial
10 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    shubhi
    wrote on last edited by
    #1

    hi, i am connecting the server PC. and running some long duration application. but it get disconnect if PC is idle for more than 2 minutes. i have to write some script so that mouse get click after every 1 minute. waiting for any suggestion, help or any example. Thanks

    "We can't solve problems by using the same kind of thinking we used when we created them"

    _ S H 3 Replies Last reply
    0
    • S shubhi

      hi, i am connecting the server PC. and running some long duration application. but it get disconnect if PC is idle for more than 2 minutes. i have to write some script so that mouse get click after every 1 minute. waiting for any suggestion, help or any example. Thanks

      "We can't solve problems by using the same kind of thinking we used when we created them"

      _ Offline
      _ Offline
      _Superman_
      wrote on last edited by
      #2

      Check out the SendInput Windows API.

      «_Superman_»

      S 1 Reply Last reply
      0
      • _ _Superman_

        Check out the SendInput Windows API.

        «_Superman_»

        S Offline
        S Offline
        shubhi
        wrote on last edited by
        #3

        Could you plz elaborate it more??:confused:

        "We can't solve problems by using the same kind of thinking we used when we created them"

        _ 1 Reply Last reply
        0
        • S shubhi

          Could you plz elaborate it more??:confused:

          "We can't solve problems by using the same kind of thinking we used when we created them"

          _ Offline
          _ Offline
          _Superman_
          wrote on last edited by
          #4

          Create an application with a timer whose duration is 1 Minute. In the timer routine, call SendInput with a left button down message.

          «_Superman_»

          1 Reply Last reply
          0
          • S shubhi

            hi, i am connecting the server PC. and running some long duration application. but it get disconnect if PC is idle for more than 2 minutes. i have to write some script so that mouse get click after every 1 minute. waiting for any suggestion, help or any example. Thanks

            "We can't solve problems by using the same kind of thinking we used when we created them"

            S Offline
            S Offline
            Stuart Dootson
            wrote on last edited by
            #5

            Mmmm - that really isn't safe, randomly clicking the mouse every minute. What's the root cause of the disconnection?

            S 1 Reply Last reply
            0
            • S Stuart Dootson

              Mmmm - that really isn't safe, randomly clicking the mouse every minute. What's the root cause of the disconnection?

              S Offline
              S Offline
              shubhi
              wrote on last edited by
              #6

              actually it needs some hardware interrupt. if i click any where on remote EM screen or higlight the remote EM window , it remains active session otherwise connection gets lost. can i do like this, just to highlight that window, by command prompt coding.. etc

              "We can't solve problems by using the same kind of thinking we used when we created them"

              S 1 Reply Last reply
              0
              • S shubhi

                actually it needs some hardware interrupt. if i click any where on remote EM screen or higlight the remote EM window , it remains active session otherwise connection gets lost. can i do like this, just to highlight that window, by command prompt coding.. etc

                "We can't solve problems by using the same kind of thinking we used when we created them"

                S Offline
                S Offline
                Stuart Dootson
                wrote on last edited by
                #7
                1. Can you define what you mean by 'connection'
                2. What does 'EM' mean?
                S 1 Reply Last reply
                0
                • S Stuart Dootson
                  1. Can you define what you mean by 'connection'
                  2. What does 'EM' mean?
                  S Offline
                  S Offline
                  shubhi
                  wrote on last edited by
                  #8

                  ok, i am not making you understand... ..once more... i am connecting server remotely. and running a long duration application on it...now from my local pc, if i don't highlight or run any hardware interrupt on that remote pc, session get disabled. so i want to run such a script, so that..i can highlight that remote PC window after every 1 minute....

                  "We can't solve problems by using the same kind of thinking we used when we created them"

                  S 1 Reply Last reply
                  0
                  • S shubhi

                    ok, i am not making you understand... ..once more... i am connecting server remotely. and running a long duration application on it...now from my local pc, if i don't highlight or run any hardware interrupt on that remote pc, session get disabled. so i want to run such a script, so that..i can highlight that remote PC window after every 1 minute....

                    "We can't solve problems by using the same kind of thinking we used when we created them"

                    S Offline
                    S Offline
                    Stuart Dootson
                    wrote on last edited by
                    #9

                    I'd try something like getting the window handle with FindWindow and then activating the window every minute.

                    1 Reply Last reply
                    0
                    • S shubhi

                      hi, i am connecting the server PC. and running some long duration application. but it get disconnect if PC is idle for more than 2 minutes. i have to write some script so that mouse get click after every 1 minute. waiting for any suggestion, help or any example. Thanks

                      "We can't solve problems by using the same kind of thinking we used when we created them"

                      H Offline
                      H Offline
                      Hamid Taebi
                      wrote on last edited by
                      #10

                      I think this[^] article is helpful for you.

                      Of one Essence is the human race thus has Creation put the base One Limb impacted is sufficient For all Others to feel the Mace (Saadi )

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups