 |
|
 |
|
Next: Avoiding file name truncating for attachements
|
| Author |
Message |
External

Since: Jul 03, 2003 Posts: 17
|
(Msg. 1) Posted: Thu Jan 27, 2005 3:40 pm
Post subject: Check if a key is down, and which one is Archived from groups: comp>sys>mac>hypercard (more info?)
|
|
|
Hi,
Can anyone help with a Hypertalk question?
I want to check if a key is down and, if yes, which key is (or are).
Something like "if the shiftKey is down". Actually I want to write a
'launcher' stack with a script along the following lines:
on openStack
if Akey is down then -- well, the idea is to see if the 'A' key is down
open applicationA
endif
if Gkey is down then open applicationG
if Zkey is down then open applicationZ
etc...
end openStack
The idea is to put this stack in the startup folder, and hold the key(s)
corresponding to the application(s) I want to launch at startup while the
Mac is booting.
Ideally, it would be nice if I could check for several keys that are held
down together (up to 10, as that's the number of my fingers :-)
The 'keydown' handler won't do, it's got to be a test in the openStack
handler. I can't find a hypertalk command for this.
--
Fjordur >> Stay informed about: Check if a key is down, and which one is |
|
| Back to top |
|
 |  |
External

Since: Jan 02, 2004 Posts: 5
|
(Msg. 2) Posted: Fri Jan 28, 2005 8:40 am
Post subject: Re: Check if a key is down, and which one is [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
[[ This message was both posted and mailed: see
the "To," "Cc," and "Newsgroups" headers for details. ]]
In article <BE1EFE74.1EDE%fjordur@free.fr>, Fjordur <fjordur RemoveThis @free.fr>
wrote:
> I want to check if a key is down and, if yes, which key is (or are).
> Something like "if the shiftKey is down". Actually I want to write a
> 'launcher' stack with a script along the following lines:
> Ideally, it would be nice if I could check for several keys that are held
> down together (up to 10, as that's the number of my fingers :-)
I have a KeyMap XCMD which does what you need.
I'll email it to you.
Harry.<!-- ~MESSAGE_AFTER~ --> >> Stay informed about: Check if a key is down, and which one is |
|
| Back to top |
|
 |  |
External

Since: Jul 03, 2003 Posts: 17
|
(Msg. 3) Posted: Fri Jan 28, 2005 9:40 am
Post subject: Re: Check if a key is down, and which one is [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
in article 280120051223542874%g6auc@invalid.net, Harry Whitfield at
g6auc RemoveThis @invalid.net wrote on 28/01/05 13:23:
> [[ This message was both posted and mailed: see
> the "To," "Cc," and "Newsgroups" headers for details. ]]
>
> In article <BE1EFE74.1EDE%fjordur@free.fr>, Fjordur <fjordur RemoveThis @free.fr>
> wrote:
>
>> I want to check if a key is down and, if yes, which key is (or are).
>> Something like "if the shiftKey is down". Actually I want to write a
>> 'launcher' stack with a script along the following lines:
>
>> Ideally, it would be nice if I could check for several keys that are held
>> down together (up to 10, as that's the number of my fingers :-)
>
> I have a KeyMap XCMD which does what you need.
>
> I'll email it to you.
Thanks, please do so! It'll help a lot.
--
Fjordur<!-- ~MESSAGE_AFTER~ --> >> Stay informed about: Check if a key is down, and which one is |
|
| Back to top |
|
 |  |
External

Since: Jan 02, 2004 Posts: 5
|
(Msg. 4) Posted: Fri Jan 28, 2005 10:40 am
Post subject: Re: Check if a key is down, and which one is [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
> >> I want to check if a key is down and, if yes, which key is (or are).
> >> Something like "if the shiftKey is down". Actually I want to write a
> >> 'launcher' stack with a script along the following lines:
> >
> >> Ideally, it would be nice if I could check for several keys that are held
> >> down together (up to 10, as that's the number of my fingers :-)
XCMD KeyMap <a style='text-decoration: underline;' href="http://g7awz.users.btopenworld.com/KeyMap.sit" target="_blank">http://g7awz.users.btopenworld.com/KeyMap.sit</a>
Harry.<!-- ~MESSAGE_AFTER~ --> >> Stay informed about: Check if a key is down, and which one is |
|
| Back to top |
|
 |  |
External

Since: Jul 03, 2003 Posts: 17
|
(Msg. 5) Posted: Fri Jan 28, 2005 10:40 am
Post subject: Re: Check if a key is down, and which one is [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
in article 280120051435091311%g6auc@invalid.net, Harry Whitfield at
g6auc.TakeThisOut@invalid.net wrote on 28/01/05 15:35:
>>>> I want to check if a key is down and, if yes, which key is (or are).
>>>> Something like "if the shiftKey is down". Actually I want to write a
>>>> 'launcher' stack with a script along the following lines:
>>>
>>>> Ideally, it would be nice if I could check for several keys that are held
>>>> down together (up to 10, as that's the number of my fingers :-)
>
<font color=purple> > XCMD KeyMap <a style='text-decoration: underline;' href="http://g7awz.users.btopenworld.com/KeyMap.sit</font" target="_blank">http://g7awz.users.btopenworld.com/KeyMap.sit</font</a>>
Downloaded OK, thanks a lot; seems to be exactly what I need,
but...
I don't see how to go from keymap() to the char. Pressing Shift returns 56
(it's great to be able to catch such keys as Shift!) or pressing a returns
12. Is there a way to map the key to the char?
Thanks again,
--
Fjordur<!-- ~MESSAGE_AFTER~ --> >> Stay informed about: Check if a key is down, and which one is |
|
| Back to top |
|
 |  |
External

Since: Jan 02, 2004 Posts: 5
|
(Msg. 6) Posted: Fri Jan 28, 2005 2:40 pm
Post subject: Re: Check if a key is down, and which one is [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
[[ This message was both posted and mailed: see
the "To," "Cc," and "Newsgroups" headers for details. ]]
In article <BE20138A.250E%fjordur@free.fr>, Fjordur <fjordur RemoveThis @free.fr>
wrote:
> in article 280120051435091311%g6auc@invalid.net, Harry Whitfield at
> g6auc RemoveThis @invalid.net wrote on 28/01/05 15:35:
>
> >>>> I want to check if a key is down and, if yes, which key is (or are).
> >>>> Something like "if the shiftKey is down". Actually I want to write a
> >>>> 'launcher' stack with a script along the following lines:
> >>>
> >>>> Ideally, it would be nice if I could check for several keys that are held
> >>>> down together (up to 10, as that's the number of my fingers :-)
> >
<font color=green> > > XCMD KeyMap <a style='text-decoration: underline;' href="http://g7awz.users.btopenworld.com/KeyMap.sit</font" target="_blank">http://g7awz.users.btopenworld.com/KeyMap.sit</font</a>>
> Downloaded OK, thanks a lot; seems to be exactly what I need,
> but...
> I don't see how to go from keymap() to the char. Pressing Shift returns 56
> (it's great to be able to catch such keys as Shift!) or pressing a returns
> 12. Is there a way to map the key to the char?
> Thanks again,
You do it by defining mapping arrays:
put "asdfhgzxcv§bqweryt123465............." into unshifted
put "ASDFHGZXCY±....................................." into shifted
etc.
I.e. you put the characters in order of the key codes and then look up
a key code in the array of characters.
c = char keycode+1 of unshifted
or if the shift key ( key 56) is down
c = char keycode+1 of shifted.
Tedious, but you can easily find the keycodes by using the stack I sent
you.
Harry.<!-- ~MESSAGE_AFTER~ --> >> Stay informed about: Check if a key is down, and which one is |
|
| Back to top |
|
 |  |
External

Since: Jul 26, 2003 Posts: 18
|
(Msg. 7) Posted: Mon Jan 31, 2005 1:40 pm
Post subject: Re: Check if a key is down, and which one is [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
|
|
| Back to top |
|
 |  |
External

Since: Jul 03, 2003 Posts: 17
|
(Msg. 8) Posted: Tue Feb 01, 2005 5:40 am
Post subject: Re: Check if a key is down, and which one is [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
in article 20050131121904.11735.00000336 DeleteThis @mb-m03.aol.com, DunbarX at
dunbarx DeleteThis @aol.com wrote on 31/01/05 18:19:
> There is a great stack called "Key XFCNs V 2.0" which does it all. Still
> around, I think, or I have it...
Found it, thanks for the pointer. Looks fine.
--
Fjordur<!-- ~MESSAGE_AFTER~ --> >> Stay informed about: Check if a key is down, and which one is |
|
| Back to top |
|
 |  |
| Related Topics: | Accounting and check writiing - Can anyone direct me to examples of hypercard stacks for accounting and check writing. I am already doing accounting and property management on HC, but would like to see what others are doing. Thanks , John Hudson
Anybody feel like doing a Runtime Revolution build? - I've got a demo/student/whatever licensed version of Runtime Revolution, which means I can only do builds for Macs. That's fine, but I'm curious to see how (or even if) this project works under Windows. The file is at http://just-john.com/cn/AArev.zi...
DIFfersifier 3.0 beta release - Hello, Today, the first beta release of DIFfersifier 3.0 has been completed. DIFfersifier is a conversion utility for HyperCard, MetaCard and Revolution stacks. It converts stacks to a number of different formats, including the Data Interchange..
ANN: European HyperCard User Group - Hello, The European HyperCard User Group (eHUG) has released a newsletter. The newsletter contains a brief introduction to eHUG, an announcement of the video conference to be held on Wednesday 23rd July and a few remarks about the Apple Expo 2003 Paris....
Where can I get it? - Hallo all, I just recently got an old imac, and whilst stareing at it debateing on what to do with it, (besides learnin the frigin things lol) I remembered HyperCard, I miss it alot, and would love to locate a copy, (Of course I mean "borrow") ... |
|
You can post new topics in this forum You can reply to topics in this forum You can edit your posts in this forum You can delete your posts in this forum You can vote in polls in this forum
|
|
|
|
 |
|
|