hi,
I am trying to print a text on console from where I am executing the 'scp' script using command line. Here is the sample, that I got it from the forum:
----------------------
GetWindowProcess>C:\WINDOWS\system32\cmd.exe,pid,pname
LibFunc>kernel32,AttachConsole,aok,pid
LibFunc>kernel32,GetStdHandle,console,hwnd,-11
Let>Message=Hello World%CRLF%
Length>Message,LenM
LibFunc>kernel32,WriteConsoleA,wcres,consolehwnd,Message,LenM,0,0
------------------------------
saved as sample.scp
When I run in command prompt
>msched.exe sample.scp
"Hello World" gets printed after the execution terminates. It has forked a separate process background.
I want to make it like, start the program wait for "hello World" to print and at the end terminate the program. Can someone help me wat changes to make in the above code.
Thanks
yuvaraj.
This code works
text on stdout
Moderators: JRL, Dorian (MJT support)
Compiled scripts can write to STDOUT
Hi yuvaraj,
If you have the Pro version 11 you can compile the script as a console application and write to STDOUT using the functions SOWrite and SOWriteLn. Only compiled scripts can do this. Possibly you will not need the LibFunc.
See:
http://www.mjtnet.com/usergroup/viewtop ... teconsolea
Gale
If you have the Pro version 11 you can compile the script as a console application and write to STDOUT using the functions SOWrite and SOWriteLn. Only compiled scripts can do this. Possibly you will not need the LibFunc.
See:
http://www.mjtnet.com/usergroup/viewtop ... teconsolea
Gale
I may be missing something but a simple Send> function works for me. If I run the following in a script from a DOS command line, the text will be printed in the window. Granted if you press enter the text will be executed but it nonetheless displays.
Code: Select all
Send>Hello World