I have a stack in which I want to obfuscate some things.
I want to have a button that when clicked while holding either the controlkey or the commandkey to do something othar than in in the mouseup handler script that in in the current script.
In the current script I have:
on mouseup
if the label of me is "Locked" then
set the label of me to "Unlocked"
end mouseup
My intention is to have the mouseup message accomplish something entirely different.
Thanks in advance.
I want to obfuscate some things.
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: I want to obfuscate some things.
Hi oldummy,
do you mean something like this:
Best
Klaus
do you mean something like this:
Code: Select all
on mouseUp
## Not sure if this should happen only with controlkey or commandkey?
if the label of me = "Locked" then
set the label of me to "Unlocked"
end if
if the controlkey = "down" then
## do your stuff
exit mouseup
end if
if the commandkey = "down" then
## do something else
exit mouseup
end if
end mouseUp
Klaus
Re: I want to obfuscate some things.
The confusion for many readers looking at this will arise from the verb "obfuscate", as you are asking for nothing of the sort as far as I can tell...
It seems like you want a button to do something different with the control/commandkey is down and Klaus has you fully covered on that front...
Unless you're talking about obfuscating something else?
obfuscate
UK /ˈɒbfʌskeɪt/
verb (with object)
1.
make obscure, unclear, or unintelligible
e.g.: the spelling changes will deform some familiar words and obfuscate their etymological origins
2.
bewilder (someone)
e.g.: the new rule is more likely to obfuscate people than enlighten them
It seems like you want a button to do something different with the control/commandkey is down and Klaus has you fully covered on that front...
Unless you're talking about obfuscating something else?
Re: I want to obfuscate some things.
We've already been this far...
-
- VIP Livecode Opensource Backer
- Posts: 9731
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: I want to obfuscate some things.
@Klaus. It is just that not every person who posts in a thread reads the previous history of that thread. I have been guilty of that occasionally.
@ Anthony. Right, but wrong. "optionKey" is a function. You cannot use "if the optionKey()". Use instead "if optionKey()", or go where I always do, "if the optionKey is down". I find that more descriptive when I am re-reading it later on.
Craig
@ Anthony. Right, but wrong. "optionKey" is a function. You cannot use "if the optionKey()". Use instead "if optionKey()", or go where I always do, "if the optionKey is down". I find that more descriptive when I am re-reading it later on.
Craig