Jump to content
Sign in to follow this  
Mose

RAMDiskMiniGUI

Recommended Posts

Mose

Required FOR X86

- RRamdisk.sys installed.

- RRamdisk.exe

- Ramdiskmanager.exe

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Res_requestedExecutionLevel=asInvoker
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
;
#include <GUIConstants.au3>
#include <Array.au3>
;
Opt("GUIOnEventMode", 1)
;
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("RAMDISK", 151, 46, -1, -1)
GUISetBkColor(0xFFFFFF)
GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close")
GUISetOnEvent($GUI_EVENT_MINIMIZE, "Form1Minimize")
GUISetOnEvent($GUI_EVENT_MAXIMIZE, "Form1Maximize")
GUISetOnEvent($GUI_EVENT_RESTORE, "Form1Restore")
$Label1 = GUICtrlCreateLabel("space", 0, 0, 75, 20)
GUICtrlSetFont($Label1, 10, 400, 0, "MS Sans Serif")
GUICtrlSetOnEvent($Label1, "Label1Click")
$Input1 = GUICtrlCreateInput(128, 76, 0, 45, 20)
GUICtrlSetFont($Input1, 10, 800, 0, "MS Sans Serif")
GUICtrlSetOnEvent($Input1, "Input1Change")
$Label2 = GUICtrlCreateLabel("MB", 122, 2, 25, 20)
GUICtrlSetFont($Label2, 10, 800, 0, "MS Sans Serif")
GUICtrlSetOnEvent($Label2, "Label2Click")
$Button1 = GUICtrlCreateButton("create", 0, 21, 77, 23, 0)
GUICtrlSetFont($Button1, 10, 800, 0, "MS Sans Serif")
GUICtrlSetOnEvent($Button1, "Button1Click")
$Button2 = GUICtrlCreateButton("delete", 76, 21, 72, 23, 0)
GUICtrlSetFont($Button2, 10, 800, 0, "MS Sans Serif")
GUICtrlSetOnEvent($Button2, "Button2Click")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
;
While 1
Sleep(100)
WEnd
;
Func Button1Click()
$dime = GUICtrlRead($input1)
ShellExecute(@ScriptDir & "" & "ramdisk.exe","off","","open",@SW_HIDE )
sleep(5000)
ShellExecuteWait(@ScriptDir & "" & "ramdisk.exe","on","","open",@SW_HIDE )
sleep(5000)
    ShellExecuteWait(@ScriptDir & "" & "ramdiskmanager.exe","config size " & $dime,"","open",@SW_HIDE )
sleep(3000)    ;
$var = DriveGetDrive( "all" )
    If NOT @error Then
       MsgBox(4096,"RAMDISK R: ", " created: " & INT(DriveSpaceTotal("r:")) & " MB",5)
    Else
   MsgBox(4096,"ERRORE ", "RAMdisk NOT created",10)
    EndIf
EndFunc
;
Func Button2Click()
ShellExecute(@ScriptDir & "" & "ramdisk.exe","off","","open",@SW_HIDE )
sleep(2500)
MsgBox(0,"RAMDISK R:", "DELETED",5)
EndFunc
;
Func Form1Close()
  guidelete()
  winclose($form1)
  Exit
EndFunc
Func Form1Maximize()
EndFunc
Func Form1Minimize()
EndFunc
Func Form1Restore()
EndFunc
Func Input1Change()
EndFunc
Func Label1Click()
EndFunc
Func Label2Click()
EndFunc
Edited by Mose

Share this post


Link to post
Share on other sites
Mose

Yes

http://archive.msdn.microsoft.com/ramdisktools/Release/ProjectReleases.aspx?ReleaseId=4562

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×