# how to get batch to type random numbers into notepad?



## gamer6336 (Jan 4, 2011)

ok i'm just trying to create a simple batch file that makes random numbers within notepad, but it puts all the numbers in CMD window. the code i'm using is really simple: 
@echo off
start Notepad
:random
%random% /t
SLEEP 3
goto random

i can use sleep cos i have the pack with the tool, and it opens notepad, but all the numbers get entered into cmd. i know SOMETHING'S missing, but i don't know what. please help.

PS i am a serious noob at code, i may need everything explained thouroughly.


----------



## sixpack (Jul 11, 2005)

Maybe this will help
http://computersight.com/computers/tutorial-how-to-create-a-random-number/


----------



## gamer6336 (Jan 4, 2011)

It does, kind of, but i really want to know how to make the batch type stuff into something other than cmd, like notepad, so if i do the script, notepad will open and random numbers will start appearing on it. maybe if i knew how to do the osk keys in batch that would help????


----------



## Squashman (Apr 4, 2003)

You would have to use something like AutoIt or AutoHotKey to do that.


----------



## gamer6336 (Jan 4, 2011)

Wow. Thanks, they should work


----------

