vishu Posted May 28, 2010 Share Posted May 28, 2010 Hi, I have attached the script which opens an excel file and read the data, but the problem I have buttons added in my application and when I try to click on it.It is not allowing me to click no action at all. Note: I have uploaded the .xls file in zipped format. Just copy both the files onto you desktop and try running the script the buttons won't respond. Guidance needed pl. Thanks, VishwasTest.au3AllStreamDetails.rar Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 28, 2010 Moderators Share Posted May 28, 2010 vishu,You start your code with:Opt("GUIOnEventMode", 1)but set no event traps with GUICtrlSetOnEvent and end by polling GUIGetMsg:; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEndYou must use either OnEvent OR MessageLoop mode - you cannot mix them. M23P.S. You can use both modes in the same script - but you have to take great care to only use one mode at a time and I would not recommend it. Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
99ojo Posted May 28, 2010 Share Posted May 28, 2010 Hi, changes: ;Opt("GUIOnEventMode", 1) Func createGUI() Global $hGUI = GUICreate("Input",350,150) GUICtrlCreateLabel("Enter the Row Number of the stream to be loaded :",10,20,250,75) Global $readedit = GUICtrlCreateInput(" ",270,15,75,20) GUICtrlCreateLabel("Select the Frequency to be set from the list:",10,50,250,75) Global $hCombo = GUICtrlCreateCombo("473", 270, 50, 75, 20) GUICtrlSetData(-1, "479|485|491|497|503|509|515|521|527|533|539|545|551|557|563|569|575|581|587|593|599|605|611|617|623|629|635|641|647|653|659|665|671|677|683|689|695|701|707|713|719|725|731|743|749|755|761|767", "") ; add other item snd set a new default Global $setvaluebuttn = GUICtrlCreateButton("Set Value",90,95,70) ;GUISetOnEvent(-1,"validate") Global $exitappbuttn = GUICtrlCreateButton("Exit",190,95,70) GUISetState() GUISetState(@SW_SHOW) EndFunc While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $setvaluebuttn validate () Case $msg = $exitappbuttn Exit EndSelect WEnd You should resort your code in a better way. It looks a little bit messy with your formats and coding style...... ;-)) Stefan Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now