Sign in to follow this  
Followers 0
Floppy

HEEEELP!

4 posts in this topic

Why doesn't show the message, when I click Ok button and Show Tray Icon is checked?

#include <GuiConstants.au3>
#Include <File.au3>
AutoItSetOption("TrayMenuMode",1)

$settings_gui=GUICreate("Settings",320,240)
GUICtrlCreateLabel("Language:",10,10,100,20)
$lang=GUICtrlCreateCombo("English",110,8,200,20)
$list_lang=_FileListToArray(@scriptdir&"\lang\","*.lang",1)
If Not @error Then
For $i=1 To UBound($list_lang) -1
$list_lang[$i] = StringReplace($list_lang[$i],".lang","")
GUICtrlSetData($lang,$list_lang[$i])
Next
Else
GUICtrlSetData($lang,"English","English")
EndIf

$run_with_windows=GUICtrlCreateCheckbox("Run automatically on Windows startup",10,30,300,20)
$show_tray=GUICtrlCreateCheckbox("Show Tray Icon",10,50,300,20)
$show_balloon=GUICtrlCreateCheckbox("Show Balloon Tips",10,70,300,20)
GUICtrlCreateGroup("Xxxxxxxxxxxxx",10,95,300,75)

$before=GUICtrlCreateRadio("",15,115,20,20)
$before_days=GUICtrlCreateInput("",35,115,45,20)
GUICtrlCreateUpdown($before_days)
GUICtrlCreateLabel("days before the expiration",85,118,220,20)

$every=GUICtrlCreateRadio("",15,140,20,20)
GUICtrlCreateLabel("Every",35,142,50,20)
$every_days=GUICtrlCreateInput("",65,140,45,20)
GUICtrlCreateUpdown($every_days)
GUICtrlCreateLabel("days",115,142,50,20)

GUICtrlCreateLabel("Xxxxxxxxxxxx:",10,177,100,20)
$version=GUICtrlCreateCombo("",110,175,200,20)
GUICtrlSetData($version,"Xxxxxxx|YYyyyyyyyyyyy","Xxxxxxx")

$ok=GUICtrlCreateButton("OK",10,210,150,20)
$cancel=GUICtrlCreateButton("Cancel",160,210,150,20)

$links_gui=GUICreate("List",320,200)
$list=GUICtrlCreateList("",10,10,300,160)
$add=GUICtrlCreateButton("Add",10,170,60,20)
$edit=GUICtrlCreateButton("Edit",70,170,60,20)
$remove=GUICtrlCreateButton("Remove",130,170,60,20)
$go=GUICtrlCreateButton("Go",190,170,60,20)
$load=GUICtrlCreateButton("Load",250,170,60,20)

$get_new=TrayCreateItem("Xxxxxxxxxxx")
$settings=TrayCreateItem("Settings")
$list=TrayCreateItem("List")
TrayCreateItem("")
$help=TrayCreateItem("Help")
$website=TrayCreateItem("Yyyyyyyyyyyyy")
$update=TrayCreateItem("Check updates")
$exit=TrayCreateItem("Exit")

While 1
    $m=TrayGetMsg()
    $mm=GUIGetMsg()
    
    Select
    Case $m=$exit
        ExitLoop
    Case $m=$settings
        GUISetState(@SW_SHOW,$settings_gui)
        GUISwitch($settings_gui)
    Case $m=$list
        GUISetState(@SW_SHOW,$links_gui)
        GUISwitch($links_gui)
    Case $mm=$ok
               If GUICtrlGetState($show_tray)=$GUI_CHECKED Then MsgBox(0,"","Enabled")
    EndSelect
WEnd

#sorry for english#

Share this post


Link to post
Share on other sites



just use this instead:

If GUICtrlread($show_tray) = $GUI_CHECKED Then MsgBox(0, "", "Enabled")

Jos

Thank you...Sorry but I didn't see the text:

Remarks

To obtain the value of the control see GUICtrlRead.

in the help-file.

Thanks and bye

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