Sign in to follow this  
Followers 0
vishu

Not able to click on the button using mouse

2 posts in this topic

Hi,

Am facing problem is clicking the below buttons in the main window of my UI. The buttons which am not able to click using my mouse are:

- SetValue

- Exit

- Automate

Using the tab key on keyboard I can click but not through mouse.

Also When I click on Automate button I expect the Automate UI to be launched where as it is disappearing off.

Pl create an excel file by name "AllStreamDetails.xls" on your desktop and copy the below pasted script onto your desktop before checking the above stated problem. Thanks

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

#include <Excel.au3> ;library for doing excel operations

#include <GUIConstantsEx.au3>

#include <Misc.au3>

#include <Array.au3>

#include <file.au3>

#include-Once

;~ Opt("GUIOnEventMode", 1)

Opt("GUICoordMode", 1)

local $readedit,$mylist, $read

Global $currentlistselection,$hCombo, $chkbox, $module, $mod, $modulator, $modip, $OKappbutton,$infoitem, $MFN, $Affiliation

;$redvalue is the variable which accepts the 3 digit numerals for reading the row numbers from excel file

Global $redvalue = String(3),$oExcelclose,$sCellValue,$oExcel,$Startappbutton,$test,$setvaluebuttn,$Automateappbuttn,$msg,$exitappbuttn

Global $readfirstautoedit,$readsecondautoedit,$readthirdautoedit,$readfourthautoedit,$readfifthautoedit,$readsixthautoedit,$readseventhautoedit,$readeighthautoedit,$readninethautoedit,$readTenthautoedit

Global $copystream,$delay,$userdelay,$firstvalue,$secondvalue,$thirdvalue,$fourthvalue,$fifthvalue,$fifthvalue,$sixthvalue,$seventhvalue,$eigthvalue,$ninethvalue,$tenthvalue

Global $hCombo1,$hCombo2,$hCombo3,$hCombo4,$hCombo5,$hCombo6,$hCombo7,$hCombo8,$hCombo9,$hCombo10

;Checking to see if the AllStreamDetails.xls is already opened

If WinExists("Microsoft Excel - AllStreamDetails_1.xls") Then

MsgBox(0, "", "The Excel file is already open")

Else

;Reading the files from Desktop

;This file should already exist on the desktop

$sFilePath1 = @DesktopDir & "\AllStreamDetails_1.xls"

;Opening the Excel file

$oExcel = _ExcelBookOpen($sFilePath1)

EndIf

;Error handling in case the excel file is not existing

If @error = 1 Then

MsgBox(0, "Error!", "Unable to Create the Excel Object")

Exit

ElseIf @error = 2 Then

MsgBox(0, "Error!", "File does not exist - Please copy the AllStreamDetails.xls onto your desktop and try")

Exit;

EndIf

;Calling the GUI create function

createGUI()

Func createGUI()

$hGUI = GUICreate("TS-Automator",380,220)

GUICtrlCreateLabel("Enter the Modulator:",10,30,250,75)

;Combo box with default value as 172.24.18.114

$modulator = GUICtrlCreateCombo("172.24.18.114", 270, 20, 105, 40)

;Combo box with the range of Modulators

GUICtrlSetData(-1, "172.24.18.118|172.24.18.239","")

GUICtrlCreateLabel("Enter the Module:",10,55,250,75)

;Combo box with default value as EMM

$module = GUICtrlCreateCombo("[EMM]", 270, 45, 105, 40)

;Combo box with the range of Modules

GUICtrlSetData(-1, "[EWS]|[special Service]|[Parental Rating]|[Region ID]|[Version Change]|[LOGO]|[Frequency List]|[OAD]|[superimpose]|[Caption]|[EPG]|[Partial Stream]|[Audio Toggling]|[Others]","")

GUICtrlCreateLabel("Enter the Row Number of the stream to be loaded :",10,80,250,75)

Global $readedit = GUICtrlCreateInput(" ",270,75,75,20)

GUICtrlCreateLabel("Select the Frequency to be set from the list:",10,110,250,75)

;Combo box with default value as 473.000

Global $hCombo = GUICtrlCreateCombo("473.000", 270, 100, 75, 20)

;Combo box with range of frequencies

GUICtrlSetData(-1, "479.000|485.000|491.000|497.000|503.000|509.000|515.000|521.000|527.000|533.000|539.000|545.000|551.000|557.000|563.000|569.000|575.000|581.000|587.000|593.000|599.000|605.000|611.000|617.000|623.000|629.000|635.000|641.000|647.000|653.000|659.000|665.000|671.000|677.000|683.000|689.000|695.000|701.000|707.000|713.000|719.000|725.000|731.000|743.000|749.000|755.000|761.000|767.000", "") ; add other item snd set a new default

$Automateappbuttn = GUICtrlCreateButton("Automate",220,150,70)

;~ GUISetOnEvent(-1,'Automate')

$setvaluebuttn = GUICtrlCreateButton("Set Value",30,150,70,25)

;~ GUISetOnEvent(-1,"validate")

$exitappbuttn = GUICtrlCreateButton("Exit",120,150,70)

$helpmenu = GUICtrlCreateMenu("About")

;creating the info sub menu

$infoitem = GUICtrlCreateMenuItem("Info", $helpmenu)

;on selecting info from sub-menu this should point to About function

;GUICtrlSetOnEvent($infoitem, "About")

;Making the GUI visible to the end user

GUISetState()

;~ sleep(2000)

;~ While($msg <> $setvaluebuttn)

;~ readmodule()

;~ Search()

;~ WEnd

EndFunc

Func About()

GUICreate("About",320,145)

Local $Msgfonts

$Msgfonts = "Comic Sans MS"

GUISetFont(8, 500, 0, $Msgfonts)

GUICtrlCreateLabel("** Developed by Vishwas K S and Chandana Prakash of CSG-SQE ** ", 5, 30)

GUICtrlCreateLabel("** LG Soft India Pvt Ltd ** ", 5, 50)

GUICtrlCreateLabel("** Version : 0.0a ** ", 5, 70)

GUISetFont(7, 400, 0, $Msgfonts)

GUISetState()

$OKappbutton = GUICtrlCreateButton("OK", 120, 100, 80)

;~ GUICtrlSetOnEvent(-1, "Exitabout")

EndFunc

Func readmodule()

$modip = GUICtrlRead($modulator); read the Modulator IP chosen by the user.

;Activate the particular sheet in All Stream Details depending on the Modulator IP chosen by the user.

Select

Case $modip = "172.24.18.114"

_ExcelSheetActivate($oExcel, "ISDB-T Stream Details_Mod-114")

Case $modip = "172.24.18.118"

_ExcelSheetActivate($oExcel, "ISDB-T Stream Details_Mod-118")

Case $modip = "172.24.18.239"

_ExcelSheetActivate($oExcel, "ISDB-T Stream Details_Mod-239")

EndSelect

EndFunc

;This function validates the user entry of the Excel row number based on positive value calls the setvalue function

Func validate()

$redvalue = GUICtrlRead($readedit)

If(Int($redvalue)) Then

Initiate()

Else

MsgBox(16, "Error", "Please enter numeric values only")

GUICtrlSetData($readedit,"")

EndIf

EndFunc

Func Automate()

$hGUI = GUICreate("Automate",450,500)

GUICtrlCreateLabel("First Stream Path :",8,20,250,75)

GUICtrlCreateLabel("Second Stream Path :",8,60,250,75)

GUICtrlCreateLabel("Third Stream Path :",8,100,250,75)

GUICtrlCreateLabel("Fourth Stream Path :",8,140,250,75)

GUICtrlCreateLabel("Fifth Stream Path :",8,180,250,75)

GUICtrlCreateLabel("Sixth Stream Path :",8,220,250,75)

GUICtrlCreateLabel("Seventh Stream Path :",8,260,250,75)

GUICtrlCreateLabel("Eighth Stream Path :",8,300,250,75)

GUICtrlCreateLabel("Nineth Stream Path :",8,340,250,75)

GUICtrlCreateLabel("Tenth Stream Path :",8,380,250,75)

$readfirstautoedit = GUICtrlCreateInput("", 140,20,200,20)

$hCombo1 = GUICtrlCreateCombo("473.000", 360, 20, 75, 20)

;Combo box with range of frequencies

GUICtrlSetData(-1, "479.000|485.000|491.000|497.000|503.000|509.000|515.000|521.000|527.000|533.000|539.000|545.000|551.000|557.000|563.000|569.000|575.000|581.000|587.000|593.000|599.000|605.000|611.000|617.000|623.000|629.000|635.000|641.000|647.000|653.000|659.000|665.000|671.000|677.000|683.000|689.000|695.000|701.000|707.000|713.000|719.000|725.000|731.000|743.000|749.000|755.000|761.000|767.000", "") ; add other item snd set a new default

$readsecondautoedit = GUICtrlCreateInput("",140,60,200,20)

$hCombo2 = GUICtrlCreateCombo("473.000", 360, 60, 75, 20)

;Combo box with range of frequencies

GUICtrlSetData(-1, "479.000|485.000|491.000|497.000|503.000|509.000|515.000|521.000|527.000|533.000|539.000|545.000|551.000|557.000|563.000|569.000|575.000|581.000|587.000|593.000|599.000|605.000|611.000|617.000|623.000|629.000|635.000|641.000|647.000|653.000|659.000|665.000|671.000|677.000|683.000|689.000|695.000|701.000|707.000|713.000|719.000|725.000|731.000|743.000|749.000|755.000|761.000|767.000", "") ; add other item snd set a new default

$readthirdautoedit = GUICtrlCreateInput("",140,100,200,20)

$hCombo3 = GUICtrlCreateCombo("473.000", 360, 100, 75, 20)

;Combo box with range of frequencies

GUICtrlSetData(-1, "479.000|485.000|491.000|497.000|503.000|509.000|515.000|521.000|527.000|533.000|539.000|545.000|551.000|557.000|563.000|569.000|575.000|581.000|587.000|593.000|599.000|605.000|611.000|617.000|623.000|629.000|635.000|641.000|647.000|653.000|659.000|665.000|671.000|677.000|683.000|689.000|695.000|701.000|707.000|713.000|719.000|725.000|731.000|743.000|749.000|755.000|761.000|767.000", "") ; add other item snd set a new default

$readfourthautoedit = GUICtrlCreateInput("",140,140,200,20)

$hCombo4 = GUICtrlCreateCombo("473.000", 360, 140, 75, 20)

;Combo box with range of frequencies

GUICtrlSetData(-1, "479.000|485.000|491.000|497.000|503.000|509.000|515.000|521.000|527.000|533.000|539.000|545.000|551.000|557.000|563.000|569.000|575.000|581.000|587.000|593.000|599.000|605.000|611.000|617.000|623.000|629.000|635.000|641.000|647.000|653.000|659.000|665.000|671.000|677.000|683.000|689.000|695.000|701.000|707.000|713.000|719.000|725.000|731.000|743.000|749.000|755.000|761.000|767.000", "") ; add other item snd set a new default

$readfifthautoedit = GUICtrlCreateInput("",140,180,200,20)

$hCombo5 = GUICtrlCreateCombo("473.000", 360, 180, 75, 20)

;Combo box with range of frequencies

GUICtrlSetData(-1, "479.000|485.000|491.000|497.000|503.000|509.000|515.000|521.000|527.000|533.000|539.000|545.000|551.000|557.000|563.000|569.000|575.000|581.000|587.000|593.000|599.000|605.000|611.000|617.000|623.000|629.000|635.000|641.000|647.000|653.000|659.000|665.000|671.000|677.000|683.000|689.000|695.000|701.000|707.000|713.000|719.000|725.000|731.000|743.000|749.000|755.000|761.000|767.000", "") ; add other item snd set a new default

$readsixthautoedit = GUICtrlCreateInput("",140,220,200,20)

$hCombo6 = GUICtrlCreateCombo("473.000", 360, 220, 75, 20)

;Combo box with range of frequencies

GUICtrlSetData(-1, "479.000|485.000|491.000|497.000|503.000|509.000|515.000|521.000|527.000|533.000|539.000|545.000|551.000|557.000|563.000|569.000|575.000|581.000|587.000|593.000|599.000|605.000|611.000|617.000|623.000|629.000|635.000|641.000|647.000|653.000|659.000|665.000|671.000|677.000|683.000|689.000|695.000|701.000|707.000|713.000|719.000|725.000|731.000|743.000|749.000|755.000|761.000|767.000", "") ; add other item snd set a new default

$readseventhautoedit = GUICtrlCreateInput("",140,260,200,20)

$hCombo7 = GUICtrlCreateCombo("473.000", 360, 260, 75, 20)

;Combo box with range of frequencies

GUICtrlSetData(-1, "479.000|485.000|491.000|497.000|503.000|509.000|515.000|521.000|527.000|533.000|539.000|545.000|551.000|557.000|563.000|569.000|575.000|581.000|587.000|593.000|599.000|605.000|611.000|617.000|623.000|629.000|635.000|641.000|647.000|653.000|659.000|665.000|671.000|677.000|683.000|689.000|695.000|701.000|707.000|713.000|719.000|725.000|731.000|743.000|749.000|755.000|761.000|767.000", "") ; add other item snd set a new default

$readeighthautoedit = GUICtrlCreateInput("",140,300,200,20)

$hCombo8 = GUICtrlCreateCombo("473.000", 360, 300, 75, 20)

;Combo box with range of frequencies

GUICtrlSetData(-1, "479.000|485.000|491.000|497.000|503.000|509.000|515.000|521.000|527.000|533.000|539.000|545.000|551.000|557.000|563.000|569.000|575.000|581.000|587.000|593.000|599.000|605.000|611.000|617.000|623.000|629.000|635.000|641.000|647.000|653.000|659.000|665.000|671.000|677.000|683.000|689.000|695.000|701.000|707.000|713.000|719.000|725.000|731.000|743.000|749.000|755.000|761.000|767.000", "") ; add other item snd set a new default

$readninethautoedit = GUICtrlCreateInput("",140,340,200,20)

$hCombo9 = GUICtrlCreateCombo("473.000", 360, 340, 75, 20)

;Combo box with range of frequencies

GUICtrlSetData(-1, "479.000|485.000|491.000|497.000|503.000|509.000|515.000|521.000|527.000|533.000|539.000|545.000|551.000|557.000|563.000|569.000|575.000|581.000|587.000|593.000|599.000|605.000|611.000|617.000|623.000|629.000|635.000|641.000|647.000|653.000|659.000|665.000|671.000|677.000|683.000|689.000|695.000|701.000|707.000|713.000|719.000|725.000|731.000|743.000|749.000|755.000|761.000|767.000", "") ; add other item snd set a new default

$readTenthautoedit = GUICtrlCreateInput("",140,380,200,20)

$hCombo10 = GUICtrlCreateCombo("473.000", 360, 380, 75, 20)

;Combo box with range of frequencies

GUICtrlSetData(-1, "479.000|485.000|491.000|497.000|503.000|509.000|515.000|521.000|527.000|533.000|539.000|545.000|551.000|557.000|563.000|569.000|575.000|581.000|587.000|593.000|599.000|605.000|611.000|617.000|623.000|629.000|635.000|641.000|647.000|653.000|659.000|665.000|671.000|677.000|683.000|689.000|695.000|701.000|707.000|713.000|719.000|725.000|731.000|743.000|749.000|755.000|761.000|767.000", "") ; add other item snd set a new default

$MFN = GUICtrlCreateRadio("MFN", 290, 433, 120, 20)

GUICtrlGetState($MFN)

$Affiliation = GUICtrlCreateRadio("Affiliation", 290, 460, 120, 20)

GUICtrlGetState($Affiliation)

;Creating the delay button

GUICtrlCreateLabel("Delay",60,439,30,25)

Global $delay = GUICtrlCreateInput("", 90,433 ,30,20)

;~ ;Loop button checkbox

$chkbox = GUICtrlCreateCheckbox("Loop", 170, 433, 120, 20)

GUICtrlGetState($chkbox)

;Creating the Start button

$Startappbutton = GUICtrlCreateButton("Start",55,460,70)

;The object refers to the already defined Exit button

$exitappbuttn = GUICtrlCreateButton("Exit",165,460,70)

GUISetState()

EndFunc

Func getvalues()

;Global $firstvalue,$secondvalue,$thirdvalue,$fourthvalue,$fifthvalue,$fifthvalue,$sixthvalue,$seventhvalue,$eigthvalue,$ninethvalue,$tenthvalue

;reading the values from the text box for all the paths in Automate screen

$firstvalue = GUICtrlRead($readfirstautoedit)

$secondvalue = GUICtrlRead($readsecondautoedit)

$thirdvalue = GUICtrlRead($readthirdautoedit)

$fourthvalue = GUICtrlRead($readfourthautoedit)

$fifthvalue = GUICtrlRead($readfifthautoedit)

$sixthvalue = GUICtrlRead($readsixthautoedit)

$seventhvalue = GUICtrlRead($readseventhautoedit)

$eigthvalue = GUICtrlRead($readeighthautoedit)

$ninethvalue = GUICtrlRead($readninethautoedit)

$tenthvalue = GUICtrlRead($readTenthautoedit)

EndFunc

;Batch()

Func Batch()

if WinExists("Automate") Then

WinActivate("Automate")

$read = GUICtrlRead($chkbox);Check if the user has enabled the loop option

if $read = $GUI_CHECKED Then

While(1)

$userdelay = GUICtrlRead($delay);Read the delay entered by the user

getvalues()

If (Int($userdelay)) Then

msgbox(0,"Delay","User defined delay is:"& @CRLF & $userdelay,2)

;~ MsgBox(0, "", "The stream being here is: " & @CRLF & $firstvalue, 2)

;~ MsgBox(0, "", "The stream being here is: " & @CRLF & $secondvalue, 2)

;~ MsgBox(0, "", "The stream being here is: " & @CRLF & $thirdvalue, 2)

;~ MsgBox(0, "", "The stream being here is: " & @CRLF & $fourthvalue, 2)

;~ MsgBox(0, "", "The stream being here is: " & @CRLF & $fifthvalue, 2)

;~ MsgBox(0, "", "The stream being here is: " & @CRLF & $sixthvalue, 2)

;~ MsgBox(0, "", "The stream being here is: " & @CRLF & $seventhvalue, 2)

;~ MsgBox(0, "", "The stream being here is: " & @CRLF & $eigthvalue, 2)

;~ MsgBox(0, "", "The stream being here is: " & @CRLF & $ninethvalue, 2)

;~ MsgBox(0, "", "The stream being here is: " & @CRLF & $tenthvalue, 2)

setstream()

Else

MsgBox(16, "Error", "Please enter numeric values only")

EndIf

WEnd

Else

$userdelay = GUICtrlRead($delay);Read the delay entered by the user

getvalues()

If (Int($userdelay)) Then

msgbox(0,"Delay","User defined delay is:"& @CRLF & $userdelay,2)

Mobility()

Else

MsgBox(16, "Error", "Please enter numeric values only")

EndIf

EndIf

Endif

EndFunc

Func Initiate()

$char = GUICtrlRead($readedit);Read the row number

$modip = GUICtrlRead($modulator);Read the modulator chosen by the user

Select

Case $modip = "172.24.18.114"

;Checking for Invalid rows

If ($char <> 1 Or $char<>2 Or $char<>6 Or $char<>11 Or $char<>15 Or $char<>25 Or $char<>30 Or $char<>34 Or $char<>47 Or $char<>63 Or $char<>76 Or $char<>79 Or $char<>114 Or $char<>164 Or $char<>168 Or $char<>182 Or $char<189) Then

;Proceed if valid row number is chosen

WinActivate("Microsoft Excel - AllStreamDetails.xls")

$characteristics = _ExcelReadCell($oExcel,$char,4)

MsgBox(0,"Characteristics",$characteristics);Display the characteristics of the selected stream

setvalue()

Else

MsgBox(0,"Error","Invalid Row number selected")

ControlSetText("[CLASS:AutoIt v3 GUI]","","Edit3","")

sleep(3000)

readmodule()

EndIf

Case $modip = "172.24.18.118"

;Checking for Invalid rows

If ($char <> 1 Or $char<>2 Or $char<>7 Or $char<>17 Or $char<>21 Or $char<>31 Or $char<>36 Or $char<>40 Or $char<>53 Or $char<>69 Or $char<>87 Or $char<>90 Or $char<>122 Or $char<>175 Or $char<>179 Or $char<>195 Or $char<203) Then

;Proceed if valid row number is chosen.

WinActivate("Microsoft Excel - AllStreamDetails.xls")

$characteristics = _ExcelReadCell($oExcel,$char,4)

MsgBox(0,"Characteristics",$characteristics);Display the characteristics of the selected stream.

setvalue()

Else

MsgBox(0,"Error","Invalid Row number selected")

ControlSetText("[CLASS:AutoIt v3 GUI]","","Edit3","")

sleep(3000)

readmodule()

EndIf

Case $modip = "172.24.18.239"

;Checking for Invalid rows

If ($char <> 1 Or $char<>2 Or $char<>6 Or $char<>11 Or $char<>15 Or $char<>25 Or $char<>30 Or $char<>34 Or $char<>44 Or $char<>53 Or $char<>56 Or $char<>58 Or $char<>77 Or $char<>101 Or $char<>104 Or $char<>114 Or $char<118) Then

;Proceed if valid row number is chosen.

WinActivate("Microsoft Excel - AllStreamDetails.xls")

$characteristics = _ExcelReadCell($oExcel,$char,4)

MsgBox(0,"Characteristics",$characteristics);Display the characteristics of the selected stream.

setvalue()

Else

MsgBox(0,"Error","Invalid Row number selected")

ControlSetText("[CLASS:AutoIt v3 GUI]","","Edit3","")

sleep(3000)

readmodule()

EndIf

EndSelect

EndFunc

Func setvalue()

;~ ;If condition which reads the combobox to find the current selection

If GUICtrlRead($hCombo) <> $currentlistselection Then

;Reads the new selection value to $hCombo variable

$currentlistselection = GUICtrlRead($hCombo)

;MsgBox(0, "", "The Cell Value is: " & @CRLF & $currentlistselection, 2)

EndIf

;Activates the already opened Dektec application

WinActivate("DekTec StreamXpress - Transport-Stream Player")

;Moves the application to screen co-ordinates to 0,0

WinMove("DekTec StreamXpress - Transport-Stream Player", "", 0, 0)

;Delay needed to ensure the dektec in moved to the left top corner

Sleep(500)

;Reading the file -> $oExcel, Reading the row number -> $redvalue,Reading the column -> 2

If IsString($sCellValue)Then

$sCellValue = _ExcelReadCell($oExcel, $redvalue, 2)

MsgBox(0, "", "The Cell Value is: " & @CRLF & $sCellValue, 2)

ElseIf $sCellValue = "" Then

MsgBox(0, "", "The Cell number selected is invalid: ")

EndIf

;This commented lines reads the current stream being played by the streamer xpress app

;local $getstreamervalue

;$getstreamervalue = ControlGetText("DekTec StreamXpress - Transport-Stream Player", "", "Edit1")

;MsgBox(0, "", "The stream being played is: " & @CRLF & $getstreamervalue, 2)

;This commented lines reads the current frequency selected in the streamer xpress app

;local $getstreamerfreq

;$getstreamerfreq = ControlGetText("Streamer set Frequency is:", "", "Edit2")

;MsgBox(0, "", "The streamer frequency Value is: " & @CRLF & $getstreamerfreq, 2)

Local $setstream

;Button1 clicks the "open" button in Dektec app

ControlClick("DekTec StreamXpress - Transport-Stream Player", "", "Button1")

;Activating the UI which appears after clicking the "open" button

WinActivate("Open MPEG-2 Transport Stream")

;Delay provided to ensure the above window is launched

sleep(2000)

;Setting the stream path read from "$sCellValue"(Excel file) onto the Text box(Edit1) before the Open button

$setstream = ControlSetText ("Open MPEG-2 Transport Stream", " ", "Edit1", $sCellValue)

;MsgBox(0, "", "The Cell Value is: " & @CRLF & $sCellValue, 2)

;Delay provided to esnure the read stream path is copied onto the textbox(Edit1)

sleep(1000)

;Pressing the Open button(Button2) to ensure the selected stream is opened in streamer application

ControlClick("Open MPEG-2 Transport Stream", "", "Button2")

;MsgBox(0, "", "The stream being played is: " & @CRLF & $setstream, 2)

;WinActivate("DekTec StreamXpress - Transport-Stream Player")

WinActivate("TS-Automator")

local $getappfreq

;Reading the frequency from our application and storing in $getappfreq

$getappfreq = ControlGetText("TS-Automator", "", "Edit4")

MsgBox(0, "", "The application frequency Value is: " & @CRLF & $getappfreq, 2)

Global $setappfreq

;Copying the read frequency value to the streamer application(Edit6) text box

$setappfreq = ControlSetText ( "DekTec StreamXpress - Transport-Stream Player", " ", "Edit6", $getappfreq)

;Ensuring the playback is stopped in streamer application

ControlClick("DekTec StreamXpress - Transport-Stream Player", "", "Button21","left",2)

sleep(1000)

;Ensuring the play button is pressed to start the current selected stream playback

ControlClick("DekTec StreamXpress - Transport-Stream Player", "", "Button19","left",2)

EndFunc

Func setstream()

Local $i

Global $path[50] = [$firstvalue, $secondvalue,$thirdvalue,$fourthvalue,$fifthvalue,$sixthvalue,$seventhvalue,$eigthvalue,$ninethvalue,$tenthvalue]

for $i = 0 to 9 step 1

;Activates the already opened Dektec application

WinActivate("DekTec StreamXpress - Transport-Stream Player")

;Button1 clicks the "open" button in Dektec app

ControlClick("DekTec StreamXpress - Transport-Stream Player", "", "Button1")

;Activating the UI which appears after clicking the "open" button

WinActivate("Open MPEG-2 Transport Stream")

;Setting the stream path read from the Automate UI onto the Text box(Edit1) before the Open button

$copystream = ControlSetText ("Open MPEG-2 Transport Stream", " ", "Edit1", $path[$i])

MsgBox(0, "", "The stream being played is: " & @CRLF & $path[$i] , 2)

;~ sleep(1000)

ControlClick("Open MPEG-2 Transport Stream", "", "Button2")

;Ensuring the playback is stopped in streamer application

ControlClick("DekTec StreamXpress - Transport-Stream Player", "", "Button21","left",2)

;~ sleep(1000)

;Ensuring the play button is pressed to start the current selected stream playback

ControlClick("DekTec StreamXpress - Transport-Stream Player", "", "Button19","left",2)

;These lines read the current stream being played by the streamer xpress app

local $getstreamervalue

$getstreamervalue = ControlGetText("DekTec StreamXpress - Transport-Stream Player", "", "Edit1")

;~ MsgBox(0, "", "The stream being played is in streamer is: " & @CRLF & $getstreamervalue, 2)

sleep($userdelay)

Next

EndFunc

;This function is used to search the location of the module name entered by the user and highlight it.

Func Search()

Local $i, $concat

$mod = GUICtrlRead($module)

For $i = 2 To 205

$readmodule = _ExcelReadCell($oExcel,$i,1)

If($mod = $readmodule) Then

$concat = "A" & $i

$oExcel.Activesheet.Range($concat).select

;~ MsgBox(0,"Module read from the Stream details",$readmodule )

EndIf

Next

EndFunc

;~ Exitabout()

;~ Func Exitabout()

;~ ;deleting the launched About UI

;~ GUIDelete()

;~ EndFunc

Func Mobility()

Local $MFNRead,$AffRead

$MFNRead=GUICtrlRead($MFN)

$AffRead=GUICtrlRead($Affiliation)

If $MFNRead= $GUI_CHECKED AND $AffRead = $GUI_CHECKED Then

Msgbox(0,"Error","Check either MFN or Affiliation")

ElseIf $MFNRead = $GUI_CHECKED OR $AffRead = $GUI_CHECKED Then

$firstvalue = GUICtrlRead($readfirstautoedit)

;Activates the already opened Dektec application

WinActivate("DekTec StreamXpress - Transport-Stream Player")

;Button1 clicks the "open" button in Dektec app

ControlClick("DekTec StreamXpress - Transport-Stream Player", "", "Button1")

;Activating the UI which appears after clicking the "open" button

WinActivate("Open MPEG-2 Transport Stream")

;Setting the stream path read from the Automate UI onto the Text box(Edit1) before the Open button

$copystream = ControlSetText ("Open MPEG-2 Transport Stream", " ", "Edit1", $firstvalue)

MsgBox(0, "", "The stream being played is: " & @CRLF & $firstvalue , 2)

;~ sleep(1000)

ControlClick("Open MPEG-2 Transport Stream", "", "Button2")

;These lines read the current stream being played by the streamer xpress app

local $getstreamervalue

$getstreamervalue = ControlGetText("DekTec StreamXpress - Transport-Stream Player", "", "Edit1")

;~ MsgBox(0, "", "The stream being played is in streamer is: " & @CRLF & $getstreamervalue, 2)

for $j=0 To 9

Global $Class[50] = ["Edit2","Edit4","Edit6","Edit8","Edit10","Edit12","Edit14","Edit16","Edit18","Edit20"]

local $getMFNfreq

;Reading the frequency from our application and storing in $getappfreq

$getMFNfreq = ControlGetText("Automate", "", $Class[$j])

MsgBox(0,"Frequency",$getMFNfreq )

;Copying the read frequency value to the streamer application(Edit6) text box

Local $setappfreq = ControlSetText ( "DekTec StreamXpress - Transport-Stream Player", " ", "Edit6", $getMFNfreq)

;Ensuring the playback is stopped in streamer application

ControlClick("DekTec StreamXpress - Transport-Stream Player", "", "Button21","left",2)

;~ sleep(1000)

;Ensuring the play button is pressed to start the current selected stream playback

ControlClick("DekTec StreamXpress - Transport-Stream Player", "", "Button19","left",2)

sleep($userdelay)

Next

Else

setstream()

Endif

EndFunc

While 1

$msg = GUIGetMsg()

Select

Case $msg = $GUI_EVENT_CLOSE

WinActivate("Microsoft Excel - AllStreamDetails.xls")

_ExcelBookClose($oExcel,0)

Exit

Case $msg = $infoitem

About()

Case $msg = $setvaluebuttn

validate()

Case $msg = $Automateappbuttn

Automate()

Case $msg = $Startappbutton

getvalues()

Case $msg = $OKappbutton

GUIDelete()

Case $msg = $exitappbuttn

_ExcelBookClose($oExcel,0)

Exit

EndSelect

WEnd

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

It was the last value of your GUICtrlCreateLabel("Select the Frequency to be set from the list:",10,110,250,25)

that hide ctrl of buttons !

Please use autoit button for insert code ! Posted Image

Posted Image

Edited by wakillon

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

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