Jump to content
Sign in to follow this  
scorch

GUI challenge

Recommended Posts

scorch

ok so i am stuck in my script. it is basically a gui i created to make it quicker to remote desktop to several different PC's. so at the end of my code i wanted to do something a little different were i would enter a test into the "GuiCtrlCreateInput" box then based on what i entered it would go to a spread sheet and pull the corresponding machine name. maybe it would make more sense looking at the code below and along with the spreadsheet. somebody please help me i think i have tried everything i can think of to try to make it work and no victory.

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

; for first row def TEST MACHINE ENVIRONMENT
Local $Button_TM1, $Button_TM2, $Button_TM3, $Button_TM4, $Button_TM5, $Button_TM6, $Button_TM7, $Button_TM8, $Button_TM9, $Button_TM10
Local $Button_TM11, $Button_TM12, $Button_TM13, $Button_TM14, $Button_TM15, $Button_TM16, $Button_TM17, $Button_TM18

;for second row def POST PROD MACHINE ENVIRONMENT
Local $Button_PST1, $Button_PST2, $Button_PST3, $Button_PST4, $Button_PST5, $Button_PST6, $Button_PST7, $Button_PST8, $Button_PST9, $Button_PST10
Local $Button_PST11, $Button_PST12, $Button_PST13, $Button_PST14, $Button_PST15, $Button_PST17, $Button_PST18

;third row def. production disk2 builders
Local $Button_PD1, $Button_PD2

;Below third row 2ndcolumn DISK2 TEST and disk to pst 
Local $Button_DT1, $Button_DT2
Local $Button_PSTD1

;Below third row 3rd column DISK2 TEST and disk to pst 
Local $Button_SS1, $Button_SS2, $Button_SS3, $Button_SS4, $Button_SS5

;Below third row 4th column DISK2 TEST and disk to pst 
Local $Button_CC1, $Button_CC2, $Button_CC3, $Button_CC4, $Button_CC5

;Below third row 5th column DISK2 TEST and disk to pst 
Local $Button_SC1, $Button_SC2, $Button_SC3, $Button_SC4

;Below 1st row 2nd column spreadsheets 
Local $Button_SP1, $Button_SP2, $Button_SP3

;Below 2st row 2nd column spreadsheets 
Local $Button_WS1, $Button_WS2, $Button_WS3
Local $Button_GO
;***************************************************************************************************




*************************************************************





;top label HEADERS and specifying that this window is rezisable
GUICreate("Data Operations QUICK KEYS", 435, 750, -1, -1, $WS_SIZEBOX + $WS_SYSMENU)

;resize function
;GUICtrlSetResizing(-1, $GUI_DOCKAUTO)
GUICtrlSetResizing(-1, $GUI_DOCKLEFT + $GUI_DOCKBOTTOM) 


GuiCtrlCreatePic("\\finch\ceregen_it\JEGONZ\Public\pics\TPS-pic.JPG", 0, 0, 0, 0)
;SETTING BACKGROUND COLOR OF GUI
;GUISetBkColor(0x6591CD)
GUISetBkColor(0xFFFFFF)

;GUICtrlCreateLabel("DATA OPERATIONS LAYOUT", 135, 10)
$font = "Arial Bold"
GUISetFont(9, 400, 0, $font) 
GUICtrlCreateLabel("Test Virtual Servers", 15, 85)
GUICtrlCreateLabel("Post Prod Machines", 155, 85)
GUICtrlCreateLabel("Disk2 Builders", 320, 85)
GUICtrlCreateLabel("Sync Servers", 325, 235)
GUICtrlCreateLabel("Console Controls", 315, 385)
GUICtrlCreateLabel("Quick Scripts", 325, 535)
GUICtrlCreateLabel("Spread Sheets", 28, 560)
GUICtrlCreateLabel(" Web Sites", 180, 560)
GUICtrlCreateLabel("RDC Midas Master", 20, 680)
GUISetFont(8.5, 400, 0, "") 

; INPUT
GuiCtrlCreateInput("Enter Program Name", 15, 700, 110, 20)

;first row of buttons
Opt("GUICoordMode", 1)

;SETTING COLOR OF BUTTONS
;GUICtrlSetDefBkColor(0xDEECFF)
GUICtrlSetDefBkColor(0xD1D9E5)

$Button_TM1 = GUICtrlCreateButton("H1 - MMH1TESTVM1", 10, 100, 125)
$Button_TM2 = GUICtrlCreateButton("ME - MMMETESTVM1", 10, 125, 125)
$Button_TM3 = GUICtrlCreateButton("D1 - MMD1TESTVM2", 10, 150, 125)
$Button_TM4 = GUICtrlCreateButton("D2 - MMD2TESTVM2", 10, 175, 125)
$Button_TM5 =  GUICtrlCreateButton("CA - MMCATESTVM3", 10, 200, 125)
$Button_TM6 = GUICtrlCreateButton("EZ - MMEZTESTVM3", 10, 225, 125)
$Button_TM7 = GUICtrlCreateButton("M3 - MMM3TESTVM4", 10, 250, 125)
$Button_TM8 = GUICtrlCreateButton("EF - MMEFTESTVM4", 10, 275, 125)
$Button_TM9 = GUICtrlCreateButton("8T - MM8TTESTVM5", 10, 300, 125)
$Button_TM10 = GUICtrlCreateButton("SD - MMSDTESTVM5", 10, 325, 125)
$Button_TM11 = GUICtrlCreateButton("E8 - MME8TESTVM6", 10, 350, 125)
$Button_TM12 = GUICtrlCreateButton("OX - MMOXTESTVM6", 10, 375, 125)
$Button_TM13 = GUICtrlCreateButton("9Z - MM9ZTESTVM7", 10, 400, 125)
$Button_TM14 = GUICtrlCreateButton("9Q - MM9QTESTVM7", 10, 425, 125)
$Button_TM15 = GUICtrlCreateButton("BY - MMBYTESTVM8", 10, 450, 125)
$Button_TM16 = GUICtrlCreateButton("DN - MMDNTESTVM8", 10, 475, 125)
$Button_TM17 = GUICtrlCreateButton("CQ - MMCQTESTVM9", 10, 500, 125)
$Button_TM18 = GUICtrlCreateButton("F1 - MMF1TESTVM9", 10, 525, 125)

;second row of buttons
$Button_PST1 = GUICtrlCreateButton("TPS-TRAIN-01", 150, 100, 125)
$Button_PST2 = GUICtrlCreateButton("TPS-TRAIN-02", 150, 125, 125)
$Button_PST3 = GUICtrlCreateButton("TPS-TRAIN-03", 150, 150, 125)
$Button_PST4 = GUICtrlCreateButton("TPS-TRAIN-04", 150, 175, 125)
$Button_PST5 = GUICtrlCreateButton("TPS-TRAIN-05", 150, 200, 125)
$Button_PST6 = GUICtrlCreateButton("TPS-TRAIN-06", 150, 225, 125)
$Button_PST7 = GUICtrlCreateButton("TPS-TRAIN-07", 150, 250, 125)
$Button_PST8 = GUICtrlCreateButton("TPS-TRAIN-08", 150, 275, 125)
$Button_PST9 = GUICtrlCreateButton("TPS-TRAIN-09", 150, 300, 125)
$Button_PST10 = GUICtrlCreateButton("TPS-TRAIN-10", 150, 325, 125)
$Button_PST11 = GUICtrlCreateButton("TPS-TRAIN-11", 150, 350, 125)
$Button_PST12 = GUICtrlCreateButton("TPS-TRAIN-12", 150, 375, 125)
$Button_PST13 = GUICtrlCreateButton("TPS-TRAIN-13", 150, 400, 125)
$Button_PST14 = GUICtrlCreateButton("TPS-TRAIN-14", 150, 425, 125)
$Button_PST15 = GUICtrlCreateButton("TPS-TRAIN-15", 150, 450, 125)
$Button_PST16 = GUICtrlCreateButton("TPS-TRAIN-16", 150, 475, 125)
$Button_PST17 = GUICtrlCreateButton("TPS-TRAIN-17", 150, 500, 125)
$Button_PST18 = GUICtrlCreateButton("TPS-TRAIN-18", 150, 525, 125)

;third row of buttons
$Button_PD1 = GUICtrlCreateButton("DISK2", 300, 100, 125)
$Button_PD2 = GUICtrlCreateButton("DISK2-PRD", 300, 125, 125) 
$Button_PSTD1 = GUICtrlCreateButton("LWHERM-PST", 300, 150, 125)
$Button_DT1 = GUICtrlCreateButton("DISK2-TEST", 300, 175, 125)
$Button_DT2 = GUICtrlCreateButton("CCHURS-TESTING", 300, 200, 125)


;Below third row second column DISK2 TEST and disk to pst 
$Button_SS1 = GUICtrlCreateButton("BLUE JAY", 300, 250, 125)
$Button_SS2 = GUICtrlCreateButton("GREEN JAY", 300, 275, 125)
$Button_SS3 = GUICtrlCreateButton("BROWN JAY", 300, 300, 125)
$Button_SS4 = GUICtrlCreateButton("SALMON", 300, 325, 125)
$Button_SS5 = GUICtrlCreateButton("MIDASTRNSRV02", 300, 350, 125)

;Below 4th row second column DISK2 TEST and disk to pst 
$Button_CC1 = GUICtrlCreateButton("Post Prod Machines", 300, 400, 125)
$Button_CC2 = GUICtrlCreateButton("Training Laptops", 300, 425, 125)
$Button_CC3 = GUICtrlCreateButton("Test VMs & Hosts", 300, 450, 125)
$Button_CC4 = GUICtrlCreateButton("Sync Servers", 300, 475, 125)
$Button_CC5 = GUICtrlCreateButton("Disk2 Builders", 300, 500, 125)

;Below 5th row second column DISK2 TEST and disk to pst 
$Button_SC1 = GUICtrlCreateButton("BO Common Error Fix", 300, 550, 125)
$Button_SC2 = GUICtrlCreateButton("User Overwritten Script", 300, 575, 125)
$Button_SC3 = GUICtrlCreateButton("Sql Version Check", 300, 600, 125)
$Button_SC4 = GUICtrlCreateButton("Number of Triggers", 300, 625, 125)


;Below 1st row second column spreadsheet
$Button_SP1 = GUICtrlCreateButton("Midas Master Programs", 10, 575, 125)
$Button_SP2 = GUICtrlCreateButton("Midas Passwords", 10, 600, 125)
$Button_SP3 = GUICtrlCreateButton("PST Training Room", 10, 625, 125)


;Below 2nd row second column WEBSITES
$Button_WS1 = GUICtrlCreateButton("Team Track", 150, 575, 125)
$Button_WS2 = GUICtrlCreateButton("Team Space", 150, 600, 125)
$Button_WS3 = GUICtrlCreateButton("Magic Helpdesk", 150, 625, 125)

;Below 1st row 3rd column prog name
$Button_PN1 = GUICtrlCreateButton("GO", 126, 696, 50)


GUISetState()


While 1
    $msg = GUIGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
        
        
        
;ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TestVM\MMH1TESTVM1.rdp"')
;TEST MACHINE RDC PATHS;    \\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TestVM\       
    Case $msg = $Button_TM1
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TestVM\MMH1TESTVM1.rdp"')
    Case $msg = $Button_TM2
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TestVM\MMMETESTVM1.rdp"')
    Case $msg = $Button_TM3
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TestVM\MMD1TESTVM2.rdp"')
    Case $msg = $Button_TM4
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TestVM\MMD2TESTVM2.rdp"')
    Case $msg = $Button_TM5
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TestVM\MMCATESTVM3.rdp"')
    Case $msg = $Button_TM6
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TestVM\MMEZTESTVM3.rdp"')
    Case $msg = $Button_TM7
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TestVM\MMM3TESTVM4.rdp"')
    Case $msg = $Button_TM8
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TestVM\MMEFTESTVM4.rdp"')
    Case $msg = $Button_TM9
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TestVM\MM8TTESTVM5.rdp"')
    Case $msg = $Button_TM10
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TestVM\MMSDTESTVM5.rdp"')
    Case $msg = $Button_TM11
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TestVM\MME8TESTVM6.rdp"')
    Case $msg = $Button_TM12
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TestVM\MMOXTESTVM6.rdp"')
    Case $msg = $Button_TM13
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TestVM\MM9ZTESTVM7.rdp"')
    Case $msg = $Button_TM14
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TestVM\MM9QTESTVM7.rdp"')
    Case $msg = $Button_TM15
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TestVM\MMBYTESTVM8.rdp"')
    Case $msg = $Button_TM16
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TestVM\MMDNTESTVM8.rdp"')
    Case $msg = $Button_TM17
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TestVM\MMCQTESTVM9.rdp"')
    Case $msg = $Button_TM18
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TestVM\MMF1TESTVM9.rdp"') 
    
;ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\\TrainingRoomRDC\TPS-TRAIN-01.rdp"')
;POST PROD RDC PATHS
    Case $msg = $Button_PST1
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TrainingRoomRDC\TPS-TRAIN-01.rdp"')
    Case $msg = $Button_PST2
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TrainingRoomRDC\TPS-TRAIN-02.rdp"')
    Case $msg = $Button_PST3
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TrainingRoomRDC\TPS-TRAIN-03.rdp"')
    Case $msg = $Button_PST4
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TrainingRoomRDC\TPS-TRAIN-04.rdp"')
    Case $msg = $Button_PST5
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TrainingRoomRDC\TPS-TRAIN-05.rdp"')
    Case $msg = $Button_PST6
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TrainingRoomRDC\TPS-TRAIN-06.rdp"')
    Case $msg = $Button_PST7
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TrainingRoomRDC\TPS-TRAIN-07.rdp"')
    Case $msg = $Button_PST8
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TrainingRoomRDC\TPS-TRAIN-08.rdp"')
    Case $msg = $Button_PST9
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TrainingRoomRDC\TPS-TRAIN-09.rdp"')
    Case $msg = $Button_PST10
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TrainingRoomRDC\TPS-TRAIN-10.rdp"')
    Case $msg = $Button_PST11
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TrainingRoomRDC\TPS-TRAIN-11.rdp"')
    Case $msg = $Button_PST12
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TrainingRoomRDC\TPS-TRAIN-12.rdp"')
    Case $msg = $Button_PST13
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TrainingRoomRDC\TPS-TRAIN-13.rdp"')
    Case $msg = $Button_PST14
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TrainingRoomRDC\TPS-TRAIN-14.rdp"')
    Case $msg = $Button_PST15
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TrainingRoomRDC\TPS-TRAIN-15.rdp"')
    Case $msg = $Button_PST16
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TrainingRoomRDC\TPS-TRAIN-16.rdp"')
    Case $msg = $Button_PST17
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TrainingRoomRDC\TPS-TRAIN-17.rdp"')
    Case $msg = $Button_PST18
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TrainingRoomRDC\TPS-TRAIN-18.rdp"')

;ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\Disk2Builders\ .rdp"')
    
    Case $msg = $Button_PD1
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\Disk2Builders\disk2.rdp"')    
    Case $msg = $Button_PD2
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\Disk2Builders\disk2-prd.rdp"')        
    Case $msg = $Button_PSTD1
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\Disk2Builders\lwherm.rdp"')   
    Case $msg = $Button_DT1
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\Disk2Builders\disk2-test.rdp"')   
    Case $msg = $Button_DT2
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\Disk2Builders\CCHURS-TESTING.rdp"')   


;ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\SyncServers\ .rdp"')
        
    Case $msg = $Button_SS1
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\SyncServers\bluejay.rdp"')        
    Case $msg = $Button_SS2
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\SyncServers\greenjay.rdp"')
    Case $msg = $Button_SS3
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\SyncServers\brownjay.rdp"')
    Case $msg = $Button_SS4
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\SyncServers\salmon.rdp"')
    Case $msg = $Button_SS5
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\SyncServers\MIDASTRNSRV02.rdp"')  
        
        
;ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\SyncServers\ .rdp"')
        
    Case $msg = $Button_CC1
        ShellExecute("mmc.exe",'"\\finch\ceregen_it\JEGONZ\Public\Consoles\Training Lab Post Prod.msc"')        
    Case $msg = $Button_CC2
        ShellExecute("mmc.exe",'"\\finch\ceregen_it\JEGONZ\Public\Consoles\Training Laptops.msc"')
    Case $msg = $Button_CC3
        ShellExecute("mmc.exe",'"\\finch\ceregen_it\JEGONZ\Public\Consoles\VM Test Environment.msc"')
    Case $msg = $Button_CC4
        ShellExecute("mmc.exe",'"\\finch\ceregen_it\JEGONZ\Public\Consoles\Servers.msc"')
    Case $msg = $Button_CC5
        ShellExecute("mmc.exe",'"\\finch\ceregen_it\JEGONZ\Public\Consoles\disk2.msc"') 
    

;ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\SyncServers\ .rdp"')
        
    Case $msg = $Button_SC1
        ShellExecute("isqlw.exe")
        Sleep(1000)
        ShellExecute("notepad.exe", "\\finch\ceregen_it\JEGONZ\Public\db scripts\BO_Common_cleanup_bad_messages.sql")
    Case $msg = $Button_SC2
        ShellExecute("isqlw.exe")
        Sleep(1000)
        ShellExecute("notepad.exe", "\\finch\ceregen_it\JEGONZ\Public\db scripts\user overwritten.txt")
    Case $msg = $Button_SC3
        ShellExecute("isqlw.exe")
        Sleep(1000)
        ShellExecute("notepad.exe", "\\finch\ceregen_it\JEGONZ\Public\db scripts\sql version check.txt")
    Case $msg = $Button_SC4
        ShellExecute("isqlw.exe")
        Sleep(1000)
        ShellExecute("notepad.exe", "\\finch\ceregen_it\JEGONZ\Public\db scripts\Number of Triggers.txt")   
    
    
    Case $msg = $Button_SP1
        ShellExecute("C:\Program Files\Internet Explorer\IEXPLORE.EXE", "http://w3dom.monsanto.com/teamspace/tm4139.nsf/0/49C56BD9C400330B8625754B0015E069/$file/MIDASMasterProgramInfo.xlsx?OpenElement", "", "")
    Case $msg = $Button_SP2
        ShellExecute("C:\Program Files\Internet Explorer\IEXPLORE.EXE", "http://w3.monsanto.com/asp/ts4.asp?tsid=4139&resid=BD14183C86C3CA2886257547006CED60R", "", "")
    Case $msg = $Button_SP3
        ShellExecute("EXCEL.EXE")
        Sleep(500)
        ShellExecute("\\FINCH\IT_PROJECTS\DeploymentandSupport\TechnicalServices\Private\Training room setup.xlsx", "", "") 
        
        
    Case $msg = $Button_WS1
        ShellExecute("C:\Program Files\Internet Explorer\IEXPLORE.EXE", "http://w3.teamtrack.monsanto.com/tmtrack/tmtrack.dll?", "", "")
    Case $msg = $Button_WS2
        ShellExecute("C:\Program Files\Internet Explorer\IEXPLORE.EXE", "http://w3.monsanto.com/asp/ts4.asp?tsid=4139", "", "")
    Case $msg = $Button_WS3
        ShellExecute("C:\Program Files\Internet Explorer\IEXPLORE.EXE", "http://screechowl/magicsshd", "", "")  


    [color="#FF0000"];Case $msg = $Button_GO
;ShellExecute(
;ShellExecute("hot key spread sheet rdc.exe")[/color]       
    EndSelect
    
    
WEnd

the format of the spreadsheet is below. its only 2 columns but has a few rows. that should give you guys and idea of how it looks though. the underscore represents the split between the 2 columns

ProgName____MachineName

1____mm01na2569

5____MM05NA2510

6____mm06na2555

8____mm08na2164

9____mm09na2013

Edited by scorch

Share this post


Link to post
Share on other sites
Nahuel

Hope this is what you meant:

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

; for first row def TEST MACHINE ENVIRONMENT
Global $Button_TM1, $Button_TM2, $Button_TM3, $Button_TM4, $Button_TM5, $Button_TM6, $Button_TM7, $Button_TM8, $Button_TM9, $Button_TM10
Global $Button_TM11, $Button_TM12, $Button_TM13, $Button_TM14, $Button_TM15, $Button_TM16, $Button_TM17, $Button_TM18

;for second row def POST PROD MACHINE ENVIRONMENT
Global $Button_PST1, $Button_PST2, $Button_PST3, $Button_PST4, $Button_PST5, $Button_PST6, $Button_PST7, $Button_PST8, $Button_PST9, $Button_PST10
Global $Button_PST11, $Button_PST12, $Button_PST13, $Button_PST14, $Button_PST15, $Button_PST17, $Button_PST18

;third row def. production disk2 builders
Global $Button_PD1, $Button_PD2

;Below third row 2ndcolumn DISK2 TEST and disk to pst 
Global $Button_DT1, $Button_DT2
Global $Button_PSTD1

;Below third row 3rd column DISK2 TEST and disk to pst 
Global $Button_SS1, $Button_SS2, $Button_SS3, $Button_SS4, $Button_SS5

;Below third row 4th column DISK2 TEST and disk to pst 
Global $Button_CC1, $Button_CC2, $Button_CC3, $Button_CC4, $Button_CC5

;Below third row 5th column DISK2 TEST and disk to pst 
Global $Button_SC1, $Button_SC2, $Button_SC3, $Button_SC4

;Below 1st row 2nd column spreadsheets 
Global $Button_SP1, $Button_SP2, $Button_SP3

;Below 2st row 2nd column spreadsheets 
Global $Button_WS1, $Button_WS2, $Button_WS3
Global $Button_GO
;***************************************************************************************************




;*************************************************************





;top label HEADERS and specifying that this window is rezisable
$GUI = GUICreate("Data Operations QUICK KEYS", 435, 750, -1, -1, $WS_SIZEBOX + $WS_SYSMENU)

;resize function
;GUICtrlSetResizing(-1, $GUI_DOCKAUTO)
GUICtrlSetResizing(-1, $GUI_DOCKLEFT + $GUI_DOCKBOTTOM) 


GuiCtrlCreatePic("\\finch\ceregen_it\JEGONZ\Public\pics\TPS-pic.JPG", 0, 0, 0, 0)
;SETTING BACKGROUND COLOR OF GUI
;GUISetBkColor(0x6591CD)
GUISetBkColor(0xFFFFFF)

;GUICtrlCreateLabel("DATA OPERATIONS LAYOUT", 135, 10)
$font = "Arial Bold"
GUISetFont(9, 400, 0, $font) 
GUICtrlCreateLabel("Test Virtual Servers", 15, 85)
GUICtrlCreateLabel("Post Prod Machines", 155, 85)
GUICtrlCreateLabel("Disk2 Builders", 320, 85)
GUICtrlCreateLabel("Sync Servers", 325, 235)
GUICtrlCreateLabel("Console Controls", 315, 385)
GUICtrlCreateLabel("Quick Scripts", 325, 535)
GUICtrlCreateLabel("Spread Sheets", 28, 560)
GUICtrlCreateLabel(" Web Sites", 180, 560)
GUICtrlCreateLabel("RDC Midas Master", 20, 680)
GUISetFont(8.5, 400, 0, "") 

; INPUT
$PNInput = GuiCtrlCreateInput("Enter Program Name", 15, 700, 110, 20)

;first row of buttons
Opt("GUICoordMode", 1)

;SETTING COLOR OF BUTTONS
;GUICtrlSetDefBkColor(0xDEECFF)
GUICtrlSetDefBkColor(0xD1D9E5)

$Button_TM1 = GUICtrlCreateButton("H1 - MMH1TESTVM1", 10, 100, 125)
$Button_TM2 = GUICtrlCreateButton("ME - MMMETESTVM1", 10, 125, 125)
$Button_TM3 = GUICtrlCreateButton("D1 - MMD1TESTVM2", 10, 150, 125)
$Button_TM4 = GUICtrlCreateButton("D2 - MMD2TESTVM2", 10, 175, 125)
$Button_TM5 =  GUICtrlCreateButton("CA - MMCATESTVM3", 10, 200, 125)
$Button_TM6 = GUICtrlCreateButton("EZ - MMEZTESTVM3", 10, 225, 125)
$Button_TM7 = GUICtrlCreateButton("M3 - MMM3TESTVM4", 10, 250, 125)
$Button_TM8 = GUICtrlCreateButton("EF - MMEFTESTVM4", 10, 275, 125)
$Button_TM9 = GUICtrlCreateButton("8T - MM8TTESTVM5", 10, 300, 125)
$Button_TM10 = GUICtrlCreateButton("SD - MMSDTESTVM5", 10, 325, 125)
$Button_TM11 = GUICtrlCreateButton("E8 - MME8TESTVM6", 10, 350, 125)
$Button_TM12 = GUICtrlCreateButton("OX - MMOXTESTVM6", 10, 375, 125)
$Button_TM13 = GUICtrlCreateButton("9Z - MM9ZTESTVM7", 10, 400, 125)
$Button_TM14 = GUICtrlCreateButton("9Q - MM9QTESTVM7", 10, 425, 125)
$Button_TM15 = GUICtrlCreateButton("BY - MMBYTESTVM8", 10, 450, 125)
$Button_TM16 = GUICtrlCreateButton("DN - MMDNTESTVM8", 10, 475, 125)
$Button_TM17 = GUICtrlCreateButton("CQ - MMCQTESTVM9", 10, 500, 125)
$Button_TM18 = GUICtrlCreateButton("F1 - MMF1TESTVM9", 10, 525, 125)

;second row of buttons
$Button_PST1 = GUICtrlCreateButton("TPS-TRAIN-01", 150, 100, 125)
$Button_PST2 = GUICtrlCreateButton("TPS-TRAIN-02", 150, 125, 125)
$Button_PST3 = GUICtrlCreateButton("TPS-TRAIN-03", 150, 150, 125)
$Button_PST4 = GUICtrlCreateButton("TPS-TRAIN-04", 150, 175, 125)
$Button_PST5 = GUICtrlCreateButton("TPS-TRAIN-05", 150, 200, 125)
$Button_PST6 = GUICtrlCreateButton("TPS-TRAIN-06", 150, 225, 125)
$Button_PST7 = GUICtrlCreateButton("TPS-TRAIN-07", 150, 250, 125)
$Button_PST8 = GUICtrlCreateButton("TPS-TRAIN-08", 150, 275, 125)
$Button_PST9 = GUICtrlCreateButton("TPS-TRAIN-09", 150, 300, 125)
$Button_PST10 = GUICtrlCreateButton("TPS-TRAIN-10", 150, 325, 125)
$Button_PST11 = GUICtrlCreateButton("TPS-TRAIN-11", 150, 350, 125)
$Button_PST12 = GUICtrlCreateButton("TPS-TRAIN-12", 150, 375, 125)
$Button_PST13 = GUICtrlCreateButton("TPS-TRAIN-13", 150, 400, 125)
$Button_PST14 = GUICtrlCreateButton("TPS-TRAIN-14", 150, 425, 125)
$Button_PST15 = GUICtrlCreateButton("TPS-TRAIN-15", 150, 450, 125)
$Button_PST16 = GUICtrlCreateButton("TPS-TRAIN-16", 150, 475, 125)
$Button_PST17 = GUICtrlCreateButton("TPS-TRAIN-17", 150, 500, 125)
$Button_PST18 = GUICtrlCreateButton("TPS-TRAIN-18", 150, 525, 125)

;third row of buttons
$Button_PD1 = GUICtrlCreateButton("DISK2", 300, 100, 125)
$Button_PD2 = GUICtrlCreateButton("DISK2-PRD", 300, 125, 125) 
$Button_PSTD1 = GUICtrlCreateButton("LWHERM-PST", 300, 150, 125)
$Button_DT1 = GUICtrlCreateButton("DISK2-TEST", 300, 175, 125)
$Button_DT2 = GUICtrlCreateButton("CCHURS-TESTING", 300, 200, 125)


;Below third row second column DISK2 TEST and disk to pst 
$Button_SS1 = GUICtrlCreateButton("BLUE JAY", 300, 250, 125)
$Button_SS2 = GUICtrlCreateButton("GREEN JAY", 300, 275, 125)
$Button_SS3 = GUICtrlCreateButton("BROWN JAY", 300, 300, 125)
$Button_SS4 = GUICtrlCreateButton("SALMON", 300, 325, 125)
$Button_SS5 = GUICtrlCreateButton("MIDASTRNSRV02", 300, 350, 125)

;Below 4th row second column DISK2 TEST and disk to pst 
$Button_CC1 = GUICtrlCreateButton("Post Prod Machines", 300, 400, 125)
$Button_CC2 = GUICtrlCreateButton("Training Laptops", 300, 425, 125)
$Button_CC3 = GUICtrlCreateButton("Test VMs & Hosts", 300, 450, 125)
$Button_CC4 = GUICtrlCreateButton("Sync Servers", 300, 475, 125)
$Button_CC5 = GUICtrlCreateButton("Disk2 Builders", 300, 500, 125)

;Below 5th row second column DISK2 TEST and disk to pst 
$Button_SC1 = GUICtrlCreateButton("BO Common Error Fix", 300, 550, 125)
$Button_SC2 = GUICtrlCreateButton("User Overwritten Script", 300, 575, 125)
$Button_SC3 = GUICtrlCreateButton("Sql Version Check", 300, 600, 125)
$Button_SC4 = GUICtrlCreateButton("Number of Triggers", 300, 625, 125)


;Below 1st row second column spreadsheet
$Button_SP1 = GUICtrlCreateButton("Midas Master Programs", 10, 575, 125)
$Button_SP2 = GUICtrlCreateButton("Midas Passwords", 10, 600, 125)
$Button_SP3 = GUICtrlCreateButton("PST Training Room", 10, 625, 125)


;Below 2nd row second column WEBSITES
$Button_WS1 = GUICtrlCreateButton("Team Track", 150, 575, 125)
$Button_WS2 = GUICtrlCreateButton("Team Space", 150, 600, 125)
$Button_WS3 = GUICtrlCreateButton("Magic Helpdesk", 150, 625, 125)

;Below 1st row 3rd column prog name
$Button_GO = GUICtrlCreateButton("GO", 126, 696, 50)


GUISetState()


While 1
    $msg = GUIGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
        
        
        
;ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TestVM\MMH1TESTVM1.rdp"')
;TEST MACHINE RDC PATHS;    \\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TestVM\       
    Case $msg = $Button_TM1
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TestVM\MMH1TESTVM1.rdp"')
    Case $msg = $Button_TM2
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TestVM\MMMETESTVM1.rdp"')
    Case $msg = $Button_TM3
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TestVM\MMD1TESTVM2.rdp"')
    Case $msg = $Button_TM4
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TestVM\MMD2TESTVM2.rdp"')
    Case $msg = $Button_TM5
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TestVM\MMCATESTVM3.rdp"')
    Case $msg = $Button_TM6
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TestVM\MMEZTESTVM3.rdp"')
    Case $msg = $Button_TM7
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TestVM\MMM3TESTVM4.rdp"')
    Case $msg = $Button_TM8
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TestVM\MMEFTESTVM4.rdp"')
    Case $msg = $Button_TM9
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TestVM\MM8TTESTVM5.rdp"')
    Case $msg = $Button_TM10
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TestVM\MMSDTESTVM5.rdp"')
    Case $msg = $Button_TM11
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TestVM\MME8TESTVM6.rdp"')
    Case $msg = $Button_TM12
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TestVM\MMOXTESTVM6.rdp"')
    Case $msg = $Button_TM13
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TestVM\MM9ZTESTVM7.rdp"')
    Case $msg = $Button_TM14
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TestVM\MM9QTESTVM7.rdp"')
    Case $msg = $Button_TM15
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TestVM\MMBYTESTVM8.rdp"')
    Case $msg = $Button_TM16
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TestVM\MMDNTESTVM8.rdp"')
    Case $msg = $Button_TM17
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TestVM\MMCQTESTVM9.rdp"')
    Case $msg = $Button_TM18
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TestVM\MMF1TESTVM9.rdp"') 
    
;ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\\TrainingRoomRDC\TPS-TRAIN-01.rdp"')
;POST PROD RDC PATHS
    Case $msg = $Button_PST1
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TrainingRoomRDC\TPS-TRAIN-01.rdp"')
    Case $msg = $Button_PST2
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TrainingRoomRDC\TPS-TRAIN-02.rdp"')
    Case $msg = $Button_PST3
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TrainingRoomRDC\TPS-TRAIN-03.rdp"')
    Case $msg = $Button_PST4
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TrainingRoomRDC\TPS-TRAIN-04.rdp"')
    Case $msg = $Button_PST5
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TrainingRoomRDC\TPS-TRAIN-05.rdp"')
    Case $msg = $Button_PST6
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TrainingRoomRDC\TPS-TRAIN-06.rdp"')
    Case $msg = $Button_PST7
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TrainingRoomRDC\TPS-TRAIN-07.rdp"')
    Case $msg = $Button_PST8
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TrainingRoomRDC\TPS-TRAIN-08.rdp"')
    Case $msg = $Button_PST9
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TrainingRoomRDC\TPS-TRAIN-09.rdp"')
    Case $msg = $Button_PST10
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TrainingRoomRDC\TPS-TRAIN-10.rdp"')
    Case $msg = $Button_PST11
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TrainingRoomRDC\TPS-TRAIN-11.rdp"')
    Case $msg = $Button_PST12
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TrainingRoomRDC\TPS-TRAIN-12.rdp"')
    Case $msg = $Button_PST13
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TrainingRoomRDC\TPS-TRAIN-13.rdp"')
    Case $msg = $Button_PST14
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TrainingRoomRDC\TPS-TRAIN-14.rdp"')
    Case $msg = $Button_PST15
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TrainingRoomRDC\TPS-TRAIN-15.rdp"')
    Case $msg = $Button_PST16
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TrainingRoomRDC\TPS-TRAIN-16.rdp"')
    Case $msg = $Button_PST17
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TrainingRoomRDC\TPS-TRAIN-17.rdp"')
    Case $msg = $Button_PST18
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\TrainingRoomRDC\TPS-TRAIN-18.rdp"')

;ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\Disk2Builders\ .rdp"')
    
    Case $msg = $Button_PD1
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\Disk2Builders\disk2.rdp"')    
    Case $msg = $Button_PD2
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\Disk2Builders\disk2-prd.rdp"')        
    Case $msg = $Button_PSTD1
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\Disk2Builders\lwherm.rdp"')   
    Case $msg = $Button_DT1
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\Disk2Builders\disk2-test.rdp"')   
    Case $msg = $Button_DT2
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\Disk2Builders\CCHURS-TESTING.rdp"')   


;ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\SyncServers\ .rdp"')
        
    Case $msg = $Button_SS1
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\SyncServers\bluejay.rdp"')        
    Case $msg = $Button_SS2
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\SyncServers\greenjay.rdp"')
    Case $msg = $Button_SS3
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\SyncServers\brownjay.rdp"')
    Case $msg = $Button_SS4
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\SyncServers\salmon.rdp"')
    Case $msg = $Button_SS5
        ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\SyncServers\MIDASTRNSRV02.rdp"')  
        
        
;ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\SyncServers\ .rdp"')
        
    Case $msg = $Button_CC1
        ShellExecute("mmc.exe",'"\\finch\ceregen_it\JEGONZ\Public\Consoles\Training Lab Post Prod.msc"')        
    Case $msg = $Button_CC2
        ShellExecute("mmc.exe",'"\\finch\ceregen_it\JEGONZ\Public\Consoles\Training Laptops.msc"')
    Case $msg = $Button_CC3
        ShellExecute("mmc.exe",'"\\finch\ceregen_it\JEGONZ\Public\Consoles\VM Test Environment.msc"')
    Case $msg = $Button_CC4
        ShellExecute("mmc.exe",'"\\finch\ceregen_it\JEGONZ\Public\Consoles\Servers.msc"')
    Case $msg = $Button_CC5
        ShellExecute("mmc.exe",'"\\finch\ceregen_it\JEGONZ\Public\Consoles\disk2.msc"') 
    

;ShellExecute("mstsc.exe",'"\\finch\ceregen_it\JEGONZ\Public\RemoteConnections\SyncServers\ .rdp"')
        
    Case $msg = $Button_SC1
        ShellExecute("isqlw.exe")
        Sleep(1000)
        ShellExecute("notepad.exe", "\\finch\ceregen_it\JEGONZ\Public\db scripts\BO_Common_cleanup_bad_messages.sql")
    Case $msg = $Button_SC2
        ShellExecute("isqlw.exe")
        Sleep(1000)
        ShellExecute("notepad.exe", "\\finch\ceregen_it\JEGONZ\Public\db scripts\user overwritten.txt")
    Case $msg = $Button_SC3
        ShellExecute("isqlw.exe")
        Sleep(1000)
        ShellExecute("notepad.exe", "\\finch\ceregen_it\JEGONZ\Public\db scripts\sql version check.txt")
    Case $msg = $Button_SC4
        ShellExecute("isqlw.exe")
        Sleep(1000)
        ShellExecute("notepad.exe", "\\finch\ceregen_it\JEGONZ\Public\db scripts\Number of Triggers.txt")   
    
    
    Case $msg = $Button_SP1
        ShellExecute( @ProgramFilesDir & "\Internet Explorer\IEXPLORE.EXE", "http://w3dom.monsanto.com/teamspace/tm4139.nsf/0/49C56BD9C400330B8625754B0015E069/$file/MIDASMasterProgramInfo.xlsx?OpenElement", "", "")
    Case $msg = $Button_SP2
        ShellExecute( @ProgramFilesDir & "\Internet Explorer\IEXPLORE.EXE", "http://w3.monsanto.com/asp/ts4.asp?tsid=4139&resid=BD14183C86C3CA2886257547006CED60R", "", "")
    Case $msg = $Button_SP3
        ShellExecute("EXCEL.EXE")
        Sleep(500)
        ShellExecute("\\FINCH\IT_PROJECTS\DeploymentandSupport\TechnicalServices\Private\Training room setup.xlsx", "", "") 
        
        
    Case $msg = $Button_WS1
        ShellExecute( @ProgramFilesDir & "\Internet Explorer\IEXPLORE.EXE", "http://w3.teamtrack.monsanto.com/tmtrack/tmtrack.dll?", "", "")
    Case $msg = $Button_WS2
        ShellExecute( @ProgramFilesDir & "\Internet Explorer\IEXPLORE.EXE", "http://w3.monsanto.com/asp/ts4.asp?tsid=4139", "", "")
    Case $msg = $Button_WS3
        ShellExecute( @ProgramFilesDir & "\Internet Explorer\IEXPLORE.EXE", "http://screechowl/magicsshd", "", "")  


  Case $msg = $Button_GO
      $Name = GUICtrlRead($PNInput)
      $MaName = IniRead("machines.ini","Machines",$Name,"Not found")
      MsgBox(0,"Info",$MaName,-1,$GUI)
    EndSelect
WEnd

I'm posting the whole code since I made several modifications. For example, changed C:\Program Files\ for @ProgramFilesDir, added controlID for the input and changed the name of the GO button.

I also suggest you use an ini file since it'll be a lot easier to use. Here's the ini:

[Machines]

1=mm01na2569

5=MM05NA2510

6=mm06na2555

8=mm08na2164

9=mm09na2013

Save it as machines.ini in the same dir as your script.

Hope it helps.

Share this post


Link to post
Share on other sites
scorch

excellent!!! thanks a lot man i really appreciate it! that works great.

i have a couple of more questions?

1. how do i get the minimize button located on the upper right hand side of regular windows so that i can restore and minimize the gui?

2. if i have different resolutions on different screens how can i make the GUI window resize along with all the buttons... so to i guess keep the same aspect ratio?

i tried the GUICtrlSetResizing(-1, $GUI_DOCKAUTO) but it only allow rezise of window independent of the buttons etc...

3. also would it be possible to go of a excel spread sheet. because the number of machines and is in the 500's and updated daily through the spread sheet and having to keep an .ini file up to date along with another spreadsheet would be kinda redundant. any advice would be appreciate.

thanks alot for the help guys :D

Edited by scorch

Share this post


Link to post
Share on other sites
scorch

also another question how do i go about taking the iniread output and input that into the remote desktop(mstsc.exe) field?

the whole purpose of the script below is a combo box input, so if i was to enter a letter into the field then press go it will go to the .ini file and see what is the corresponding computer name and then do a shell execute to bring up the rdc window and input that machine name and press connect. script im working with below (partial)

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <ComboConstants.au3>
#Include <GuiComboBox.au3>
#Include <GuiToolbar.au3>
#include <ButtonConstants.au3>

Global $Button_GO

$GUI = GUICreate("Data Operations QUICK KEYS", 435, 750, -1, -1, $WS_SIZEBOX + $WS_SYSMENU)

$PNInput = GuiCtrlCreateInput("Prog", 15, 700, 35, 20)

GUISetState()
While 1
    $msg = GUIGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop

    Case $msg = $Button_GO
      $Name = GUICtrlRead($PNInput)
      $MaName = IniRead("\\finch\ceregen_it\JEGONZ\Public\DB access\machines.ini","Machines",$Name,"No Machine Listed for this Program")
      ShellExecute("mstsc.exe")
        If WinWaitActive("Remote Desktop Connection", "", 30) = 1 Then
            sleep(1000)
            send($MaName)
            sleep(1000)
            send(ENTER)
        EndIf
    
    
      
    
    EndSelect
    
WEnd
Edited by scorch

Share this post


Link to post
Share on other sites
scorch

anybody???

Share this post


Link to post
Share on other sites
youknowwho4eva

excellent!!! thanks a lot man i really appreciate it! that works great.

i have a couple of more questions?

1. how do i get the minimize button located on the upper right hand side of regular windows so that i can restore and minimize the gui?

2. if i have different resolutions on different screens how can i make the GUI window resize along with all the buttons... so to i guess keep the same aspect ratio?

i tried the GUICtrlSetResizing(-1, $GUI_DOCKAUTO) but it only allow rezise of window independent of the buttons etc...

3. also would it be possible to go of a excel spread sheet. because the number of machines and is in the 500's and updated daily through the spread sheet and having to keep an .ini file up to date along with another spreadsheet would be kinda redundant. any advice would be appreciate.

thanks alot for the help guys :D

I can't remember #1, don't ever use it and couldn't find it quickly, try doing a search here on the forum.

#2, I had this issue with my latest gui. I set my gui size by stating $guiheight and $guiwidth and setting all my buttons and junk by these settings. Such as I set up how many rows and columns of things I wanted in my gui. I would set $guicolumn = $guiheight - 20/6. first column would be 10, the second column would be 10 + $guicolumn, third would be 10 + $guicolumn * 2 and so on.

#3 for the excel stuff look into the excel udf.


Giggity

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  

×