forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Built In Console Support
Goto page 1, 2  Next
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Wish List
View previous topic :: View next topic  
Author Message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Sun Jul 13, 2003 1:21 pm    Post subject: Built In Console Support Reply with quote

I'd like to see VDS have the built in ability to have support for making
console applications. Currently it is only available using the VDSSTDIO.DLL
and that can be unstable. Smile

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Sun Jul 13, 2003 1:29 pm    Post subject: Reply with quote

I dont know if this happens since dos and console only applications are dying . some developers even say that they dont support a dying OS like win 98
_________________
Regards
- CodeScript
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Sun Jul 13, 2003 5:34 pm    Post subject: Reply with quote

If you want to make CGI programs, you'll need an console interface to communicate with a server. I think this is where FreezingFire is talking about?
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Sun Jul 13, 2003 5:43 pm    Post subject: Reply with quote

I'm talking about DOS console applications, ones such as Telnet. Smile
_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Mon Jul 14, 2003 2:03 am    Post subject: Reply with quote

OK Big Smile
_________________
Regards
- CodeScript
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Mon Jul 14, 2003 2:14 pm    Post subject: Reply with quote

FreezingFire wrote:
I'm talking about DOS console applications, ones such as Telnet. Smile


Umm, The name of the language that this forum is for is called
Quote:
VISUAL Dialog Script
VDS for short Wink hehehehehehe
_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Mon Jul 14, 2003 2:32 pm    Post subject: Reply with quote

Umm I am talking about making a console application in VDS.
_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Mon Jul 14, 2003 2:53 pm    Post subject: Reply with quote

FreezingFire wrote:
Umm I am talking about making a console application in VDS.


But the language was never meant to make console applications hence the word "Visual" in Visual Dialog Script but I think you may be able to use the new PIPE capabilities of VDS 5 to achieve something similar to a console application. Your best bet would be to transfer the data between your Exe and a console screen. To make a VDS app that is a pure console application is not possible.

_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Mon Jul 14, 2003 2:57 pm    Post subject: Reply with quote

Well look at the VDSSTDIO.DLL and it is possible. My wish was to have it
built into VDS itself so it would be more stable.

I think it's not possible to entirely depend on the name of the language
anymore to see what its capabilities are. VDS is much more than a simple
batch scripting application now. Also I count a console application as
'visual' because you can see it, it's not heard, smelled, or felt. Wink

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Mon Jul 14, 2003 5:13 pm    Post subject: Reply with quote

FreezingFire wrote:
Well look at the VDSSTDIO.DLL and it is possible. My wish was to have it
built into VDS itself so it would be more stable.

I think it's not possible to entirely depend on the name of the language
anymore to see what its capabilities are. VDS is much more than a simple
batch scripting application now. Also I count a console application as
'visual' because you can see it, it's not heard, smelled, or felt. Wink


Actually Visual in Visual Dialog Script means you build your application visually. But I was just trying to make a poorly constructed joke here Sad When you use VDSSTDIO.DLL the dll is making the console by using the AllocConsole function from the kernel32.dll and this is not VDS. You can do exactly what VDSSTDIO.DLL does but you would need VDS 5 or Gadget and an understanding of the console functions in the kernel32.dll... So to help you get started I wrote a short little example for ya. It is still not complete and I still need to fix something about it but maybe you can take it from here.

Code:
%%STD_INPUT_HANDLE = -10
%%STD_OUTPUT_HANDLE = -11
%%STD_ERROR_HANDLE = -12

%%FOREGROUND_BLUE = $1
%%FOREGROUND_GREEN = $2
%%FOREGROUND_RED = $4
%%FOREGROUND_INTENSITY = $8
%%BACKGROUND_BLUE = $10
%%BACKGROUND_GREEN = $20
%%BACKGROUND_RED = $40
%%BACKGROUND_INTENSITY = $80

%%ENABLE_LINE_INPUT = $2
%%ENABLE_ECHO_INPUT = $4
%%ENABLE_MOUSE_INPUT = $10
%%ENABLE_PROCESSED_INPUT = $1
%%ENABLE_WINDOW_INPUT = $8

%%ENABLE_PROCESSED_OUTPUT = $1
%%ENABLE_WRAP_AT_EOL_OUTPUT = $2

LoadLib kernel32.dll
%A = @lib(kernel32,AllocConsole,INT:)
%A = @lib(kernel32,SetConsoleTitleA,INT:,STR:Hello VDS Console User)
%%hConsoleIn = @lib(kernel32,GetStdHandle,INT:,%%STD_INPUT_HANDLE)
%%hConsoleOut = @lib(kernel32,GetStdHandle,INT:,%%STD_OUTPUT_HANDLE)
%%hConsoleErr = @lib(kernel32,GetStdHandle,INT:,%%STD_ERROR_HANDLE)
%A = @lib(kernel32,SetConsoleMode,INT:,%%hConsoleIn,@Sum(%%ENABLE_LINE_INPUT,%%ENABLE_ECHO_INPUT))
%A = @lib(kernel32,SetConsoleTextAttribute,INT:,%%hConsoleIn,@Sum(%%FOREGROUND_RED,%%FOREGROUND_GREEN,%%FOREGROUND_BLUE,%%FOREGROUND_INTENSITY,%%BACKGROUND_BLUE))
%B = Welcome to the VDS console Demo@LF()
%D = @binary(dword,0)
%A = @lib(kernel32,WriteConsoleA,INT:,%%hConsoleOut,@addr("%B"),@sum(@len(%B),1),@addr("%D"),NIL:)
%A = @lib(kernel32,SetConsoleTextAttribute,INT:,%%hConsoleIn,@Sum(%%FOREGROUND_RED,%%FOREGROUND_GREEN,%%FOREGROUND_BLUE))
%B = Please enter your name-->
%A = @lib(kernel32,WriteConsoleA,INT:,%%hConsoleOut,@addr("%B"),@sum(@len(%B),1),@addr("%D"),NIL:)
%C = @fill(256,@chr(0))
%D = @binary(dword,0)
%A = @lib(kernel32,ReadConsoleA,INT:,%%hConsoleIn,@addr("%C"),256,@addr("%D"),NIL:)
Info Welcome @trim(@substr(%C,1,@len(%C)))@CR()
%A = @lib(kernel32,FreeConsole,INT:)
Freelib kernel32


Anyway have fun...Console users Wink

_________________
Home of

Give VDS a new purpose!


Last edited by vdsalchemist on Tue Jul 15, 2003 2:14 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Mon Jul 14, 2003 7:07 pm    Post subject: Reply with quote

Sorry about being a little stern in my above posts... Sad I guess I
misunderstood. It was my fault. Smile

I'm really impressed by your example and I am going to really look into
this, I was not aware that this could be done by using APIs!! Very Happy

Thanks a lot Mindpower!!!! Very Happy Very Happy

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Mon Jul 14, 2003 7:16 pm    Post subject: Reply with quote

FreezingFire wrote:
Sorry about being a little stern in my above posts... Sad I guess I
misunderstood. It was my fault. Smile


I'm really impressed by your example and I am going to really look into
this, I was not aware that this could be done by using APIs!! Very Happy

Thanks a lot Mindpower!!!! Very Happy Very Happy


Well now you owe me FF Wink for making me take a perfectly good 32bit app and downgrading it to a simple console app... The shame Laughing
Anyway just about anything that Windows can do can be done with VDS 5 and/or Gadget. The win32 API is very extensive and covers everything that the OS can do and now that VDS has access to the Win32 API you can build apps just like other languages. There is only a few missing parts in VDS 5 and the next versions of Gadget will take care of those.

Your wish is my command but next time rub the lamp a little gentler ok...I was trying to get this script finished for ya when you first posted the wish... If you need a script like this in the future you can get my undivided attention by going to the VDS online help site and get premium support if you need a faster turn around Wink hehehehehehe

_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Mon Jul 14, 2003 10:13 pm    Post subject: Reply with quote

I get an error at line 32.

"Error: Error calling library function
at line: 32
in file: untitled.dsc"

-Garrett

_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Mon Jul 14, 2003 10:54 pm    Post subject: Reply with quote

What version of Windows are you using?
_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Tue Jul 15, 2003 4:21 am    Post subject: Reply with quote

Garrett wrote:
I get an error at line 32.

"Error: Error calling library function
at line: 32
in file: untitled.dsc"

-Garrett


Umm... Did you save the script first? Why did the error say untitled.dsc? I think the line is the @fill(256,@chr(0)) or it may be the one just below that one. Any of the functions that deal with strings will be in 2 different flavors either the ANSI or the Wide character versions but if you are using a non-Unicode version of Windows you may have to drop the letter A off the name of the function for it to work but I do believe that all these functions should work for Win9x. I guess I should go look on MSDN. Anyway try them without the letter A at the end of the function name and let me know.

_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Wish List All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group