hello i am trying to set up style for script box.
so far i got
\begin{script*} >> help \end{script*}
working and displaying 
i want final version to look some what similar to this picture

and have second comment that will use more or less same environment
for example

i'm sure that it can be done with latex, but i don't have enough experience and knowledge.
any help will be appreciated thank you!
[UPDATE]
HERE is the final version that i have decide to stay with, it uses tikz and mdframed

\documentclass{article}
\usepackage[dvipsnames]{xcolor}
\usepackage{listings}
\definecolor{topBlue}{RGB}{42,93,147}
\definecolor{bottomBlue}{RGB}{10,60,113}
\definecolor{sideline}{RGB}{235,235,237}
\definecolor{frameBlue}{RGB}{17,74,135}
\usepackage{tikz}
\usepackage[framemethod=TikZ]{mdframed}
\usetikzlibrary{calc,shapes.geometric}
\newcommand{\triangcirc}{\tikz{
\node[draw=frameBlue,inner ysep=4pt,
color=frameBlue,
top color=topBlue,
bottom color=bottomBlue,
text=white,
align=flush left,
font=\textbf\textsf,
text width=\textwidth] (a) {Command Window};
\node[circle,white,draw,inner sep=3pt] (c) at ([xshift=-3mm]a.east) {};
\node[isosceles triangle,
white,
fill,
rotate=-90,
anchor=apex,
isosceles triangle apex angle=60,
inner sep=1.2pt] (t) at ([yshift=1.5pt]c.south) {};}}
\mdfdefinestyle{commandline}
{leftmargin=0pt, rightmargin=0pt,innerleftmargin=-0.5pt,innerrightmargin=7.5pt,
middlelinecolor=frameBlue,
middlelinewidth=1.2pt,
frametitlerule=false,
backgroundcolor=white,
frametitle={\triangcirc},
frametitleaboveskip=-0.5pt,
frametitlebelowskip=0pt,
singleextra={\draw[sideline,line width=12pt]
($(O)+(7pt,1pt)$) -- ($(O|-P)+(7pt,-\mdfframetitleboxtotalheight)-(0,1pt)$);
\node[inner sep=0pt,color=black]at ($(O)+(7pt,9pt)$) {$\scriptstyle f\!x$}; }
}
\lstnewenvironment{script} {\lstset{language=Matlab,xleftmargin=5mm,basicstyle=\footnotesize,,breaklines=true,aboveskip=-2pt,belowskip=0pt}} {}
\surroundwithmdframed[style=commandline]{script}
\begin{document}
\begin{script}
>> help sin
sin Sine of argument in radians.
sin(X) is the sine of the elements of X.
See also asin, sind.
Overloaded methods:
sdpvar/sin
codistributed/sin
gpuArray/sin
Reference page in Help browser
doc sin
>>
\end{script}
\end{document}
and THANKS FOR BOTH ANSWERS!!!



mdframedpackage. I don't know it very well, but IIRC it provides a lot of nice frames. You could try to combine it with e.g. thelistingspackage. – Uwe Ziegenhagen May 19 '13 at 21:35.pngmight be one of many ways. – texenthusiast May 19 '13 at 22:06tcolorboxpackage too... – cmhughes May 19 '13 at 22:22