slomz
Joined: 03 Sep 2006 Posts: 608 Location: Iowa, U.S.
|
Posted: Sun Sep 10, 2006 6:57 pm Post subject: Class scheduler(Changes in progress) |
|
|
I use this for adding class assignments, here it is finally!
Changes since v1.0:
1. Added a link to my school's website(you can change pretty easily)
2.Removed the SysMenu in the 2nd window so all you do to get out is click cancel because of a small bug.
3.Changed the buttons on the 2nd window and added the
%ClassChoice% variable to come up in text on the window and in the taskbar to make sure you know which class you picked.
4.Fixed a small bug in the settings.ini file.[/list]
Changes since v2.0
1. Added Menu Bar.
2. Added A few URL edit fields in bot windows.
3. Menu Bar includes:Help, About, Exiting script, Editing Script, Reloading script.
| Code: | ;*******************************
;Class Scheduler By: Rob Sloma
;*******************************
#SingleInstance
;########################Miscallaneous###############################
SetBatchLines, -1
Menu, Tray, Icon, Shell32.dll, 147
setworkingdir, %a_scriptdir% ;; for settings.ini
ClassSchedule=ClassScheduler.ahk
;##########################Menus###############################
Menu, AboutMenu, Add, About Us, About
Menu, FileMenu, Add, Edit Script, Edit
Menu, FileMenu, Add, Reload, Reload
Menu, FileMenu, Add, Exit, Exit
Menu, HelpMenu, Add, Help, Help
Menu, MyMenuBar, Add, File, :FileMenu
Menu, MyMenuBar, Add, Help, :HelpMenu
Menu, MyMenuBar, Add, About, :AboutMenu
Gui, Menu, MyMenuBar
;###################First GUI-Window##############################
Gui, 1:Add, ComboBox, x40 y27 vClassChoice,|Chorus||Catholic Faith|English|Science|German|Geography|Algebra|
Gui, 1:Font, Bold
Gui, 1:Add, Text, x10 y28 w30 h20, Class:
Gui, 1:Add, GroupBox, x6 y0 w160 h60, Choose Class
Gui, 1:Add, Button, x1 y61 w25 h35 h25 gOkay , &OK
Gui, 1:Add, Button, x140 y100 w35 h20, &Exit
Gui, 1:Add, Edit, x1 y98 w110 h20 vMYURL,
Gui, 1:Add, Button, x112 y98 w23 h22 gGo Default, Go
Gui, 1:Font, Underline
Gui, 1:Add, Text, cBlue x50 y65 w100h30 gLink, Dowling HomePage
Gui, 1:Show, x183 y91 h120 w175, Class Planner v3.0
Gui, 1:Submit, NoHide
Return
;###############SUB Gui-Window######################
Okay:
Gui, 1:Submit,
IniRead, SelOpt, Settings.ini, Settings, Choices_%ClassChoice% , %A_Space%
Gui, 2:Add, Listbox, HScroll1000 x5 y30 h250 w373 vOptions AltSubmit, % SelOpt
Gui, 2:Add, Edit, x5 y275 w373 vEdit
Gui, 2:Add, Button, x5 y5 w50 h25 gCancel2, Cancel
Gui, 2:Add, Button, x163 y5 w50 h25 +Default gAdd, Add
Gui, 2:Add, Button, x318 y5 w60 h25 gDelete , Delete
Gui, 2:Add, ComboBox, x405 y45 vChgColor gChgColor, Yellow||Red|Maroon|Black|Blue|Purple|Green|Gray|Silver|White|Fuchsia|Lime|Olive|Navy|Teal|Aqua
Gui, 2:Add, GroupBox, x385 y25 h50 w160, Choose Color Please
Gui, 2:Add, Text, cRed Bold x400 y100 h20, Type in URL Please...
Gui, 2:Add, Text, x388 y240 h25, (Click Blue Text Please).
Gui, 2:Font, cBlue
Gui, 2:Font, Bold
Gui, 2:Add, Edit, cBlue HScroll150 x385 y115 w160 h45 vMYWEB,
Gui, 2:Add, Button, x500 y165 w45 h22 gGO1, Go
Gui, 2:Add, Text, cBlue x400 y200 w100 h40 gLink, Dowling HomePage
Gui, 2:Add, GroupBox, x385 y185 w120 h70,
Gui, 2:-SysMenu
Gui, 2:Add, Text, x60 y10 h15, %ClassChoice%
Gui, 2:Add, Text, x217 y10 h15, %ClassChoice%
Gui, 2:Show, x50 y300 w550 h300, %ClassChoice%
Gui, 2:Submit, NoHide
Return
;############Triggers##################################
Go1:
Gui, Submit, NoHide
Run %MYWEB%
return
Go:
Gui, Submit, NoHide
Run %MYURL%
return
Add:
Gui, 2:Submit, NoHide
SelOpt = %SelOpt%%Edit%|
IniWrite, %SelOpt%, Settings.ini, Settings, Choices_%ClassChoice%
Control, Add, %Edit% %FontSize%, ListBox1
GuiControl,,Edit, % Null
return
Delete:
Gui, 2:Submit, NoHide
StringSplit, No, SelOpt, |
NoOptions := No%Options%
StringReplace, SelOpt, SelOpt, %NoOptions%|,
IniWrite, %SelOpt%, Settings.ini, Settings, Choices_%ClassChoice%
Gui 2:+LastFound
Control, Delete, %Options%, ListBox1
return
;;;;;
Cancel2:
IniWrite, %SelOpt%, Settings.ini, Settings, Choices2GuiClose:
Gui, 2:Destroy
Gui, 1:Show
Return
ButtonReload:
IniWrite, %SelOpt%, Settings.ini, Settings, ChoicesReload
Reload
Gui, Submit
return
ChgColor:
Gui, 2:Submit, NoHide
Gui, 2:Font, c%ChgColor%
GuiControl, 2:Font, Options
return
Link:
Run www.DowlingCatholic.org
return
Help:
SoundBeep, 550, 120
Sleep, 50
SoundBeep, 550, 120
Sleep, 150
MsgBox 0, Help, ++++++++++GuiWindow 1:++++++++++++++`n~Choose a class from the ComboBox and press OK to show that classes window.`n~You can also type in a URL in the edit field and hit ENTER or GO to run the website you typed in.`n~You may go to the FileMenu and choose to Edit the script, exit the script, or if a problem occurs, reload it.`n~You may also go to, the AutoHotKey website for further Information regarding this program.`n++++++++++GUIWindow 2:++++++++++++`n~Depending on the class you picked, the second GUI window should contain that classes material that you can add. To do that, type what you want in the edit field and hit enter or click add to add it in the listbox.`n~If you want a line deleted, select it in the ListBox by clicking on the line, and hitting delete.`n~You can also change the color of the ListBox's font by choosing a font color in the ComboBox on the right.`n~You can also again, type a URL into the edit field and click GO to go to that website.`n~If you want to go back to the first page and choose a different class to go to, click cancel and it will come back up.
if MsgBox Ok
Reload
Reload:
Reload
return
Edit:
Edit Script
return
About:
Run WWW.AutoHotKey.com
return
Esc::
Close:
Exit:
GuiClose:
Gui, Submit
IniWrite, %SelOpt%, Settings.ini, Settings, Choices
ExitApp
return |
ENJOY!!!!!!!!
Best, 
Last edited by slomz on Sun Sep 17, 2006 6:27 pm; edited 4 times in total |
|