Problem with InKeyStr()

Report any Hollywood bugs here
Post Reply
User avatar
Allanon
Posts: 732
Joined: Sun Feb 14, 2010 7:53 pm
Location: Italy
Contact:

Problem with InKeyStr()

Post by Allanon »

Hello,

if I set the password flag the InKeyStr() function returns asterisks instead of the typed string.

Code: Select all

a = InKeyStr(#ALL, 100, False)
DebugPrint(a)
b = InKeyStr(#ALL, 100, True)
DebugPrint(b)
DebugPrompt("HIT ENTER")
I'm using it with Layers enabled, but the same problem exists also without layers...
Bugala
Posts: 1178
Joined: Sun Feb 14, 2010 7:11 pm

Re: Problem with InKeyStr()

Post by Bugala »

Seems to work right here. Hollywood7.1 and Windows.

First it shows typed letters, second try it shows asterisk.
SamuraiCrow
Posts: 475
Joined: Fri May 15, 2015 5:15 pm
Location: Waterville, Minnesota USA

Re: Problem with InKeyStr()

Post by SamuraiCrow »

@Bugala

Only the echo to the console is supposed to be asterisks. The variable assignment is supposed to be unaffected.
I'm on registered MorphOS using FlowStudio.
Bugala
Posts: 1178
Joined: Sun Feb 14, 2010 7:11 pm

Re: Problem with InKeyStr()

Post by Bugala »

@SamuraiCrow

ah, i see. That happens here too that the variable assignment is asterisks as well.
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Problem with InKeyStr()

Post by airsoftsoftwair »

Oops, will be fixed. Thanks for reporting!
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Problem with InKeyStr()

Post by airsoftsoftwair »

Code: Select all

- Fix: InKeyStr() simply returned a string full of asterisks when password mode was active, which is
  not quite what password mode was made for
zenzizenzizenzic
Posts: 28
Joined: Fri Mar 15, 2019 2:35 pm

Re: Problem with InKeyStr()

Post by zenzizenzizenzic »

Another problem I've noted with InKeyStr is that if an empty string is entered, it will reset the print statement to the upper left of the screen and overwrite existing text.
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Problem with InKeyStr()

Post by airsoftsoftwair »

True, I'll fix this. Thanks for reporting!
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Problem with InKeyStr()

Post by airsoftsoftwair »

Code: Select all

- Fix: When entering an empty string in InKeyStr(), the cursor position was reset to the top-left corner
Post Reply