Info Posted July 15, 2007 Share Posted July 15, 2007 How can I do that if: "$button7 is clicked then ShellExecute (BLA BLA)"? And how can I do other lines is "List_5"? I tried that: $List_5 = GuiCtrlCreateList( "Line" & @CRLF & "Line" & @CRLF & "Line", *Cordinate*, *Cordinate*, *Cordinate*, *Cordinate*) And it don't worked, its giving me this in the List_5: LineLineLine Help please. Link to comment Share on other sites More sharing options...
martin Posted July 15, 2007 Share Posted July 15, 2007 How can I do that if: "$button7 is clicked then ShellExecute (BLA BLA)"? And how can I do other lines is "List_5"? I tried that: $List_5 = GuiCtrlCreateList( "Line" & @CRLF & "Line" & @CRLF & "Line", *Cordinate*, *Cordinate*, *Cordinate*, *Cordinate*) And it don't worked, its giving me this in the List_5: LineLineLine Help please. You can't create multiple lines in GuiCtrlCreateList as far as I know, but the way you tried is quite logical. If you want to add lines then use GuiCtrlSetData($List_5,"line1|line2|line3") to clear the list use an empty string. to add to the list use GuiCtrlSetData($List_5,Guictrlread($List_5) & '|' & $NextsetofLInes) adding @CRLF won't work. For the button click you need to look in the help for GuiGetMsg. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
Info Posted July 16, 2007 Author Share Posted July 16, 2007 The "GuiCtrlSetData($List_5,Guictrlread($List_5) & '|' & $NextsetofLInes)" isn't working. And the GuiGetMsg isn't working for me too. Link to comment Share on other sites More sharing options...
BigDod Posted July 16, 2007 Share Posted July 16, 2007 Show how you tried to use GuiGetMsg and someone will set you straight. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
Info Posted July 16, 2007 Author Share Posted July 16, 2007 I tried: $msg = GUIGetMsg() If $msg = $Button_X Then MsgBox(0, "", "") And it do nothing. Link to comment Share on other sites More sharing options...
Siao Posted July 16, 2007 Share Posted July 16, 2007 Open the damn Help file and see the examples for GUIGetMsg and GUICtrlCreateButton. "be smart, drink your wine" Link to comment Share on other sites More sharing options...
BigDod Posted July 17, 2007 Share Posted July 17, 2007 I tried: $msg = GUIGetMsg() If $msg = $Button_X Then MsgBox(0, "", "") And it do nothing.I meant show us your whole script, one line shows nothing. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
Info Posted July 17, 2007 Author Share Posted July 17, 2007 #include <GuiConstants.au3> GuiCreate("MyGUI", 296, 216,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $Slider_1 = GuiCtrlCreateSlider(10, 170, 130, 40) $Button_2 = GuiCtrlCreateButton("BlaBla", 160, 170, 120, 30) $List_3 = GuiCtrlCreateList("BlaBla", 20, 110, 110, 58) $Label_4 = GuiCtrlCreateLabel("BlaBla", 20, 80, 40, 20) $Button_5 = GuiCtrlCreateButton("BlaBla", 170, 120, 100, 20) $Button_6 = GuiCtrlCreateButton("BlaBla", 170, 70, 100, 20) $Button_7 = GuiCtrlCreateButton("BlaBla", 170, 20, 100, 20) $Checkbox_8 = GuiCtrlCreateCheckbox("BlaBla", 20, 50, 110, 20) $Pic_9 = GuiCtrlCreatePic("BlaBla", 20, 10, 110, 30) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ;;; EndSelect WEnd Exit This is the dam script, Now how can I s\do that If I click on "$Button_5" then it will give me a MsgBox? Please help me. Link to comment Share on other sites More sharing options...
BigDod Posted July 17, 2007 Share Posted July 17, 2007 #include <GuiConstants.au3> GuiCreate("MyGUI", 296, 216,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $Slider_1 = GuiCtrlCreateSlider(10, 170, 130, 40) $Button_2 = GuiCtrlCreateButton("BlaBla", 160, 170, 120, 30) $List_3 = GuiCtrlCreateList("BlaBla", 20, 110, 110, 58) $Label_4 = GuiCtrlCreateLabel("BlaBla", 20, 80, 40, 20) $Button_5 = GuiCtrlCreateButton("BlaBla", 170, 120, 100, 20) $Button_6 = GuiCtrlCreateButton("BlaBla", 170, 70, 100, 20) $Button_7 = GuiCtrlCreateButton("BlaBla", 170, 20, 100, 20) $Checkbox_8 = GuiCtrlCreateCheckbox("BlaBla", 20, 50, 110, 20) $Pic_9 = GuiCtrlCreatePic("BlaBla", 20, 10, 110, 30) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Case $msg = $Button_5 MsgBox(0,"","You hit button_5") ExitLoop Case Else ;;; EndSelect WEnd Exit Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
Info Posted July 17, 2007 Author Share Posted July 17, 2007 It works, but when I press "OK" in the MsgBox, It exits the script. Help? Link to comment Share on other sites More sharing options...
Reaper HGN Posted July 17, 2007 Share Posted July 17, 2007 It works, but when I press "OK" in the MsgBox, It exits the script.Help?It exits because you tell it to exit using Exitloop. You will have to put more code in the case statement if you want it to do something. Exitloop will kick it out of the loop. 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