Jump to content

HEEEELP!


Floppy
 Share

Recommended Posts

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#

Link to comment
Share on other sites

  • Developers

just use this instead:

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

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...