Golbez Posted October 22, 2006 Posted October 22, 2006 More specifically I want it as a game menu for myself, since i play around....10 different games, it would be very useful to me, and I don't know why it really matters what the use of it is, i'm halfway making this to clean up my desktop, halfway making it to learn more about autoit and coding in general.-Alyssasearch for a program called PStart.. it is what your looking for
smashly Posted October 22, 2006 Posted October 22, 2006 your welcome Lambort , I'm pretty new to AutoIt myself so it's a case of the blind helping the blind you could say. If your wanting to save settings you could look at IniWrite .. look at IniRead for loading your settings. Rough updated example of earlier post. expandcollapse popup; Script generated by AutoBuilder 0.6 Prototype #include <GuiConstants.au3> GuiCreate("MyGUI", 392, 60,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $Group_1 = GuiCtrlCreateGroup("Browse For Program To Run", 10, 0, 310, 50) $ProgramToRun = GuiCtrlCreateInput("", 20, 20, 220, 20) $BrowseButton = GuiCtrlCreateButton("Browse", 250, 20, 60, 20) $RunButton = GuiCtrlCreateButton("Run", 330, 10, 50, 40) _load() GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $BrowseButton _browse() Case $msg = $RunButton _run() _save() EndSelect WEnd Exit Func _browse() $selectProgramToRun = FileOpenDialog("Browse for a exe to run...", "","Executable (*.*)", 1) If Not @error Then GUICtrlSetData($ProgramToRun, $selectProgramToRun) EndIf EndFunc Func _run() $ReadProgramToRun = GUICtrlRead($ProgramToRun) If $ReadProgramToRun <> "" Then Run($ReadProgramToRun) EndIf EndFunc Func _save() $ReadProgramToRun = GUICtrlRead($ProgramToRun) If $ReadProgramToRun <> "" Then IniWrite(@ScriptDir & "\settings.ini", "Settings","Shorcut1",$ReadProgramToRun) EndIf EndFunc Func _load() If FileExists(@ScriptDir & "\settings.ini") Then $ReadIni = IniRead(@ScriptDir & "\settings.ini", "Settings","Shorcut1","") GUICtrlSetData ($ProgramToRun, $ReadIni) EndIf EndFunc Hope it helps. Good luck cheers
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now