Sign in to follow this  
Followers 0
vishu

Not able to click on the button

3 posts in this topic

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,

Vishwas

Test.au3

AllStreamDetails.rar

Share this post


Link to post
Share on other sites



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
WEnd

You must use either OnEvent OR MessageLoop mode - you cannot mix them. :mellow:

M23

P.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. :P


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

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

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