SciLor's Open Source Forums

How LeoCameraAnyKey is coded?
Page 1 of 1

Author:  ajs.ajs [ Thu Jul 29, 2010 8:18 pm ]
Post subject:  How LeoCameraAnyKey is coded?

This program looks a useful additon to a Lea camera.
You web site says open source code.
Is it possible to download the source and take a look at how you made the program ?
Best Regards

Author:  SciLor [ Thu Jul 29, 2010 9:39 pm ]
Post subject:  Re: How the app is coded?

Not all of my software is open source (Sometimes cause of lack of time, sometimes due to the hard work I put it). If you are interested in anything special in coding, just ask me. In general it just catches the buttons and presses the capture button on the screen.

Author:  digiman [ Mon Aug 02, 2010 8:59 pm ]
Post subject:  Re: How the app is coded?

Dear SciLor,
Is there any chance you could send me the code to the LeoCameraAnyKey? I'm really interested in making a time lapse camera program for the HD2 and would love a head start... I will be more than happy to share any code I produce on the project with you. It's just for personal use -- tried I think every camera time lapse program for the HD2 and no dice -- the best one, CamTimer uses key code \0D but on the HD2, as Im sure you know, is nothing :)
Thanks in advance,

Author:  SciLor [ Mon Aug 02, 2010 9:15 pm ]
Post subject:  Re: How the app is coded?

I just make a virtual mouseclick onto the shutter button (With

First of all you will need following apis:
Private Declare Sub mouse_event Lib "coredll.dll" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long)
Private Declare Function SetCursorPos Lib "coredll.dll" (ByVal X As Integer, ByVal Y As Integer) As Boolean
    Private Const MOUSEEVENTF_ABSOLUTE = &H8000
    Private Const MOUSEEVENTF_LEFTDOWN = &H2
    Private Const MOUSEEVENTF_LEFTUP = &H4
    Private Const MOUSEEVENTF_MIDDLEUP = &H40
    Private Const MOUSEEVENTF_MOVE = &H1
    Private Const MOUSEEVENTF_RIGHTUP = &H10

Then just set the Cursor position on the shutter button by (This coordinates are for the WVGA Devices only!):
Call SetCursorPos(240,780)

Then trigger a mouse down event:
                mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0)
                mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0)

Author:  digiman [ Mon Aug 02, 2010 10:06 pm ]
Post subject:  Re: How LeoCameraAnyKey is coded?

You're a lifesaver... Thanks a million!

Page 1 of 1 All times are UTC + 1 hour [ DST ]
Powered by phpBB® Forum Software © phpBB Group