Sign in to follow this  
Followers 0
Info

$Button_7... List_5...

11 posts in this topic

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.

Share this post


Link to post
Share on other sites



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.

Share this post


Link to post
Share on other sites

The "GuiCtrlSetData($List_5,Guictrlread($List_5) & '|' & $NextsetofLInes)" isn't working.

And the GuiGetMsg isn't working for me too.

Share this post


Link to post
Share on other sites

Show how you tried to use GuiGetMsg and someone will set you straight.



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

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

Share this post


Link to post
Share on other sites

I tried:

$msg = GUIGetMsg()
If $msg = $Button_X Then MsgBox(0, "", "")

And it do nothing.

Share this post


Link to post
Share on other sites

Open the damn Help file and see the examples for GUIGetMsg and GUICtrlCreateButton.


"be smart, drink your wine"

Share this post


Link to post
Share on other sites

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.


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

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

Share this post


Link to post
Share on other sites

#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.

Share this post


Link to post
Share on other sites

#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



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

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

Share this post


Link to post
Share on other sites

It works, but when I press "OK" in the MsgBox, It exits the script.

Help?

Share this post


Link to post
Share on other sites

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.

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