mouseUp pButtonNumber
Posted: Sat Sep 28, 2019 9:37 pm
Hi this is driving me crazy,
I have a lot of fields on a card. I put a value in a different field called employee and when I click on any of the other empty fields on the card I want the name in the fld"employee" to be copied into the field I clicked on.
I am using LC 9.5.0 Build 15503 on a Macbook Air OS Mojave Version 10.14.6
The code in all of my fields of interest is:
on mouseUp
put fld"employee" into me
end mouseUp
on the Mac, I have a 3 button mouse.
This only works when I click using the right mouse button.
It doesn't matter to me if it works that way but I also want it to work with the left button.
I tried this code:
on mouseUp pButtonNumber
put pButtonNumber into tNum
if tNum = 1 then
answer tNum
end if
If tNum = 3 then
answer tNum
end if
end mouseUp
If I click on the field with the left mouse the answer is 1 if the right mouse the answer is 3.
I change the code to:
on mouseUp pButtonNumber
put pButtonNumber into tNum
if tNum = 1 then
put fld"employee" into me
end if
If tNum = 3 then
put fld"employee" into me
end if
end mouseUp
The name in the clicked on field only changes if I use the right mouse click.
Is this a bug or am I doing something terribly wrong?
Thanks Tom
I have a lot of fields on a card. I put a value in a different field called employee and when I click on any of the other empty fields on the card I want the name in the fld"employee" to be copied into the field I clicked on.
I am using LC 9.5.0 Build 15503 on a Macbook Air OS Mojave Version 10.14.6
The code in all of my fields of interest is:
on mouseUp
put fld"employee" into me
end mouseUp
on the Mac, I have a 3 button mouse.
This only works when I click using the right mouse button.
It doesn't matter to me if it works that way but I also want it to work with the left button.
I tried this code:
on mouseUp pButtonNumber
put pButtonNumber into tNum
if tNum = 1 then
answer tNum
end if
If tNum = 3 then
answer tNum
end if
end mouseUp
If I click on the field with the left mouse the answer is 1 if the right mouse the answer is 3.
I change the code to:
on mouseUp pButtonNumber
put pButtonNumber into tNum
if tNum = 1 then
put fld"employee" into me
end if
If tNum = 3 then
put fld"employee" into me
end if
end mouseUp
The name in the clicked on field only changes if I use the right mouse click.
Is this a bug or am I doing something terribly wrong?
Thanks Tom