User Tag List

Results 1 to 5 of 5

Thread: Set a Value Question

  1. #1
    Clicker Fusion 2.5 DeveloperHTML5 Export Module

    Join Date
    Jun 2006
    Posts
    1,469
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)

    Set a Value Question

    In my code I want to add an action where using the special object I use "Set a Global Value"

    I am then allowed to use "Get Value from Object"

    In other words I am setting Global Value A to a value I get from another object.

    In my case the other object is an activex VideoXPro. But I want to get DetectMotion which returns a number. However MMF see's DetectMotion as an Event and will not allow me to use it.

    Anyway around this or a extension that could get around this?

  2. #2
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: Set a Value Question

    When you are in the expression editor (where you type in numbers ans strings) you can click on 'retrieve data from another obejct'.

    Maybe DetectMotion starts the detector and you can then retrieve the value while it is detecting. :\
    Working as fast as I can on Fusion 3

  3. #3
    Clicker Fusion 2.5 DeveloperHTML5 Export Module

    Join Date
    Jun 2006
    Posts
    1,469
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)

    Re: Set a Value Question

    No, in VB code it would work something like:

    set X to VideoXPro.DetectMotion (where X is of type integer.)

    MMF's activex extension treats DetectMotion as an action so
    will not see it as an expression.

  4. #4
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: Set a Value Question

    What happens if you use the action DetectMotion?
    Working as fast as I can on Fusion 3

  5. #5
    Clicker Fusion 2.5 DeveloperHTML5 Export Module

    Join Date
    Jun 2006
    Posts
    1,469
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)

    Re: Set a Value Question

    Nothing it is define as a method.

    I should be able to see if 30% of the pixels have changed which what DetectMotion returns.

    Here is from the documentation:

    Detect changes in video frames


    Syntax
    Function DetectMotion As Long

    Return value
    Long

    Remarks
    The DetectMotion method returns the number between 0 and 100, reflecting the change detected in front of the camera.

    Call this method every second or two and check the result it returns. If the result is greater than 30, there is something moving in front of the camera. Experiment with this to see which value to use.

    Example
    Sub Timer1_OnTimer()
    If VideoCapX1.DetectMotion>30 then
    Beep
    MsgBox “Where are you going?”
    End If
    End Sub

Posting Permissions

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