The idea is to pass in the environment parameter to \scalebox.
Code: Select all
\documentclass{minimal}
\usepackage{graphicx}
\newsavebox{\tempbox}
\newenvironment{myscalebox}[1]
{\begin{lrbox}{\tempbox}}
{\end{lrbox}\scalebox{#1}{\usebox{\tempbox}}}
\begin{document}
\begin{myscalebox}{10}
hello world
\end{myscalebox}
\end{document}
Thank you in advance.