Sign in to follow this  
Followers 0
JustinReno

A bunch of Simple Applications

12 posts in this topic

#1 ·  Posted (edited)

I spent all night working on new "Simple" applications like Simple Web Browser.

I'm not intending these to be completely useful, but somemight like them:)

What I made:

1. Simple Music Player(230KB)

2. Simple Notepad (Replaced SimplePad(257KB))

3. Simple Task Manager(229KB)

4. And an updated version of Simple Web Browser.

Here is each individual exe downloads:

Ripway:

Simple Music Player: http://h1.ripway.com/mrreno/Simple%20EXE/S...MusicPlayer.exe

Simple Notepad: http://h1.ripway.com/mrreno/Simple%20EXE/SimpleNotepad.exe

Simple Task Manager: http://h1.ripway.com/mrreno/Simple%20EXE/S...TaskManager.exe

Simple Web Browser: http://h1.ripway.com/mrreno/Simple%20EXE/S...eWebBrowser.exe

My Application suite launcher:

This contains all of the apps above in one standalone executable:

Ripway:

Simple Launcher: http://h1.ripway.com/mrreno/Simple%20EXE/SimpleLauncher.exe

Simple Launcher is only 1.21 MB!

Source:

Simple Music Player:

CODE

#include <GUIConstants.au3>

#include <Sound.au3>

$Form1 = GUICreate("Simple Music Player 1.0", 275, 147, 193, 115)

$Button1 = GUICtrlCreateButton("Load Sound", 0, 0, 83, 25, 0)

$Button2 = GUICtrlCreateButton("Play Sound", 0, 24, 83, 25, 0)

$Button3 = GUICtrlCreateButton("Pause Sound", 0, 48, 83, 25, 0)

$Button4 = GUICtrlCreateButton("Stop Sound", 0, 96, 83, 25, 0)

$Button5 = GUICtrlCreateButton("Resume Sound", 0, 72, 83, 25, 0)

$Button6 = GUICtrlCreateButton("About", 0, 120, 83, 25, 0)

$Edit = GUICtrlCreateEdit("", 88, 0, 185, 145)

GUICtrlSetData($Edit, "Welcome to Simple Music Player!" & @CRLF & "Click on the buttons to begin!")

GUICtrlSetState($Edit, $GUI_DISABLE)

GUISetState(@SW_SHOW)

While 1

$nMsg = GUIGetMsg()

Switch $nMsg

Case $GUI_EVENT_CLOSE

Exit

Case $Button1

$MusicOpen = FileOpenDialog("Select Music File:", "", "MP3(*.mp3)|Wav(*.wav)")

$Sound = _SoundOpen($MusicOpen)

GUICtrlSetData($Edit, "Now Playing: " & $MusicOpen & "")

_SoundPlay($Sound)

Case $Button2

GUICtrlSetData($Edit, "Now Playing: " & $MusicOpen & "")

_SoundPlay($Sound)

Case $Button3

GUICtrlSetData($Edit, "Paused.")

_SoundPause($Sound)

Case $Button4

GUICtrlSetData($Edit, "Stopped.")

_SoundStop($Sound)

Case $Button5

GUICtrlSetData($Edit, "Resumed. Now Playing: " & $MusicOpen & "")

_SoundResume($Sound)

Case $Button6

MsgBox(0, "Simple Music Player 1.0", "Simple Music Player Copyright Justin Reno 2007.")

EndSwitch

WEnd

Simple Notepad:

CODE

#include <GUIConstants.au3>

#include <String.au3>

#include <Misc.au3>

#include <File.au3>

#include <array.au3>

#include <GUITab.au3>

Dim $voice = ObjCreate("Sapi.SpVoice")

$Form1 = GUICreate("Simple Notepad 1.0", 627, 447, 193, 115)

$Edit = GUICtrlCreateEdit("", 0, 0, 625, 425)

;File Menu

$File_Menu = GUICtrlCreateMenu("File")

$OpenItem = GUICtrlCreateMenuItem("Open", $File_Menu)

$NewItem = GUICtrlCreateMenuItem("New", $File_Menu)

$SaveItem = GUICtrlCreateMenuItem("Save", $File_Menu)

$PrintItem = GUICtrlCreateMenuItem("Print", $File_Menu)

$MenuSep1 = GUICtrlCreateMenuItem("", $File_Menu)

$RunScriptItem = GUICtrlCreateMenuItem("Run AU3 Script", $File_Menu)

$MenuSep1 = GUICtrlCreateMenuItem("", $File_Menu)

$ExitItem = GUICtrlCreateMenuItem("Exit", $File_Menu)

;Edit Menu

$Edit_Menu = GUICtrlCreateMenu("Edit")

$ICTItem = GUICtrlCreateMenuItem("Insert Current Time", $Edit_Menu)

$MenuSep1 = GUICtrlCreateMenuItem("", $Edit_Menu)

$RTItem = GUICtrlCreateMenuItem("Reverse Text", $Edit_Menu)

$MenuSep1 = GUICtrlCreateMenuItem("", $Edit_Menu)

$WordCountItem = GUICtrlCreateMenuItem("Word Count", $Edit_Menu)

$MenuSep1 = GUICtrlCreateMenuItem("", $Edit_Menu)

$CopyItem = GUICtrlCreateMenuItem("Copy", $Edit_Menu)

$PasteItem = GUICtrlCreateMenuItem("Paste", $Edit_Menu)

$MenuSep1 = GUICtrlCreateMenuItem("", $Edit_Menu)

$UndoItem = GUICtrlCreateMenuItem("Undo", $Edit_Menu)

$RedoItem = GUICtrlCreateMenuItem("Redo", $Edit_Menu)

$MenuSep1 = GUICtrlCreateMenuItem("", $Edit_Menu)

$FontItem = GUICtrlCreateMenuItem("Font", $Edit_Menu)

;Speak Menu

$Speak_Menu = GUICtrlCreateMenu("Speak")

$SpeakItem = GUICtrlCreateMenuItem("Speak Text", $Speak_Menu)

;About Menu

$MenuItem13 = GUICtrlCreateMenu("About")

$AboutItem = GUICtrlCreateMenuItem("About", $MenuItem13)

GUICtrlSetFont($Edit, "16", "", "", "Times New Roman")

GUISetState()

While 1

$Time = "" & @HOUR & ":" & @MIN & ":" & @SEC & ""

$nMsg = GUIGetMsg()

Switch $nMsg

Case $GUI_EVENT_CLOSE

Exit

Case $OpenItem

$FileOpen = FileOpenDialog("Open SNF File", "", "Simple Notepad Files(*.SNF)")

WinSetTitle("Simple Notepad", "", "Simple Notepad - " & $FileOpen & "")

GUICtrlSetData($Edit, "Please wait while the file is unencrypted...")

$DeFile = FileRead($FileOpen)

$Docde = "PUT YOUR OWN HERE!"

$Decrypt = _StringEncrypt(0, $DeFile, $Docde, 3)

GUICtrlSetData($Edit, $Decrypt)

Case $NewItem

WinSetTitle("Simple Notepad", "", "Simple Notepad - ")

GUICtrlSetData($Edit, "")

Case $SaveItem

$Readedit1 = GUICtrlRead($Edit)

$FileSaveDialog = FileSaveDialog("Save SNF File", "", "Simple Notepad Files(*.SNF)")

GUICtrlSetData($Edit, "Please wait while the file is encrypted and saved...")

FileDelete($FileSaveDialog)

$docen = "PUT THE SAME ONE HERE!"

$Encrypt = _StringEncrypt(1, $Readedit1, $docen, 3)

$FileSaveDialog &= ".SNF"

$FileSaveDialog = StringReplace($FileSaveDialog, ".SNF.SPF", ".SNF")

FileWrite($FileSaveDialog, $Encrypt)

WinSetTitle("Simple Notepad", "", "Simple Notepad - " & $FileSaveDialog & "")

GUICtrlSetData($Edit, $Readedit1)

Case $PrintItem

$Readeditprint = GUICtrlRead($Edit)

$Filewriteprint = FileWrite(@TempDir & "\printtest.txt", $Readeditprint)

$File = @TempDir & "\printtest.txt"

_FilePrint($File)

Sleep(500)

FileDelete(@TempDir & "\printtest.txt")

Case $FontItem

$cfont = _ChooseFont()

$Font = GUICtrlSetFont($Edit, $cfont[3], $cfont[4], $cfont[1], $cfont[2])

$Color = GUICtrlSetColor($Edit, $cfont[7])

Case $RunScriptItem

$Readau3 = GUICtrlRead($Edit)

FileWrite(@ScriptDir & "\script.au3", $Readau3)

Run('"' & @AutoItExe & '" /AutoIt3ExecuteScript "' & @ScriptDir & '\script.au3"')

Sleep(500)

FileDelete(@ScriptDir & "\script.au3")

Case $SpeakItem

$texttoread = GUICtrlRead($Edit)

Speak($texttoread, 0, 100)

Case $ICTItem

ControlSend($Form1, "", $Edit, $Time)

Case $RTItem

$ReverseRead = GUICtrlRead($Edit)

$Reverse = _StringReverse($ReverseRead)

GUICtrlSetData($Edit, $Reverse)

Case $WordCountItem

$dok1 = GUICtrlRead($Edit)

$do1 = StringSplit($dok1, " ")

Local $iTempNums[3] = [$do1[0] - 1, StringLen($dok1), StringLen(_ArrayToString($do1, "")) ]

Local $iLongestNum

For $i = 0 To 2

If StringLen($iTempNums[$i]) > $iLongestNum Then $iLongestNum = StringLen($iTempNums[$i])

Next

For $i = 0 To 2

$iTempNums[$i] = _StringRepeat(" ", ($iLongestNum - StringLen($iTempNums[$i])) * 2) & $iTempNums[$i]

Next

MsgBox(0, "Word Count", $iTempNums[0] & " words." & @CR & $iTempNums[1] & " characters." & @CR & $iTempNums[2] & " characters (without spaces).")

Case $CopyItem

Send("^C")

Case $PasteItem

Send("^V")

Case $UndoItem

Send("^z")

Case $RedoItem

Send("^y")

Case $ExitItem

Exit

Case $AboutItem

MsgBox(0, "Simple Notepad 1.0", "Simple Notepad Copyright Justin Reno 2007.")

EndSwitch

WEnd

Func Speak($text, $Rate, $Volme)

$voice.Rate = $Rate

$voice.Volume = $Volme

$voice.Speak($text)

EndFunc ;==>Speak

Simple Task Manager:

CODE

#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=

$Form1 = GUICreate("Simple Task Manager 1.0", 252, 190, 193, 115)

$List1 = GUICtrlCreateList("", 0, 0, 137, 188)

$Button1 = GUICtrlCreateButton("Refresh List", 136, 0, 115, 25, 0)

$Button2 = GUICtrlCreateButton("Kill Process", 136, 32, 115, 25, 0)

$Button3 = GUICtrlCreateButton("Shutdown", 136, 96, 115, 25, 0)

$Button4 = GUICtrlCreateButton("New Task", 136, 64, 115, 25, 0)

$Button5 = GUICtrlCreateButton("About", 136, 128, 115, 57, 0)

GUISetState(@SW_SHOW)

#EndRegion ### END Koda GUI section ###

While 1

$nMsg = GUIGetMsg()

Switch $nMsg

Case $GUI_EVENT_CLOSE

Exit

Case $Button1

$list = ProcessList()

For $i = 1 To $list[0][0]

GUICtrlSetData($List1, $list[$i][0])

Next

Case $Button2

$Taskkillmessage = MsgBox(20, GUICtrlRead($List1), "Are you sure you want to close this process?")

Select

Case $Taskkillmessage = 6

ProcessClose(GUICtrlRead($List1))

EndSelect

Case $Button3

Shutdown(1)

Case $Button4

$Run = InputBox("Simple Task Manager 1.0", "Type in the path or process name to start:")

ShellExecute($Run)

Case $Button5

MsgBox(0, "Simple Task Manager 1.0", "Simple Task Manager is Copyright Justin Reno 2007.")

EndSwitch

WEnd

Simple Launcher:

CODE

#include <GUIConstants.au3>

FileInstall("Simple Music Player.exe", @TempDir & "\Simple Music Player.exe")

FileInstall("Simple Notepad.exe", @TempDir & "\Simple Notepad.exe")

FileInstall("Simple Task Manager.exe", @TempDir & "\Simple Task Manager.exe")

FileInstall("Simple Web Browser.exe", @TempDir & "\Simple Web Browser.exe")

$Form1 = GUICreate("Simple Launcher", 210, 178, 193, 115)

$Button1 = GUICtrlCreateButton("Simple Web Browser 2.0", 40, 0, 131, 33, 0)

$Icon1 = GUICtrlCreateIcon("C:\Program Files\Game_Maker6\Sprites\Earth.ico", 0, 0, 0, 32, 32, BitOR($SS_NOTIFY, $WS_GROUP))

$Icon2 = GUICtrlCreateIcon("C:\Program Files\Game_Maker6\Sprites\various\Fire.ico", 0, 0, 32, 32, 32, BitOR($SS_NOTIFY, $WS_GROUP))

$Button2 = GUICtrlCreateButton("Simple Task Manager 1.0", 40, 40, 131, 25, 0)

$Button3 = GUICtrlCreateButton("Simple Notepad 1.0", 40, 72, 131, 25, 0)

$Icon3 = GUICtrlCreateIcon("C:\Program Files\Game_Maker6\Sprites\KEYBOARD.ICO", 0, 0, 64, 32, 32, BitOR($SS_NOTIFY, $WS_GROUP))

$Icon4 = GUICtrlCreateIcon("C:\Program Files\Game_Maker6\Sprites\Lightning.ico", 0, 0, 104, 32, 32, BitOR($SS_NOTIFY, $WS_GROUP))

$Button4 = GUICtrlCreateButton("Simple Music Player 1.0", 40, 104, 131, 33, 0)

$Icon5 = GUICtrlCreateIcon("C:\Program Files\Game_Maker6\Sprites\Earth.ico", 0, 176, 0, 32, 32, BitOR($SS_NOTIFY, $WS_GROUP))

$Icon6 = GUICtrlCreateIcon("C:\Program Files\Game_Maker6\Sprites\various\Fire.ico", 0, 176, 32, 32, 32, BitOR($SS_NOTIFY, $WS_GROUP))

$Icon7 = GUICtrlCreateIcon("C:\Program Files\Game_Maker6\Sprites\KEYBOARD.ICO", 0, 176, 64, 32, 32, BitOR($SS_NOTIFY, $WS_GROUP))

$Icon8 = GUICtrlCreateIcon("C:\Program Files\Game_Maker6\Sprites\Lightning.ico", 0, 176, 104, 32, 32, BitOR($SS_NOTIFY, $WS_GROUP))

$Button5 = GUICtrlCreateButton("About", 0, 152, 75, 25, 0)

GUISetState(@SW_SHOW)

While 1

$nMsg = GUIGetMsg()

Switch $nMsg

Case $GUI_EVENT_CLOSE

$DEL1 = @TempDir & "\Simple Web Browser.exe"

$DEL2 = @TempDir & "\Simple Task Manager.exe"

$DEL3 = @TempDir & "\Simple Notepad.exe"

$DEL4 = @TempDir & "\Simple Music Player.exe"

$DEL5 = @TempDir & "\SWB.ini"

FileDelete($DEL1)

FileDelete($DEL2)

FileDelete($DEL3)

FileDelete($DEL4)

FileDelete($DEL5)

Exit

Case $Button1

$SWB = @TempDir & "\Simple Web Browser.exe"

Run($SWB)

Case $Button2

$STM = @TempDir & "\Simple Task Manager.exe"

Run($STM)

Case $Button3

$SN = @TempDir & "\Simple Notepad.exe"

Run($SN)

Case $Button4

$SMP = @TempDir & "\Simple Music Player.exe"

Run($SMP)

Case $Button5

MsgBox(0, "Simple Launcher", "Simple Launcher Copyright Justin Reno 2007.")

EndSwitch

WEnd

Simple Web Browser's source is posted in another topic, I'll link to it.

Bugs: None

Todo: Create more usefull simple apps.

Any kind of comments are welcome except spam! If you have any ideas for more apps, please post it!

Simple Launcher, Simple Web Browser, Simple Notepad, Simple Music Player, Simple Task Manager Copyright Justin Reno 2007.

Edited by JustinReno

Share this post


Link to post
Share on other sites



These simple application's source is great to study with for the new autoit users..but since you are not releasing it for now..i guess these app don't really help anything.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I'm just cleaning them up now, They will be up soon!!

Edited by JustinReno

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Simple Launcher, Simple Web Browser, Simple Notepad, Simple Music Player, Simple Task Manager Copyright Justin Reno 2007.

So this is an open-source copyrighted package? :)

Anyway, nice job! Could we see a screenshot of the launcher?

Edited by sandman

[center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center]

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Hmmm, never thought of that! lol :) :)

I didnt feel like cutting the whole app out of the picture:

Posted Image

Edited by JustinReno

Share this post


Link to post
Share on other sites

I like Simple Notepad. The timestamp is a great idea. Reverse Text is also pretty cool! :)

Here's a thing I made a while back, that returns Word Count and a lot of other stuff. I'm planning to implement it into AIPad, but feel free to add it into yours too. Just take away the file thing at the beginning and make it read the control.

$file = FileOpenDialog("Choose a file to get stats from", @DesktopDir, "Text Documents (*.*)")
$str = FileRead($file)

$query = MsgBox(4, "Query", "In the document you are submitting, did you break your paragraphs by an empty line, or by indenting? If it is the latter, please press No. Otherwise, press Yes. (I was too lazy to make my own GUI.)")
If $query = 6 Then
    $paratype = 0
ElseIf $query = 7 Then
    $paratype = 1
EndIf

; Count Words
$wordsplit = StringSplit($str, " ")
$words = $wordsplit[0]
$finwords = $words

; Count Chars (including spaces)
$chars = StringLen($str)
$finchars = $chars

; Count Chars (not including spaces)
$charstrip = StringStripWS($str, 8)
$char2 = StringLen($str)
$finchars2 = $char2

; Count Paragraphs
If $paratype = 0 Then       ; user selected "I break my paragraphs by two lines"
    $parasplit = StringSplit($str, @CRLF, 1)
    $paras = UBound($parasplit) - 1
ElseIf $paratype = 1 Then   ; user selected "I break my paragraphs with one line, and an indent."
    $parasplit = StringSplit($str, @TAB, 1)
    $paras = UBound($parasplit) - 1
EndIf
$finparas = $paras

; Count Sentences
$sentsplit = StringSplit($str, ". ", 1)
$sents = UBound($sentsplit) - 1
$finsents = $sents

; Count avg words per paragraph
If $paratype = 0 Then       ; user selected "I break my paragraphs by two lines"
    $parassplit = StringSplit($str, @CRLF, 1)
ElseIf $paratype = 1 Then   ; user selected "I break my paragraphs with one line, and an indent."
    $parassplit = StringSplit($str, @TAB, 1)
EndIf
Dim $words[99]
For $i = 1 To UBound($parasplit) - 1
    $wordsplit = StringSplit($parasplit[$i], " ")
    $words[$i - 1] = $wordsplit[0]
Next
$wppavg = Avg($words)
$finwpp = $wppavg

; Count avg words per sentence
$sentsplit = StringSplit($str, ". ", 1)
For $i = 1 To $sentsplit[0]
    $wordsplit = StringSplit($sentsplit[$i], " ")
    $words[$i - 1] = $wordsplit[0]
Next
$wpsavg = Avg($words)
$finwps = $wpsavg

; Count avg characters per word
$wordsplit = StringSplit($str, " ")
For $i = 1 To UBound($wordsplit)
    $charlen = StringLen($wordsplit[$i])
    $chars[$i - 1] = $charlen[0]
Next
$cpwavg = Avg($chars)
$fincpw = $cpwavg

; Get Automated Readability Index
$1 = $finchars / $finwords * 4.71
$2 = $finwords / $finsents * 0.5
$3 = $1 + $2 - 21.43
$finari = $3

MsgBox(0, "Reader Stats :: Results", "Here are the results for the file you gave us:" & @CRLF & @CRLF & "Word count: " & $finwords & @CRLF & "Character count (including spaces): " & $finchars & @CRLF & "Character count (not including spaces): " & $finchars2 & @CRLF & "Paragraph count: " & $finparas & @CRLF & "Sentence count: " & $finsents & @CRLF & "Average words per paragraph: " & $finwpp & @CRLF & "Average words per sentence: " & $finwps & @CRLF & "Average characters per word: " & $fincpw & @CRLF & "Automated Readability Index: " & $finari & @CRLF & @CRLF & "Thank you for using Reader Stats!")

Func Avg($aNums)
    Local $total
    For $i = 0 To UBound($aNums)
        $total += $aNums[$i]
    Next
    $ret = $total / UBound($aNums)
    Return $ret
EndFunc

[center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center]

Share this post


Link to post
Share on other sites

OOOOOOOOOOOOOH, I LIKE! hehe lol, thanks!

Share this post


Link to post
Share on other sites

I'm going to reupload my Simple Notepad now.

Share this post


Link to post
Share on other sites

I'm going to reupload my Simple Notepad now.

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

Hmm....

I'm getting this funny feeling that he's going to reupload Simple Notepad right now.

w00t! I just passed 900 posts and I didn't even realize it! Here I come, 1k posts!

Edited by sandman

[center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center]

Share this post


Link to post
Share on other sites

lol cool! :)

Share this post


Link to post
Share on other sites

Hey Sandman, right after the text stats script pops up the message box, it goes to an error:

CODE

>"C:\Program Files\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\Documents and Settings\Jar\Desktop\test.au3" /autoit3dir "C:\Program Files\AutoIt3" /UserParams

+>17:30:08 Starting AutoIt3Wrapper v.1.9.2

>Running AU3Check (1.54.9.0) from:C:\Program Files\AutoIt3

+>17:30:08 AU3Check ended.rc:0

>Running:(3.2.6.0):C:\Program Files\AutoIt3\autoit3.exe "C:\Documents and Settings\Jar\Desktop\test.au3"

C:\Documents and Settings\Jar\Desktop\test.au3 (83) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.:

$total += $aNums[$i]

$total += ^ ERROR

->17:30:22 AutoIT3.exe ended.rc:1

+>17:30:23 AutoIt3Wrapper Finished

>Exit code: 1 Time: 15.551

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  
Followers 0