Code:
#include <GDIPlus.au3>
#include <GuiConstantsEx.au3>
#include <GUIConstants.au3>
;Opt("MustDeclareVars", 1)
;
; Program to simplify the printing and archiving of School Reports
;
; Written by R. Reynolds, 2008
;
; Declare all the variables
Global $hGUI, $msg, $hImage, $hGraphic, $button1, $button2, $label_1, $label_2, $label_3, $optJunior, $optTransitus, $optS1, $optS2, $optS3, $optS4, $optS56, $optrep, $optatt, $iMsgBoxAnswer2, $iMsgBoxAnswer
; Create GUI
$hGUI = GUICreate("School Reporting System - Version 0.1a", 550, 215)
GUISetState()
$filemenu = GuiCtrlCreateMenu ("File")
$exititem = GuiCtrlCreateMenuitem ("Exit",$filemenu)
$helpmenu = GuiCtrlCreateMenu ("?")
$helpitem = GuiCtrlCreateMenuitem ("Help",$helpmenu)
$aboutitem = GuiCtrlCreateMenuitem ("About",$helpmenu)
; Load PNG image
_GDIPlus_StartUp()
$hImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\badge.png")
; Draw PNG image
$hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI)
_GDIPlus_GraphicsDrawImage($hGraphic, $hImage, 0, 0)
; Loop until user exits
; Draw the Print and Save Icons
$button1 = GUICtrlCreateButton ("1", 170,100,75,75,$BS_ICON)
GUICtrlSetImage (-1, "shell32.dll",7)
$button2 = GUICtrlCreateButton ("2", 170,10,75,75,$BS_ICON)
GUICtrlSetImage (-1, "shell32.dll",17)
GUISetState()
$Label_1 = GuiCtrlCreateLabel("Created by Robert Reynolds", 390, 180, 150, 21, 0x1000)
GUICtrlCreateGroup("Year", 280, 5, 150, 170)
$optJunior = GUICtrlCreateRadio("Junior", 290, 20, 100, 20)
GUICtrlSetState(-1, $GUI_CHECKED)
$optTransitus = GUICtrlCreateRadio("Transitus", 290, 40, 100, 20)
$optS1 = GUICtrlCreateRadio("S1", 290, 60, 100, 20)
$optS2 = GUICtrlCreateRadio("S2", 290, 80, 100, 20)
$optS3 = GUICtrlCreateRadio("S3", 290, 100, 120, 20)
$optS4 = GUICtrlCreateRadio("S4", 290, 120, 100, 20)
$optS56 = GUICtrlCreateRadio("S5 and S6", 290, 140, 130, 20)
GUICtrlCreateGroup("", -99, -99, 1, 1) ;close group
GUICtrlCreateGroup("Option", 420, 5, 120, 170)
$optrep = GUICtrlCreateRadio("Reports", 440, 60, 100, 10)
GUICtrlSetState(-1, $GUI_CHECKED)
$optatt= GUICtrlCreateRadio("Attitudinals", 440, 80, 100, 10)
GUICtrlCreateGroup("", -99, -99, 1, 1) ;close group
While 1
$msg = GUIGetMsg()
Select
Case $msg = $exititem
ExitLoop
Case $msg = $aboutitem
MsgBox(64,"School Reporting System","School Reporting System Windows Utility." & @CRLF & "" & @CRLF & "This program is designed to simplify the Printing of completed reports." & @CRLF & "" & @CRLF & "Designed By R Reynolds. May 2008")
Case $msg = $helpitem
MsgBox(32,"School Reporting System","This button will display some brief help about the program")
; The Save Button
Case $msg = $button1
$iMsgBoxAnswer2 = MsgBox(36,"Archiving reports....","Are you sure you want to archive the complete set of <insert year> Reports?")
; Case $msg =
Select
Case $iMsgBoxAnswer2 = 6 ;Yes
MsgBox(64,"School Reporting System","Reports archived.")
Case $iMsgBoxAnswer2 = 7 ;No
EndSelect
Case $msg = $button2
$iMsgBoxAnswer = MsgBox(36,"Printing reports....","Are you sure you want to print the complete set of <insert year> Reports?")
Select
Case $iMsgBoxAnswer = 6 ;Yes
MsgBox(64,"School Reporting System","Reports sent to the printer")
; run("cscript print_test.vbs")
Case $iMsgBoxAnswer = 7 ;No
EndSelect
EndSelect
If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend
; Display the exit dialog
Dim $iMsgBoxAnswer
$iMsgBoxAnswer = MsgBox(52,"Close Program","Are you sure you want to exit this program?")
Select
Case $iMsgBoxAnswer = 6 ;Yes
Case $iMsgBoxAnswer = 7 ;No
; What do I put in here to keep the program running?
EndSelect
; Clean up and exit
_GDIPlus_GraphicsDispose($hGraphic)
_GDIPlus_ImageDispose($hImage)
_GDIPlus_ShutDown()
GUIDelete()
Exit Any chance someone could add in a bit of the missing stuff to get me going please?