Sign in to follow this  
Followers 0
KingLeo26

Gui not working - Please Help

3 posts in this topic

Please check this, Buttons not working, think my coding sux!

code:

#include <GuiConstants.au3>

#Include <_WinAnimate.au3>

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; GUI

$hwnd = GuiCreate("Fire - Blazing Ops Tool", 900, 800)

GuiSetIcon("hg.ico", 0)

_WinAnimate($hwnd, $AW_FADE_IN)

;~ Sleep(1500)

;______________________________________________________________________________________

; MENU -File Menu.

$FileMenu = GUICtrlCreateMenu("&File")

$OpenItem = GUICtrlCreateMenuItem("&Open", $FileMenu)

$SaveItem = GUICtrlCreateMenuItem("&Save", $FileMenu)

GUICtrlCreateMenuItem("", $FileMenu)

$ExitItem = GUICtrlCreateMenuItem("&Exit", $FileMenu)

;_____________________________________________

; Options Menu

$OptionsMenu = GuiCtrlCreateMenu("&Options")

$ViewItem = GUICtrlCreateMenuItem("&View", $OptionsMenu)

$ToolsItem = GUICtrlCreateMenuItem("Tools", $OptionsMenu)

;_____________________________________________

; Tasks Menu

$TasksMenu = GuiCtrlCreateMenu("&Tasks")

$ShowallF = GUICtrlCreateMenuItem("&All Failures", $TasksMenu)

$ShowallL = GUICtrlCreateMenuItem("&All Logged", $TasksMenu)

$UC1 = GUICtrlCreateMenuItem("&Under Construction", $TasksMenu)

$UC2 = GUICtrlCreateMenuItem("&Under Construction", $TasksMenu)

;_____________________________________________

; How to Menu

$HowTo = GuiCtrlCreateMenu("How&To's")

$Investigate = GUICtrlCreateMenuItem("&Investigate a Failure", $HowTo)

$LogACall = GUICtrlCreateMenuItem("&Log a Call", $HowTo)

$Automate = GUICtrlCreateMenuItem("&Automate scripts", $HowTo)

$RemoteExecute = GUICtrlCreateMenuItem("&Remote execute jobs", $HowTo)

;_____________________________________________

; Specialists Menu

$Specialists = GuiCtrlCreateMenu("Spec&ialists's")

$BASD = GUICtrlCreateMenuItem("&BASD", $Specialists)

$NMC = GUICtrlCreateMenuItem("&NMC", $Specialists)

$RAB = GUICtrlCreateMenuItem("&RAB", $Specialists)

$RMS = GUICtrlCreateMenuItem("&RMS", $Specialists)

$VAS = GUICtrlCreateMenuItem("&VAS", $Specialists)

$MNP = GUICtrlCreateMenuItem("&MNP", $Specialists)

$DSTV = GUICtrlCreateMenuItem("&DSTV", $Specialists)

$CUR = GUICtrlCreateMenuItem("&CUR", $Specialists)

;_____________________________________________

; Help Menu

$HelpMenu = GUICtrlCreateMenu("&?")

$AboutItem = GUICtrlCreateMenuItem("&About", $HelpMenu)

;_____________________________________________

GuiCtrlCreateMenu(" ***-Welcome to Fire - Blazing Ops Tool-*** ")

;______________________________________________________________________________________

; CONTEXT MENU

$contextMenu = GuiCtrlCreateContextMenu()

GuiCtrlCreateMenuItem("Why did you click me?", $contextMenu)

GuiCtrlCreateMenuItem("", $contextMenu) ;separator

$properties = GuiCtrlCreateMenuItem("&Properties", $contextMenu)

GuiCtrlCreateMenuItem("Nothing of interest here", $properties)

;______________________________________________________________________________________

; PICS AND OTHER PRETTIES TO MAKE THE GUI ALL NICE AND STUFF

; PICS

GuiCtrlCreatePic("FireBOT_picture.jpg",0,0, 130,85)

GuiCtrlSetColor(-1,0xffffff)

GuiCtrlCreatePic("FBbot.jpg",0,85, 130,55)

GuiCtrlSetColor(-1,0xffffff)

; Horse runner

Opt("GUICoordMode",1)

$n2=GUICtrlCreateIcon ( @windowsdir & "\cursors\horse.ani", 600, 530,640,32,32)

GUISetState (@SW_SHOW)

;______________________________________________________________________________________

; TO RUN LAVENS APPLICATION TO CHECK FRONT END AND MANAGERS!!!

; EXE - Make available when at office, needs java runtime***********************

;Run("monitorMachine.exe", "", $ACS_AUTOPLAY)

;Send("{SPACE}")

;GuiCtrlCreateLabel("Courtesy of Laven", 670, 50)

;______________________________________________________________________________________

; COMBO

GuiCtrlCreatecombo("Group A", 202, 10, 140, 200)

GUICtrlSetData(-1,"Group B|Group C|Group D|Group E|Group F|Group G") ; add other item snd set a new default

GUISetState ()

GuiCtrlCreatecombo("Group A", 202, 35, 140, 200)

GUICtrlSetData(-1,"Group B|Group C|Group D|Group E|Group F|Group G") ; add other item snd set a new default

GUISetState ()

GuiCtrlCreatecombo("Under Construction", 202, 60, 140, 200)

GuiCtrlCreatecombo("Under Construction", 438, 10, 140, 200)

GuiCtrlCreatecombo("Under Construction", 438, 35, 140, 200)

GuiCtrlCreatecombo("Abdul Gafoor - 1785", 438, 60, 140, 200)

GUICtrlSetData(-1,"Abu Bakr Brey - 1809|Adolf Koekemoer - 1829|Allistair Grace - 1817|Alain Mbolia - 1814|Andiswa Hlawula - 1823|Andre Bester - 1794|Andreas Zwicker - 1790|Andrew Butchart - 1862|Andrew Filmer - 1780|Annelie Hitge - 1789|Anton Maree - 1789|Anton Koekemoer - 1830|Anton Van Heer - 1803|Ashika Sewchur - 1867|Belinda Schwab - 1883|Benjamin Kilian - 1838|Bianca Breetzke - 1793|Braam Van Heerd - 1887|Bryan Savides - 1833|Brett Schubach - 1822|Bronwyn Jansen - 1820|Cathy Booysen - 1846|Ceri Theron - 1808|Christelle Buys - 1856|Clive Carew - 1328|Claudette Poole - 1863|Daniel Van Graa - 1889|Dean Edworthy - 1831|Delmarie Mangia - 1783|Denise Major - 1861|Donna McConnell - 1867|Ebrahim Rhoda - 1834|Ernest Conradie - 1879|Eugene Olivier - 1890|Evan Kairuz - 1812|Faizel Rahbeeni - 1885|Faizel Ahmed - 1844|Farrell Lategan - 1321|Ferdinand Piete - 1845|Gerhard Hauptfl - 1806|Gerhard van Hee - 1317|Gerrie Combrink - 1811|Herman Scheeper - 1792|Ikeraam Loofer - 1842|Imraan Ismail - 1820|Jaco Immelman - 1793|Jacobus Meintje - 1786| Jan Van Wyk - 1847|Johan Gellatly - 1801|Johan Van Heerd - 1788|John Harrison - 1302|John Williams - 1853|Jolene Page - 1860|Julian Johnson - 1817|Junaid Kleinsch - 1891|Kate Golding - 1787|Kavindra Rammun - 1315|Kgosi Mochwanae - 1821|Kolie Van Stade - 1851|Kirk Daries - 1314|Laven Pillay - 1862|Len Cooper - 1881|Len Haasbroek - 1888|Lizette Priess - 1864|Llewellyn Poon - 1866|Louis van Alphe - 1886|Malachy (Mal) M - 1855|Marcelino Thoma - 1882|Mario Mathee - 1841|Mark Sherwood - 1319|Mark Blomdal - 1782|Martin Lubbe - 1865|Martin Postmus - 1816|Mary Anne Beasl - 1863|Mercia Zaayman NA |Mias DuToit - 1868|Mike Workman - 1854|Morne Van Vuure - 1813|Natalie Murray - 1998|Neil Bester - 1805|Neil James - 1859|Neil Peters - 1815|Nicholas Cooper - 1873|Petrus Koekemoe - 1837|Petrusa De Koke - 1892|Radhia Wentzel - 1872|Ray Hall - 1818|Richard King - 1824|Robert De Sward - 1320|Robbie Papenfus - 1783|Ronel Lombaard - 1835|Sandra Pool - 1794|Sergey Akopkokh - 1850|Shaheen Abdulla - 1854|Shannon Waterme - 1896|Stefan Lombard NA |Stefan Burwitz - 1318|Stefan Prinsloo - 1785|Stephen Davies - 1787|Stephanie Mandy - 1825|Stephen Bottger - 1807|Stewart Kramm - 1804|Talitha Swanepo - 1884|Tracy Botha - 1802|Tim Foreman - 1848|Thor Harley - 1828|Wayne Goschen - 1316|Werner Meyer - 1836|Willem Pretoriu - 1880|Willem Vermeule - 1836|Yunus Noordien - 1991|Yusaf Walele - 1819|Zibonelo Msibi - 1869|Zeenat Mohamed - 1893") ; add other item snd set a new default

GUISetState ()

GuiCtrlCreateLabel("My Group:", 135, 12)

GuiCtrlCreateLabel("Group Info:", 135, 37)

GuiCtrlCreateLabel("Proceedure:", 135, 62)

GuiCtrlCreateLabel("Newly Updated:", 355, 12)

GuiCtrlCreateLabel("Releases Info:", 355, 37)

GuiCtrlCreateLabel("Telephone List:", 355, 62)

;______________________________________________________________________________________

; PROGRESS

;GuiCtrlCreateProgress(182, 160, 105, 20)

;GuiCtrlSetData(-1, 60)

;GuiCtrlCreateLabel("Progress:", 130, 160)

; LIST

;GuiCtrlCreateList("To Do List", 202, 80, 100, 90)

;GuiCtrlSetData(-1, "a.Sample|b.List|c.Control|d.Here", "b.List")

; ICON

;GuiCtrlCreateIcon("shell32.dll", 1, 175, 120)

;GuiCtrlCreateLabel("Icon", 180, 160, 50, 20)

;______________________________________________________________________________________

; DATE

GuiCtrlCreateDate("", 600, 10, 200, 20)

GuiCtrlCreateLabel("(Date control expands into a calendar)", 600, 32, 200, 20)

;______________________________________________________________________________________

; LIST VIEW

$listView = GuiCtrlCreateListView(" Logged - CMDLoader | Failed - CMDLoader | Latest Logfile Modified time", 130, 190, 450, 450)

$SQLLog = GuiCtrlCreateListViewItem("A|One", $listView)

;~ _SQLite_Open

;~ _SQlite_Query (-1, "", $SQLLog)

GuiCtrlCreateListViewItem("B|Two", $listView)

GuiCtrlCreateListViewItem("C|Three", $listView)

GuiCtrlCreateListViewItem("A|One", $listView)

GuiCtrlCreateListViewItem("B|Two", $listView)

GuiCtrlCreateListViewItem("C|Three", $listView)

GuiCtrlCreateListViewItem("A|One", $listView)

GuiCtrlCreateListViewItem("B|Two", $listView)

GuiCtrlCreateListViewItem("C|Three", $listView)

GuiCtrlCreateListViewItem("A|One", $listView)

GuiCtrlCreateListViewItem("B|Two", $listView)

GuiCtrlCreateListViewItem("C|Three", $listView)

GuiCtrlCreateListViewItem("A|One", $listView)

GuiCtrlCreateListViewItem("B|Two", $listView)

GuiCtrlCreateListViewItem("C|Three", $listView)

GuiCtrlCreateListViewItem("A|One", $listView)

GuiCtrlCreateListViewItem("B|Two", $listView)

GuiCtrlCreateListViewItem("C|Three", $listView)

;______________________________________________________________________________________

; GROUP WITH RADIO BUTTONS

GuiCtrlCreateGroup("Lavens Tool", 600, 55, 180)

;GuiCtrlCreateRadio("Radio One", 650, 340, 80)

GuiCtrlSetState(-1, $GUI_CHECKED)

;GuiCtrlCreateRadio("Radio Two", 650, 365, 80)

GUICtrlCreateGroup ("",-99,-99,1,1) ;close group

;______________________________________________________________________________________

; CHECKBOX

GuiCtrlCreateCheckbox("Veiw sms Failures",11, 170, 100, 20)

GuiCtrlSetState(-1, $GUI_CHECKED)

GuiCtrlCreateCheckbox("Auto something",11, 190, 100, 20)

GuiCtrlSetState(-1, $GUI_CHECKED)

GuiCtrlCreateCheckbox("Auto Fetch Logs",11, 210, 100, 20)

GuiCtrlSetState(-1, $GUI_CHECKED)

GuiCtrlCreateCheckbox("Auto Fetch Logs",11, 230, 100, 20)

GuiCtrlSetState(-1, $GUI_CHECKED)

;______________________________________________________________________________________

;GuiCtrlCreateTabItem("Four")

;GuiCtrlCreateTabItem("Two")

; TREEVIEW ONE

;$treeOne = GuiCtrlCreateTreeView(210, 290, 80, 80)

;$treeItem = GuiCtrlCreateTreeViewItem("TreeView", $treeOne)

;GuiCtrlCreateTreeViewItem("Item1", $treeItem)

;GuiCtrlCreateTreeViewItem("Item2", $treeItem)

;GuiCtrlCreateTreeViewItem("Foo", -1)

;GuiCtrlSetState($treeItem, $GUI_EXPAND)

; TREEVIEW TWO

;$treeTwo = GuiCtrlCreateTreeView(295, 290, 103, 80, $TVS_CHECKBOXES)

;GuiCtrlCreateTreeViewItem("TreeView", $treeTwo)

;GuiCtrlCreateTreeViewItem("With", $treeTwo)

;GuiCtrlCreateTreeViewItem("tvs_checkboxes", $treeTwo)

;GuiCtrlSetState(-1, $GUI_CHECKED)

;GuiCtrlCreateTreeViewItem("Style", $treeTwo)

;______________________________________________________________________________________

; Paste area

GuiCtrlCreateEdit(@CRLF & " Temporary Paste area", 600, 650, 180, 115)

; TAB function to run Tails

GuiCtrlCreatePic("FBTail.jpg",1,650, 58,115)

GuiCtrlCreateTab(60, 650, 520, 115)

GuiCtrlCreateTabItem("BLB")

GuiCtrlCreateLabel("This is where the tail logs are going to be displayed!", 140, 700)

GuiCtrlCreateTabItem("CIM")

GuiCtrlCreateTabItem("CUR")

GuiCtrlCreateTabItem("EPPIX")

GuiCtrlCreateTabItem("HLR")

GuiCtrlCreateTabItem("SRP")

GuiCtrlCreateTabItem("SRQ")

GuiCtrlCreateTabItem("TRM")

GuiCtrlCreateTabItem("WIG")

GUIGetMsg()

; GUI MESSAGE LOOP

GuiSetState()

;______________________________________________________________________________________

; BUTTON

$TButton_1 = GuiCtrlCreateButton("Log Call", 10, 250, 100, 30)

$TButton_2 = GuiCtrlCreateButton("Log My Failures", 10, 280, 100, 30)

$TButton_3 = GuiCtrlCreateButton("FB Log Folder", 10, 310, 100, 30)

$TButton_4 = GuiCtrlCreateButton("See All Failures", 10, 340, 100, 30)

$TButton_5 = GuiCtrlCreateButton("Raptor", 10, 370, 100, 30)

$TButton_6 = GuiCtrlCreateButton("Brett's Ops Tool", 10, 400, 100, 30)

$TButton_7 = GuiCtrlCreateButton("Outlook", 10, 430, 100, 30)

$TButton_8 = GuiCtrlCreateButton("Toad", 10, 460, 100, 30)

$TButton_9 = GuiCtrlCreateButton("Internet Home", 10, 490, 100, 30)

$TButton_10 = GuiCtrlCreateButton("Citrix", 10, 520, 100, 30)

$TButton_11 = GuiCtrlCreateButton("Ultra Edit", 10, 550, 100, 30)

$TButton_12 = GuiCtrlCreateButton("Icon", 10, 580, 100, 30)

$TButton_13 = GuiCtrlCreateButton("Control Centre", 10, 610, 100, 30)

$msg = GUIGetMsg()

If $msg = $TButton_1 Then ShellExecuteWait("outlook.exe","","C:\Program Files\Microsoft Office\OFFICE11")

If $msg = $TButton_2 Then ShellExecuteWait("outlook.exe","","C:\Program Files\Microsoft Office\OFFICE11")

If $msg = $TButton_3 Then ShellExecuteWait("outlook.exe","","C:\Program Files\Microsoft Office\OFFICE11")

If $msg = $TButton_4 Then ShellExecuteWait("outlook.exe","","C:\Program Files\Microsoft Office\OFFICE11")

If $msg = $TButton_5 Then ShellExecuteWait("notepad.exe","","C:\Program Files")

If $msg = $TButton_6 Then ShellExecuteWait("outlook.exe","","C:\Program Files\Microsoft Office\OFFICE11")

If $msg = $TButton_7 Then ShellExecuteWait("outlook.exe","","C:\Program Files\Microsoft Office\OFFICE11")

If $msg = $TButton_8 Then ShellExecuteWait("outlook.exe","","C:\Program Files\Microsoft Office\OFFICE11")

If $msg = $TButton_9 Then ShellExecuteWait("outlook.exe","","C:\Program Files\Microsoft Office\OFFICE11")

If $msg = $TButton_10 Then ShellExecuteWait("outlook.exe","","C:\Program Files\Microsoft Office\OFFICE11")

If $msg = $TButton_11 Then ShellExecuteWait("outlook.exe","","C:\Program Files\Microsoft Office\OFFICE11")

If $msg = $TButton_12 Then ShellExecuteWait("outlook.exe","","C:\Program Files\Microsoft Office\OFFICE11")

If $msg = $TButton_13 Then ShellExecuteWait("outlook.exe","","C:\Program Files\Microsoft Office\OFFICE11")

If $msg = $gui_event_close Then Exit

GUIGetMsg()

While GuiGetMsg() <> $GUI_EVENT_CLOSE

WEnd

How_I_want_it_working.doc

Share this post


Link to post
Share on other sites



While 1
$msg = GUIGetMsg()

If $msg = $TButton_1 Then ShellExecuteWait("outlook.exe","","C:\Program Files\Microsoft Office\OFFICE11")
If $msg = $TButton_2 Then ShellExecuteWait("outlook.exe","","C:\Program Files\Microsoft Office\OFFICE11")
If $msg = $TButton_3 Then ShellExecuteWait("outlook.exe","","C:\Program Files\Microsoft Office\OFFICE11")
If $msg = $TButton_4 Then ShellExecuteWait("outlook.exe","","C:\Program Files\Microsoft Office\OFFICE11")
If $msg = $TButton_5 Then ShellExecuteWait("notepad.exe","","C:\Program Files")
If $msg = $TButton_6 Then ShellExecuteWait("outlook.exe","","C:\Program Files\Microsoft Office\OFFICE11")
If $msg = $TButton_7 Then ShellExecuteWait("outlook.exe","","C:\Program Files\Microsoft Office\OFFICE11")
If $msg = $TButton_8 Then ShellExecuteWait("outlook.exe","","C:\Program Files\Microsoft Office\OFFICE11")
If $msg = $TButton_9 Then ShellExecuteWait("outlook.exe","","C:\Program Files\Microsoft Office\OFFICE11")
If $msg = $TButton_10 Then ShellExecuteWait("outlook.exe","","C:\Program Files\Microsoft Office\OFFICE11")
If $msg = $TButton_11 Then ShellExecuteWait("outlook.exe","","C:\Program Files\Microsoft Office\OFFICE11")
If $msg = $TButton_12 Then ShellExecuteWait("outlook.exe","","C:\Program Files\Microsoft Office\OFFICE11")
If $msg = $TButton_13 Then ShellExecuteWait("outlook.exe","","C:\Program Files\Microsoft Office\OFFICE11")
If $msg = $gui_event_close Then Exit
WEnd

Share this post


Link to post
Share on other sites

Thanks, the buttons weren't displaying, so just moved the createbuttons up higher in the script, works perfectly now.

I Still need to know how to call info from a script I have off the companies database into the list View I created....

here's the script if you know of any script I can add this to...

SELECT/*+ first_rows */ OpStr.ID,count(*)FROM SA_Service_Commands Cmd, SA_Output_Streams OpStr, SA_Output_Stream_Groups OpSTRGRP, SA_Requests Req, SA_Request_Types Req_Type , SA_Command_Types Cmd_Type , SA_Subscribers Su WHERE Req.Req_Type_Seq = Req_Type.Seq AND Cmd.Req_Seq = Req.Seq AND Cmd.Status IN('L')AND Cmd.OpSTr_Seq = Opstr.Seq AND OpStr.opstrgrp_ID = Opstrgrp.ID AND Cmd.Cmd_Type_Seq = Cmd_Type.Seq AND Req.SU_Seq = Su.Seq groupby opstr.id orderby opstr.id;

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