Danger111 Posted April 12, 2010 Share Posted April 12, 2010 ok i have problem (Save/Open) problem to make little notepadok first open koda FromDesigner now i must insert some details to make notepad it will look like thiswith codes it will look like this#include <GUIConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Test Notepad", 633, 447, 193, 115) GUICtrlCreateEdit("", 0, 0, 617, 417) $MenuItem3 = GUICtrlCreateMenu("File") $MenuItem1 = GUICtrlCreateMenuItem("Open", $MenuItem3) $MenuItem4 = GUICtrlCreateMenuItem("Save", $MenuItem3) $MenuItem5 = GUICtrlCreateMenuItem("Exit", $MenuItem3) $MenuItem2 = GUICtrlCreateMenu("Notepad") $MenuItem6 = GUICtrlCreateMenuItem("About", $MenuItem2) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEndnow i must make changes (cases)#include <GUIConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Test Notepad", 633, 447, 193, 115) GUICtrlCreateEdit("", 0, 0, 617, 417) $MenuItem3 = GUICtrlCreateMenu("File") $MenuItem1 = GUICtrlCreateMenuItem("Open", $MenuItem3) $MenuItem4 = GUICtrlCreateMenuItem("Save", $MenuItem3) $MenuItem5 = GUICtrlCreateMenuItem("Exit", $MenuItem3) $MenuItem2 = GUICtrlCreateMenu("Notepad") $MenuItem6 = GUICtrlCreateMenuItem("About", $MenuItem2) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit case $MenuItem6 MsgBox(0, "About", "It is just a Test Notepad") case $MenuItem5 WinClose("Test Notepad") case $MenuItem4 $file = FilesaveDialog("Choose file...",@TempDir,"All (*.*)") If @error <> 1 Then GuiCtrlCreateMenuItem ($file,$recentfilesmenu) case $MenuItem1 $file = FileOpenDialog("Choose file...",@TempDir,"All (*.*)") If @error <> 1 Then GuiCtrlCreateMenuItem ($file,$recentfilesmenu) EndSwitch WEndbut with this cases i can not save or open any txt file when you click on it it will be open only windows but it don't saves please helpcase $MenuItem4 $file = FilesaveDialog("Choose file...",@TempDir,"All (*.*)") If @error <> 1 Then GuiCtrlCreateMenuItem ($file,$recentfilesmenu) case $MenuItem1 $file = FileOpenDialog("Choose file...",@TempDir,"All (*.*)") If @error <> 1 Then GuiCtrlCreateMenuItem ($file,$recentfilesmenu) Link to comment Share on other sites More sharing options...
Yoriz Posted April 12, 2010 Share Posted April 12, 2010 FilesaveDialog and FileOpenDialog only returns the path chosen, you then need to do the code to do the opening/saving with that path. GDIPlusDispose - A modified version of GDIPlus that auto disposes of its own objects before shutdown of the Dll using the same function Syntax as the original.EzMySql UDF - Use MySql Databases with autoit with syntax similar to SQLite UDF. Link to comment Share on other sites More sharing options...
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