Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 7 of 7
  1. #1
    Join Date
    Mar 2007
    Posts
    452

    Grin Input Lock Help (with Worm's "input.dll")

    Code:
    tblPos = Input.GetPos("Input1")
    lock = Button.GetState("Button43");
    if mute == BTN_UP then
    Result = DLL.CallFunction("AutoPlay\\Docs\\input.dll", "AllowInput", Application.GetWndHandle().."," .. tblPos.X..","..tblPos.Y, DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL)
    else
    Result = DLL.CallFunction("AutoPlay\\Docs\\input.dll", "ReadOnly", Application.GetWndHandle().."," .. tblPos.X..","..tblPos.Y, DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL)
    end
    why the code doesnt work ??? it locks input1 and doesnt allow writing...
    Last edited by GoOgLe; 03-29-2007 at 04:34 AM.

  2. #2
    Join Date
    May 2006
    Posts
    5,380
    1st of all, why are you useing a dll to do this when ams can do the same thing very easy,

    2nd, you are testing the wrong var

    Code:
    tblPos = Input.GetPos("Input1")
    lock = Button.GetState("Button43");
    if mute == BTN_UP then
    Result = DLL.CallFunction("AutoPlay\\Docs\\input.dll", "AllowInput", Application.GetWndHandle().."," .. tblPos.X..","..tblPos.Y, DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL)
    else
    Result = DLL.CallFunction("AutoPlay\\Docs\\input.dll", "ReadOnly", Application.GetWndHandle().."," .. tblPos.X..","..tblPos.Y, DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL)
    end
    try this, it will do the same thing

    Code:
    inpProps = {};
    
    lock = Button.GetState("Button2");
    if lock == 1 then
    inpProps.ReadOnly = true;
    else
    inpProps.ReadOnly = false;
    end
    
    Input.SetProperties("Input1", inpProps);
    Open your eyes to Narcissism, Don't let her destroy your life!!

  3. #3
    Join Date
    Mar 2007
    Posts
    452

    Thumbs up

    thanks Rizlauk

    i am bit tired i think thats why i couldnt c the wrong var...


  4. #4
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    The DLL was written back in the day of v5. As Rizla mentioned, its not needed in v6.

  5. #5
    Join Date
    Mar 2007
    Posts
    452
    Rizlauk

    this code can not lock adding code ???? why ???

    Code:
    inpProps = {};
    
    lock = Button.GetState("Button2");
    if lock == 1 then
    inpProps.ReadOnly = true;
    else
    inpProps.ReadOnly = false;
    end
    
    Input.SetProperties("Input1", inpProps);

  6. #6
    Join Date
    Mar 2007
    Posts
    452
    Rizlauk
    ur code blocks typing but can not lock when adding code with button click ???? why ???

    Code:
    inpProps = {};
    
    lock = Button.GetState("Button2");
    if lock == 1 then
    inpProps.ReadOnly = true;
    else
    inpProps.ReadOnly = false;
    end
    
    Input.SetProperties("Input1", inpProps);

  7. #7
    Join Date
    May 2006
    Posts
    5,380
    its because the buttons are direct input and not on key stroke

    you will need to disable the buttons as well
    Open your eyes to Narcissism, Don't let her destroy your life!!

Similar Threads

  1. How do I restrict certain characters in an input with AMS6?
    By toujoursnaz in forum AutoPlay Media Studio 6.0
    Replies: 4
    Last Post: 09-24-2006, 01:11 PM
  2. Input Box Wierdness
    By Roboblue in forum AutoPlay Media Studio 6.0
    Replies: 9
    Last Post: 11-18-2005, 01:20 PM
  3. Lorne’s two great input validation scripts
    By csd214 in forum AutoPlay Media Studio 5.0
    Replies: 2
    Last Post: 06-09-2004, 09:13 AM
  4. Function: Test Whether An Input Object Is Empty
    By Lorne in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 06-08-2004, 02:18 PM
  5. multiline input table apocalypse
    By dulux1309 in forum AutoPlay Media Studio 5.0
    Replies: 1
    Last Post: 04-09-2004, 05:28 AM

Posting Permissions

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