Nahuel
Active Members-
Posts
1,807 -
Joined
-
Last visited
About Nahuel
- Birthday 01/31/1988
Profile Information
-
Member Title
To Err is human, to Arr is pirate.
-
Location
Argentina
-
WWW
http://www.internationalcafe.110mb.com
-
Interests
AutoIt...?
Recent Profile Visitors
1,182 profile views
Nahuel's Achievements
Universalist (7/7)
1
Reputation
-
Chiitus reacted to a post in a topic:
Detect MouseUp ?!
-
ControlClick how to use the Window
Nahuel replied to MasterMrK's topic in AutoIt GUI Help and Support
Yes, well I'm sorry. I do not understand what you meant to ask at all. -
ControlClick how to use the Window
Nahuel replied to MasterMrK's topic in AutoIt GUI Help and Support
Haha, what? "ask yourself"? I smell an online translator? -
You can find all this in the help file. It's 100% better to simply write the txt file. Look at this code: HotKeySet("{esc}",'_exit') $FilePath = '' $FirefoxClass = '[CLASS:FirefoxWindow]' $sOldTitle = '' $FileHandle = FileOpen($FilePath,1) While 1 $s_Title = WinGetTitle($FirefoxClass) If $s_Title <> $sOldTitle Then FileWriteLine($FileHandle,$s_Title) $sOldTitle = $s_Title EndIf Sleep(500); WEnd Func _exit() FileClose($FileHandle) Exit EndFunc What you need to do before you run that, is check Firefox properties with Autoit Window Info. (You find it at Start->All programs->Autoit v3->Autoit Window Info). You need to check Firefox's class under Basic Window Info. Once you have it, replace 'FirefoxWindow' in $FirefoxClass, since I made that up. Read the following in the help file: FileOpen FileWrite FileWriteLine Window Special Title Definition
-
And... why not write directly to a txt file? It needs to be on notepad?
-
[Fixed]Functions Not Executing
Nahuel replied to ecstatic's topic in AutoIt General Help and Support
Your problem could be here: Do $MonsterFind = PixelSearch( 148, 34, 800, 291, $monsters ) If Not @error Then MouseClick("right", $monsterfind[0], $Monsterfind[1]) EndIf Until @error <> 0 You see, @error's value is set back to 0 when calling a function. MouseClick is the one resetting @error, since it's unlikely it fails. So I suggest you replace that part with: $error=0 Do $MonsterFind = PixelSearch( 148, 34, 800, 291, $monsters ) $error=@error If Not $error Then MouseClick("right", $monsterfind[0], $Monsterfind[1]) EndIf Until $error <> 0 Try if that works. -
That's because you opened the file in Append mode. Open it with flag 2 isntead of 1 to erase previous content. What?
-
$dx = $x - $xss $dy = $y - $yss $dx = StringLeft($dx, 4) $dy = StringLeft($dy, 4 That leads me to believe that you are working with both numbers and strings... Perhaps that's where your problem is.
-
Look at the comments I made in the code. #include <GUIConstants.au3> #include <Array.au3> #include <File.au3> #include <TreeviewConstants.au3> #Include <GuiTreeView.au3> #include <WindowsConstants.au3> Opt("GUIOnEventMode", 1) Opt("MustDeclareVars", 1) Global $frmMain = GUICreate("Learning Treeview", 800, 480, (@DesktopWidth - 800)/2, (@DesktopHeight - 480)/2, -1, -1) GUISetOnEvent($GUI_EVENT_CLOSE, "ExitApp") Global $frmMainFileMenu = GUICtrlCreateMenu("File") Global $frmMainFileMenu_Exit = GUICtrlCreateMenuItem("Exit", $frmMainFileMenu) GUICtrlSetOnEvent($frmMainFileMenu_Exit, "ExitApp") Global $frmMain_FileTree = GUICtrlCreateTreeView(10, 20, 150, 330, BitOR($TVS_HASBUTTONS, $TVS_HASLINES, $TVS_LINESATROOT, $TVS_DISABLEDRAGDROP, $TVS_SHOWSELALWAYS), $WS_EX_CLIENTEDGE) Global $i, $iF, $aFiles, $aDirectorys, $aDirNames, $aFileNames ;Get all directorys in script directory $aDirectorys = _FileListToArray(@ScriptDir, '*.*', 2) _ArrayDelete($aDirectorys, 0) ;Loop through returned array and add directorys to treeview For $i = 0 To UBound($aDirectorys) -1 $aDirNames = GUICtrlCreateTreeViewItem($aDirectorys[$i],$frmMain_FileTree) GUICtrlSetOnEvent(-1,"_Show");------>HERE ;Get files in each folder $aFiles = _FileListToArray($aDirectorys[$i], "*", 1) _ArrayDelete($aFiles, 0) ;_ArrayDisplay($aFiles) ;Loop through returned file names and add file name to each directory For $iF = 0 To UBound($aFiles) -1 $aFileNames = GUICtrlCreateTreeViewItem($aFiles[$iF],$aDirNames) GUICtrlSetOnEvent(-1,"_Show");------>HERE Next Next ;GUICtrlSetOnEvent($frmMain_FileTree, "_Show")->WRONG GUISetState(@SW_SHOW) While 1 sleep(1000) WEnd Func ExitApp() Exit EndFunc Func _Show() MsgBox(0,"",GUICtrlRead(@GUI_CtrlId,1)) ;MsgBox(0, "", GUICtrlRead($frmMain_FileTree, 0)) ;MsgBox(0,"", _GUICtrlTreeView_GetText($frmMain_FileTree)) ;MsgBox(0,"", $frmMain_FileTree) ;MsgBox(0, "", "Working") EndFunc
-
Good point. I stand corrected.
-
Excellent example, but using $GUI_DISABLE not only is enough, but also makes it visible that the checkbox is read-only: #include <GUIConstantsEx.au3> #include <Constants.au3> GUICreate("Test", 128, 128) Global $chkTest = GUICtrlCreateCheckbox("Test", 8, 8, 48, 16) Global $btnToggle = GUICtrlCreateButton("Read Only", 8, 32, 96, 24) GUISetState() Global $uiMsg = 0 While $uiMsg <> $GUI_EVENT_CLOSE $uiMsg = GUIGetMsg() If $uiMsg = $btnToggle Then ToggleReadOnly($chkTest) EndIf Sleep(10) Wend Exit Func ToggleReadOnly($hWnd) Local $iStyle = GUICtrlGetState($hWnd) If BitAND($iStyle,$GUI_DISABLE) Then GUICtrlSetState($chkTest,$GUI_ENABLE) GUICtrlSetData($btnToggle, "Read Only") Else GUICtrlSetState($chkTest,$GUI_DISABLE) GUICtrlSetData($btnToggle, "Normal") EndIf EndFunc
-
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.
-
Try: GuiCtrlSetState($CheckBoxID,$GUI_DISABLE)
-
Running a script in a loop
Nahuel replied to keenharlequin's topic in AutoIt General Help and Support
Or... While 1 Sleep(100) If WinExists("Resolve Library Conflict") Then WinActivate("Resolve Library Conflict") Send("{DOWN}{ENTER}") EndIf Wend -
Sure. GuiCtrlCreateEdit()