Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (Akow, TipmyPip, tomaslolo), 788 guests, and 11 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
how to cancel inkey #280817
07/24/09 10:45
07/24/09 10:45
Joined: Apr 2002
Posts: 224
Twickenham,England
kiamonster Offline OP
Member
kiamonster  Offline OP
Member

Joined: Apr 2002
Posts: 224
Twickenham,England
I have an 'inkey' in a function.
If I wish to cancel this function, the cancel works but the system stilll waits for the 'inkey' response.
I have tried 'send_string' but without success.
Any ideas please?

Re: how to cancel inkey [Re: kiamonster] #280818
07/24/09 10:49
07/24/09 10:49
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
From the manual
inkey_active = 0; // terminate inkey instruction


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: how to cancel inkey [Re: kiamonster] #280825
07/24/09 11:08
07/24/09 11:08
Joined: Apr 2002
Posts: 224
Twickenham,England
kiamonster Offline OP
Member
kiamonster  Offline OP
Member

Joined: Apr 2002
Posts: 224
Twickenham,England
Thanks evilsob. Much appreciated.
Excellent tip.
Alas this project begun in 5.24, I came across it, decided to finish it, but couldn't be bothered to upgrade.
There is a work-around, but it is not as elegant or easy as 'inkey'
If needs be, I'll upgrade (but a lot of WDL = but at least now I know what to do if I wasn't so lazy) - or any other ideas please.

Re: how to cancel inkey [Re: kiamonster] #280832
07/24/09 11:39
07/24/09 11:39
Joined: May 2009
Posts: 258
Chicago
J
Jaeger Offline
Member
Jaeger  Offline
Member
J

Joined: May 2009
Posts: 258
Chicago
Another thing you could do with with EvilSOB's answer:

Let's say we've got multiple text boxes that a user could click on and type things.

When they click on a box, make the first command inkey_active = 0; You could also use OFF. Then it activates inkey for that box. Why? Because the user might already have inkey active for something else, and it must be terminated. So don't forget to keep that in mind. I created quite a few bugs by not doing that before.


Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1