Author Topic: A bit of programing help.  (Read 1129 times)

0 Members and 1 Guest are viewing this topic.

Offline Zeak

  • Newbie
  • *
  • Posts: 11
A bit of programing help.
« on: June 07, 2012, 10:16:34 am »
 Lately a friend was wondering if  I could write a simple C++ program that simulates a left mouse click. I told him I could,but I don't think I can now. Is there someway to fake a program running in the background that a mouse has been clicked?
The north's Deliverance:"Paddle faster,I hear banjos!"
My Deliverance:"Paddle faster,I hear a highway!"

Offline Avan

  • Species: Azemdyn Sabertooth Hyena
  • Gender: Non-Binary, YEEN.
  • *
  • Posts: 5010
    • Our FA
Re: A bit of programing help.
« Reply #1 on: June 07, 2012, 03:16:55 pm »
What platform (OS) are you using?
We are Dissociated Identities.

Avatar is of Avan-Syr (Saberyeen)
Old links to art sites we need to update:
Weasyl Page: https://www.weasyl.com/~avankaira
My FA page: http://www.furaffinity.net/user/avanwolf/

Steam: http://steamcommunity.com/id/avan_wolf/

Offline redyoshi49q

  • Species: (*please see above*)
  • Avatar from Dexcat's MFF 2013 Photoshoot
  • *
  • Male
  • Posts: 2071
    • Enigma Cipher (software project)
Re: A bit of programing help.
« Reply #2 on: June 07, 2012, 04:57:09 pm »
As someone who, for all intents and purposes, hasn't written any graphical C++ programs, I can't really answer definitively; an answer from someone who has done this

If you're looking for coding practice, read on.  If you're looking for results, skip to the last paragraph.

Yes, I'm pretty sure that something like this could be written in C++.  Having said that, it may be difficult to write something like that as a program; it may be necessary to write at least part of the code as a driver, imbed assembly language in to the C++ code, and/or to call software libraries to perform low level tasks (I'm not certain about which of these would be necessary, if any).  It would most certainly not be a "simple" program; it is certainly good coding practice, but *not* for a beginner.

There's already tools that do this, though.  An example of such a tool is this (I'm assuming a Windows OS; there's almost certainly Linux tools for this as well).  Hopefully, that should serve whatever purpose you were looking to serve.
"Perfect normality is impossible.  Be unique!"
-- redyoshi49q




^ (click) Puzzle game!

Offline Zeak

  • Newbie
  • *
  • Posts: 11
Re: A bit of programing help.
« Reply #3 on: June 07, 2012, 10:36:33 pm »
Thanks red. Yeah,I was looking for practice.  But my friend could not find one.  I though it was simple code. So simple it was a waste to make one. I will in tell him that. But how in ties would it be done? On windows.
The north's Deliverance:"Paddle faster,I hear banjos!"
My Deliverance:"Paddle faster,I hear a highway!"

Offline redyoshi49q

  • Species: (*please see above*)
  • Avatar from Dexcat's MFF 2013 Photoshoot
  • *
  • Male
  • Posts: 2071
    • Enigma Cipher (software project)
Re: A bit of programing help.
« Reply #4 on: June 08, 2012, 01:15:39 am »
AutoHotkey is an open source program, which means that its source has been made available by the authors.  You can look at the program's source to see how it works.  Depending on your proficiency in coding, you may not yet be able to understand how the entire program works.  If so, that's okay; you can give it another shot after you've had more practice with less complex projects.
"Perfect normality is impossible.  Be unique!"
-- redyoshi49q




^ (click) Puzzle game!

Offline Zeak

  • Newbie
  • *
  • Posts: 11
Re: A bit of programing help.
« Reply #5 on: June 08, 2012, 01:32:59 am »
I might feel around with that later. I want to finsh up with my Web security basics. I picked up C as a side hobby.
The north's Deliverance:"Paddle faster,I hear banjos!"
My Deliverance:"Paddle faster,I hear a highway!"

Offline Acton

  • Hero Member
  • Species: Republican Black Bear
  • Unrepentant Furry, Otaku and Anglican.
  • *****
  • Male
  • Posts: 2367
    • Acton Hermitage
Re: A bit of programing help.
« Reply #6 on: June 08, 2012, 02:17:15 pm »
First thing you need id some Development tools. Are you using Visual C++ or Visual C++ Express.
  If you do not have it you can download the free at http://www.microsoft.com/visualstudio/en-us/products/2010-editions/express
 As for what you want to day I never had done it but here away to access the window hooks to call mouse event check Google.  The problem is Microsoft sees this a a possible security risk and tries to isolate events to the application.

My question is why   does this person want to simulate mouse events?