English
Source / code snippets

Console real - 2

 
- Page 1 -


If the right Runtime (in the Source indicated and in the Downloadcenter to that Download offered) used becomes so fungiert this Source as real Console - because The expenses disembark in the XPSE-Window.
CompileMarkSeparation
 {$runtime prfrun32.xp9.nores.console.exe}
 {$crq}
Declare text$,x&,y&,con&,conrect#
Dim conrect#,20
Def AllocConsole(0) !"KERNEL32","AllocConsole"
Def FreeConsole(0) !"KERNEL32","FreeConsole"
Def GetStdHandle(1) !"KERNEL32","GetStdHandle"
Def SetConsoleTitle(1) !"KERNEL32","SetConsoleTitleA"
Def SetConsoleTextAttribute(2) !"KERNEL32","SetConsoleTextAttribute"
Def WriteConsole(5) !"KERNEL32","WriteConsoleA"

Proc PrintCon

    Parameters context$
    context$=context$+Chr$(13)+chr$(10)
    WriteConsole(con&,addr(context$),len(context$),addr(x&),0)

EndProc

AllocConsole()
text$="Console Testfenster "
SetConsoleTitle(addr(text$))
con&=GetStdHandle(-11)

Whileloop 100

    PrintCon "Test "+Str$(Rnd(1000))

Wend

WaitInput
FreeConsole()
End
salvo, iF.
 
09/11/05  
 



 
- Page 1 -



Frank
Abbing
look in the Win32.hlp to or with MSDN. here times the gängigen Console-API-functions. mostly is the names well To entnehmen, which function itself behind it hide:

AllocConsole
CreateConsoleScreenBuffer
FillConsoleOutputAttribute
FillConsoleOutputCharacter
FlushConsoleInputBuffer
FreeConsole
GenerateConsoleCtrlEvent
GetConsoleCP
GetConsoleCursorInfo
GetConsoleMode
GetConsoleOutputCP
GetConsoleScreenBufferInfo
GetConsoleTitle
GetLargestConsoleWindowSize
GetNumberOfConsoleInputEvents
GetNumberOfConsoleMouseButtons
GetStdHandle
HandlerRoutine
PeekConsoleInput
ReadConsole
ReadConsoleInput
ReadConsoleOutput
ReadConsoleOutputAttribute
ReadConsoleOutputCharacter
ScrollConsoleScreenBuffer
SetConsoleActiveScreenBuffer
SetConsoleCP
SetConsoleCtrlHandler
SetConsoleCursorInfo
SetConsoleCursorPosition
SetConsoleMode
SetConsoleOutputCP
SetConsoleScreenBufferSize
SetConsoleTextAttribute
SetConsoleTitle
SetConsoleWindowInfo
SetStdHandle
WriteConsole
WriteConsoleInput
WriteConsoleOutput
WriteConsoleOutputAttribute
WriteConsoleOutputCharacter
 
08/14/06  
 




Jac
de
Lad
Oh god, there be I Yes yet To christmas engage. I schaus me everything (!) on, but I thought there has Perhaps someone what in petto or so...

Jac
 
Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE)
Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP
08/15/06  
 




Jac
de
Lad
Öhhm, means I Have now time in the Platform SDk geschaut, there standing too plenty drin, but though I the english Language powerful be, I will probably still rather one traditionelles XProfan-Proggi write (must), I come lest clear (ca. 20000 Commands in The direction Console...)

Jac
 
Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE)
Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP
08/15/06  
 




Jörg
Sellmeyer
Hello Jac,
have You Prfellow? there Gibts a Presentation with Include for Konsolenfenster.

Greeting
Jörg
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
08/15/06  
 




Jac
de
Lad
no, I take ProfanPAD...time see...

Jac
 
Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE)
Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP
08/15/06  
 



 
- Page 2 -



Frank
Abbing

I schaus me everything (!) on, but I thought there has Perhaps someone what in petto or so...


is probably not sonderlich usual. time sincere, who would like already a 700 KB grosse Consolenanwendung...
 
08/15/06  
 




Jac
de
Lad
Well, habs on 224kB compressed (ASPack) but I machs nevertheless traditional with Gridboxen, the goes too. having me on the XPSE orientiert and wished my Präcompiler so similar style, but is ne stupid idea...

Jac
 
Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE)
Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP
08/15/06  
 



integrally in the contrary ne stupid idea! only as ConsolenApp can The expenses too detoured go, this is important if one crazy IDEs uses which the feature support. not umsonst are derartige Applications ConsolenApps.

I würds on your place absolutely at least try!
 
08/15/06  
 




Jac
de
Lad
Well, unfortunately understand I not so integrally from MSDN or the windows SDK everything rauszulesen and Profan umzusetzen, there haperts. therefore I thought Yes, that Perhaps someone what parat has, but since nobody what has (what about me neither wants, that someone here everything stand and lying can, only so I mean Console wars) think I its rather the in normalen Profan umzusetzen...

Jac
 
Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE)
Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP
08/16/06  
 



with the new XPSE is the whole even yet plenty plainer and explicit kürzer:

example for spending and input within of/ one Konsole:
CompileMarkSeparation
 {$cleq}
Allocconsole()
Setconsoletitle("Meine Konsole")
cout "testWie lautet Dein Name? "
string s:=cin()
Freeconsole()
messagebox "Huhu" +s,,0
End

cout(string t){

    writeconsole(Getstdhandle(STD_OUTPUT_HANDLE),addr(t),len(t),0,0)

}

cin{

    mem mem=65535
    long c
    Readconsole(Getstdhandle(STD_INPUT_HANDLE),addr(mem),sizeof(mem)256,addr(c),0)
    string s:=char$(mem,0,c)
    dispose mem
    return s

r=#0000FF>}

 
06/11/07  
 




jacdelad
functions so far well, but if I what in the Console markiere and then a Text spend wants depends itself my Program on. How can I the prevent?
 
06/25/19  
 




jacdelad
OK, hab's self rausgefunden.
 
06/27/19  
 




Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

21.928 Views

Untitledvor 0 min.
H.Brill02/18/24
Sven Bader11/23/23
Torsten Boo09/02/21
p.specht07/18/21
More...

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie