PDA

View Full Version : Input Lock Help (with Worm's "input.dll")


GoOgLe
03-29-2007, 05:29 AM
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...

RizlaUK
03-29-2007, 08:02 AM
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

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

inpProps = {};

lock = Button.GetState("Button2");
if lock == 1 then
inpProps.ReadOnly = true;
else
inpProps.ReadOnly = false;
end

Input.SetProperties("Input1", inpProps);

GoOgLe
03-29-2007, 08:08 AM
thanks Rizlauk

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

:yes :yes :yes :yes :yes :yes :yes :yes :yes

Worm
03-29-2007, 09:05 AM
The DLL was written back in the day of v5. As Rizla mentioned, its not needed in v6.

GoOgLe
03-30-2007, 12:58 AM
Rizlauk

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

inpProps = {};

lock = Button.GetState("Button2");
if lock == 1 then
inpProps.ReadOnly = true;
else
inpProps.ReadOnly = false;
end

Input.SetProperties("Input1", inpProps);

GoOgLe
03-30-2007, 12:59 AM
Rizlauk
ur code blocks typing but can not lock when adding code with button click ???? why ???

inpProps = {};

lock = Button.GetState("Button2");
if lock == 1 then
inpProps.ReadOnly = true;
else
inpProps.ReadOnly = false;
end

Input.SetProperties("Input1", inpProps);

RizlaUK
03-30-2007, 09:52 AM
its because the buttons are direct input and not on key stroke

you will need to disable the buttons as well