As the title suggests, I need to be able to do one of two things, but don't know how to do either. Basically my problem is that I can't use "IsMouseButtonPressed(1)" to determine whether to execute a portion of a script if the script itself it using "PressAndReleaseMouseButton(1)". 

So, I either need a way to make my mouse button do something else during the script, or I need to prevent "IsMouseButtonPressed(1)" from reading an induced mouse click. I really just want it to check the state of the physical mouse. Is this possible? I am using LUA within Logitech Gaming Software.

EDIT: I am adding an example of my code using what I learned from Joseph. I do not know why this doesn't work. Luckily, there aren't any errors.

```
local fakePressStatus = {}

local function IsMouseButtonReallyPressed(b)
    return fakePressStatus[b] == nil and IsMouseButtonPressed(b)
end

local function FakePressAndReleaseMouseButton(b)
    fakePressStatus[b] = (fakePressStatus[b] or 0) + 1
    PressAndReleaseMouseButton(b)
end

function OnEvent(event, arg)
    if event == "MOUSE_BUTTON_RELEASED" then
        if fakePressStatus[b] == 1 then
            fakePressStatus[b] = nil
        elseif fakePressStatus[b] ~= nil then
            fakePressStatus[b] = fakePressStatus[b] - 1
        end
    end

    if IsMouseButtonReallyPressed(1) then
        for i = 0, 10 do
            if IsMouseButtonReallyPressed(1) then
                FakePressAndReleaseMouseButton(1)
                Sleep (100)
            else
                i = 10
            end
        end
    end
end

```