Page 1 of 2

ConsolePrompt() prompts in debug window not in console

Posted: Sat Aug 24, 2024 7:48 pm
by plouf
in Windows OS
Hollywood 10
From the Hollywood IDE

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

however when compiled works !

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

Posted: Mon Aug 26, 2024 5:36 pm
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.

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

Posted: Mon Aug 26, 2024 5:40 pm
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 ?!

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

Posted: Sat Aug 31, 2024 11:30 pm
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

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

Posted: Sun Sep 01, 2024 9:26 am
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().

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

Posted: Tue Sep 10, 2024 7:34 pm
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.

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

Posted: Tue Sep 10, 2024 7:56 pm
by plouf
sorry :)

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

why else ConsolePrint() not g to the console ?

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

Posted: Wed Sep 11, 2024 8:35 pm
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...

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

Posted: Wed Sep 11, 2024 8:38 pm
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

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

Posted: Thu Sep 12, 2024 6:43 pm
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.