ConsolePrompt() prompts in debug window not in console

Report any Hollywood bugs here
plouf
Posts: 533
Joined: Sun Feb 04, 2018 11:51 pm
Location: Athens,Greece

ConsolePrompt() prompts in debug window not in console

Post by plouf »

in Windows OS
Hollywood 10
From the Hollywood IDE

example -> https://forums.hollywood-mal.com/viewto ... 010#p21010

however when compiled works !
Christos
User avatar
airsoftsoftwair
Posts: 5575
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: ConsolePrompt() promts in debug window not in console

Post by airsoftsoftwair »

That's a feature, not a bug ;) Console input isn't supported from the Hollywood IDE because imitating a complete console using GUI widgets is a lot of work and just not worth the effort. Most of the other functions from the console library won't work properly in the IDE either. If you want to use them, run Hollywood from a console.
plouf
Posts: 533
Joined: Sun Feb 04, 2018 11:51 pm
Location: Athens,Greece

Re: ConsolePrompt() promts in debug window not in console

Post by plouf »

Strange
Because i can see console opening ! And console DOES ACCEPT input just text goes to debug

The above example, waits any input and goes to next

But in the final promt waits for "=" and yes pushing = in openwd commmand line window, script get it correct
Just "print" goes to debugwindow ?!
Christos
User avatar
airsoftsoftwair
Posts: 5575
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: ConsolePrompt() promts in debug window not in console

Post by airsoftsoftwair »

Ok, now I see what you mean. I first thought you expected the actual prompt to occur in the IDE's debug dock window which is not possible. But you're right that the prompt text should be shown in the same location as the actual prompt so I've fixed ConsolePrompt() now.

Code: Select all

- Fix [Windows]: When using DebugPrompt() from the IDE, the prompt text was shown in the IDE's log window
  while the actual prompt occurred in a console window; now the prompt text is no longer shown in the IDE
  but in the console window as well
plouf
Posts: 533
Joined: Sun Feb 04, 2018 11:51 pm
Location: Athens,Greece

Re: ConsolePrompt() promts in debug window not in console

Post by plouf »

lost it !

in "fix" says "when using DebugPrompt()" but we are speaking for Consolepromt() ? is the same thing ? just typo?

also, dont know if its related and so fixed, but same problem is with ConsolePrint().
Christos
User avatar
airsoftsoftwair
Posts: 5575
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: ConsolePrompt() promts in debug window not in console

Post by airsoftsoftwair »

plouf wrote: Sun Sep 01, 2024 9:26 am in "fix" says "when using DebugPrompt()" but we are speaking for Consolepromt() ? is the same thing ? just typo?
Actually, DebugPrompt() does the same as ConsolePrompt(), it just won't do anything if debugging is disabled.
plouf wrote: Sun Sep 01, 2024 9:26 am also, dont know if its related and so fixed, but same problem is with ConsolePrint().
I don't think it makes sense to change the behaviour of ConsolePrint(). I think the output of ConsolePrint() should go to the IDE window even if ConsolePrompt() has opened a console window. The window opened by ConsolePrompt() should really only be used for prompting, not for general console output.
plouf
Posts: 533
Joined: Sun Feb 04, 2018 11:51 pm
Location: Athens,Greece

Re: ConsolePrompt() promts in debug window not in console

Post by plouf »

sorry :)

this is the "supposed correct" correct? -> https://ctrl.vi/i/fS7undM5n

why else ConsolePrint() not g to the console ?
Christos
User avatar
airsoftsoftwair
Posts: 5575
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: ConsolePrompt() promts in debug window not in console

Post by airsoftsoftwair »

plouf wrote: Tue Sep 10, 2024 7:56 pm why else ConsolePrint() not go to the console ?
Looks like you first need to enter something before the script will continue execution. ConsolePrompt() will block until there's some input...
plouf
Posts: 533
Joined: Sun Feb 04, 2018 11:51 pm
Location: Athens,Greece

Re: ConsolePrompt() prompts in debug window not in console

Post by plouf »

Ok

But pointing in where text going to

I believe consolepromt() AND ConsolePrint() text output should go to console (black console window)
While DebugPrint() should go to ide's bottom listgadget
Christos
User avatar
airsoftsoftwair
Posts: 5575
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: ConsolePrompt() prompts in debug window not in console

Post by airsoftsoftwair »

plouf wrote: Wed Sep 11, 2024 8:38 pm I believe consolepromt() AND ConsolePrint() text output should go to console (black console window)
While DebugPrint() should go to ide's bottom listgadget
You're right that it would make perfect sense if ConsolePrint() wrote its output to a real console window but I don't really want to change its behaviour because it could break many scripts where people use ConsolePrint() and expect the output to show up in the IDE's log window. Such a change in ConsolePrint() would force people to adapt their scripts to the new behaviour of ConsolePrint() which is something I try to avoid unless it's really necessary which is clearly not the case here IMHO.
Post Reply