# Vbe/Vbs Script



## TeenScripts (Oct 27, 2012)

Okay, so I am a newby programmer, and I really want to create this Ram Cleanup Code in Notepad, I don't really want to learn VBS right now and here's what I got so far:


```
echo
x=msgbox("Would You Like To Fix your Ram?",4,"Ram Cleanup")
If Yes Then
Call mystring=800000000
end
```
Here are my 2 main conserns:
1.The mystring=800000000 is initially for a VB Script Encoded File. Can I combine
Vbs and Vbe? 

2. As I said I am not sure about any of this code except the mystring part
that should cleanup my Ram. Other than that: Zero. 
So can anyone post a simple fix? 

Thank You!
(Also I heard about a code called: min= 0, 0 <- will that change my screen height and width or is the code wrong?)


----------



## TeenScripts (Oct 27, 2012)

Oh and can I add this to the script too?
So that After I click yes, The file will continuously be clicked?
Cause apparently in order to maker the script work, I need to click the script and press enter continuously, can I add this after the If Yes.... so that it will press enter automatically? Or is that too complicating? 

```
Set wshShell = wscript.CreateObject(“WScript.Shell”)
do
wscript.sleep 100
wshshell.sendkeys “~(enter)”
loop
```
If it's too complicating I can do without it.


----------



## AceInfinity (Jan 21, 2012)

Why would you continually click the file when you can just run the file multiple times though? You should be able to do this all in vbs as well. No need to make things as complicated as you make them out to be unknowingly


----------



## TeenScripts (Oct 27, 2012)

How can you run it multiple times?
And can you propose a fix for my code in the first post?


----------



## TeenScripts (Oct 27, 2012)

Anyone :/?


----------



## AlbertMC2 (Jul 15, 2010)

Hi

Your Loop...Do already runs it over and over and over again.

Try This. Save as something.vbs file

```
Dim objShell
Set objShell = WScript.CreateObject("WScript.Shell")
do
result=Msgbox("Would You Like To Fix your Ram?",vbYesNo,"Ram Cleanup")
if result=vbYes then
	objShell.run("mystring=800000000")
else
	WScript.Quit
end if
WScript.sleep 1000
loop
```
I am not sure what you are trying to do or where you want the msgbox but from the example you should be able to figure something out. If not let me know.

As for the screen size. The run command can only take a few values like maximize, minimized screen. Here is a page that gives more inf: .Run | VBScript | SS64.com


----------



## TeenScripts (Oct 27, 2012)

AlbertMC2 said:


> Hi
> 
> Your Loop...Do already runs it over and over and over again.
> 
> ...


Thank's for your help Albert! 
Also, I heard that mystring no longer works, is that true? I was suggested an alternative:

```
FreeMem=Space(102400)
```
Which one works better? And If the FreeMem is a better option do I just replace all the mystring's in the code you just suggested with the FreeMem code?


----------



## AlbertMC2 (Jul 15, 2010)

Hi

Unfortunately I do not know "freemem" or "mystring" so cannot comment on either.


----------

