|
You last visited: Today at 08:19
Advertisement
[au3] Create your notepad [Small TUT]
Discussion on [au3] Create your notepad [Small TUT] within the Coding Tutorials forum part of the General Coding category.
03/06/2015, 18:23
|
#1
|
elite*gold: 0
Join Date: Mar 2015
Posts: 22
Received Thanks: 3
|
[au3] Create your notepad [Small TUT]
' First create your gui '
Example
' Second go scite and paste your gui code '
' And "While 1" section paste or write this codes '
Code:
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$DataFromUser = GUICtrlRead($Edit1)
$SaveLocation = FileSaveDialog("Save File" , @ScriptDir,"Text Files (*.txt)", 16)
FileWrite($SaveLocation,$DataFromUser)
Case $Button3
$ReadLocation = FileOpenDialog("SilverVirus" , @DesktopCommonDir & "\","File (*.txt)")
$File = FileRead($ReadLocation)
GUICtrlSetData($Edit1,$File)
Case $Button2
Run("Notepad")
If WinWaitActive("Notepad") Then
Send("Hi epvp - '<SilverVirus>'")
Send("{Enter}")
EndIf
EndSwitch
WEnd
All codes
Code:
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1_1 = GUICreate("Notepad - <SilverVirus>", 626, 458, 198, 140)
$Button1 = GUICtrlCreateButton("Save", 48, 16, 169, 25)
$Button2 = GUICtrlCreateButton("Windows Notepad", 224, 16, 171, 25)
$Button3 = GUICtrlCreateButton("Open", 400, 16, 169, 25)
$Edit1 = GUICtrlCreateEdit("", 8, 48, 609, 401)
GUICtrlSetData(-1, "")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$DataFromUser = GUICtrlRead($Edit1)
$SaveLocation = FileSaveDialog("Save File" , @ScriptDir,"Text Files (*.txt)", 16)
FileWrite($SaveLocation,$DataFromUser)
Case $Button3
$ReadLocation = FileOpenDialog("SilverVirus" , @DesktopCommonDir & "\","File (*.txt)")
$File = FileRead($ReadLocation)
GUICtrlSetData($Edit1,$File)
Case $Button2
Run("Notepad")
If WinWaitActive("Notepad") Then
Send("Hi epvp - '<SilverVirus>'")
Send("{Enter}")
EndIf
EndSwitch
WEnd
"Windows Notepad" writer codes:
Code:
Run("Notepad")
If WinWaitActive("Notepad") Then
Send("Hi epvp - '<SilverVirus>'")
End, see your application..
|
|
|
03/08/2015, 21:49
|
#2
|
elite*gold: 0
Join Date: Mar 2015
Posts: 22
Received Thanks: 3
|
#Push
|
|
|
03/08/2015, 22:08
|
#3
|
elite*gold: 60
Join Date: Aug 2009
Posts: 2,256
Received Thanks: 815
|
This is no tutorial, you just simply show people how to copy and paste code which is not their code to ask questions which wouldn't been asked if they have read a proper tutorial.
|
|
|
03/10/2015, 18:00
|
#4
|
elite*gold: 0
Join Date: Mar 2015
Posts: 22
Received Thanks: 3
|
Quote:
Originally Posted by alpines
This is no tutorial, you just simply show people how to copy and paste code which is not their code to ask questions which wouldn't been asked if they have read a proper tutorial.
|
[au3] Create your notepad [Small TUT]
|
|
|
03/10/2015, 18:16
|
#5
|
elite*gold: 0
Join Date: Feb 2009
Posts: 1,137
Received Thanks: 573
|
This isn't even a small tutorial, because nothing is explained, you don't learn anything from this. There aren't even comments in this source.
This is more likely a coding snippet.
This code isn't even good, you don't check if the FileDialog selected a valid file, not even checking if the Dialog was closed with a selected File. Also you say Run(Notepad) and then check if notepad is open, what if the pc is to slow? Than nothing will happen, except for Notepad to popup
|
|
|
03/10/2015, 18:32
|
#6
|
elite*gold: 0
Join Date: Mar 2015
Posts: 22
Received Thanks: 3
|
ok.ok..
not small tutorial..
|
|
|
03/11/2015, 17:28
|
#7
|
elite*gold: 0
Join Date: Jan 2012
Posts: 759
Received Thanks: 416
|
How to write your own operating system [Small TUT]
1. Create a new directory and name it "UniOS".
2. Go to kernel.org
3. Click "Latest stable kernel:"
4. Extract what you just downloaded.
5. Here comes the tricky part: Create a new file (directory) in your "UnityOS" directory for each file (directory) that is in the extracted directory. Make sure to give the new files (directories) the exact same name! If you are using Windows, make sure that Explorer shows file extensions (if not, enable it in Folder Options).
6. Repeat step 5 for each sub directory within the extracted directory (and then with their subdirectories, and so on ...)
7. Copy the source code that is in the files in the extracted directory into your newly created files. DO NOT MISS ANY OF THEM!
8. Compile. Somehow. This is not part of the tutorial.
9. You're done! You just created your very own operating system!
End, see your system.
|
|
|
Similar Threads
|
[Small-Release] Mob regen helper (small)
06/15/2012 - Metin2 PServer Guides & Strategies - 8 Replies
Huhu, ich fülle gerade einige maps mit Monster voll und da der Map Pointer da nichts funktioniert von Musicinstrutor..
Hab ich eben schnell ne Funktion geschrieben.
function mob_add_temp_regendata()
--
local filename = 'wuste'
local mob_vnums = number(2340,2346)
--
local rr = number(1,2)
|
Help with notepad++
03/06/2012 - Web Development - 1 Replies
Hey guys if i have my code and i want to edit the text , just the text not the html code for do it more fast how can i " hide " the html text and just see the normal text?
if you follow me well say me it please!!
Thanks!!
|
I need help with NotePad!
04/06/2008 - Off Topic - 1 Replies
http://i31.tinypic.com/2nursd3.png
http://i31.tinypic.com/2zodw8w.png
http://i27.tinypic.com/ra84ys.png
|
All times are GMT +1. The time now is 08:20.
|
|