Sign in to follow this  
Followers 0
JRSmile

mal wieder einer der Hilfe braucht!

7 posts in this topic

#1 ·  Posted (edited)

#include <GuiConstants.au3>
#include <Constants.au3>
#NoTrayIcon
Opt("GUICloseOnESC", 1)        ;1=ESC  closes, 0=ESC won't close
Opt("GUIDataSeparatorChar","|");"|" is the default
Opt("GUIOnEventMode", 1)      ;0=disabled, 1=OnEvent mode enabled
Opt("MustDeclareVars", 0)      ;0=no, 1=require pre-declare
Opt("OnExitFunc","OnAutoItExit");"OnAutoItExit" called
Opt("RunErrorsFatal", 0)      ;1=fatal, 0=silent set @error
Opt("TrayMenuMode",1)          ;0=append, 1=no default menu, 2=no automatic check, 4=menuitemID  not return
Opt("TrayOnEventMode",1)    ;0=disable, 1=enable
GUISetOnEvent($GUI_EVENT_CLOSE,"call_event_close")
Func call_event_close()
    Exit
EndFunc  ;==>call_event_close
$gui_handle_main = GuiCreate("Econcern Project Management", 1024, 744,(@DesktopWidth-1024)/2,0)
$Treeview_1 = GuiCtrlCreateTreeview(20, 30, 440, 500)
$List_16 = GuiCtrlCreateList("", 540, 480, 200, 94)
$List_17 = GuiCtrlCreateList("", 810, 480, 200, 94)
$Combo_18 = GuiCtrlCreateCombo("", 740, 520, 70, 21)
$Group_19 = GuiCtrlCreateGroup("Projects", 10, 10, 460, 560)
$Edit_21 = GuiCtrlCreateEdit("", 550, 30, 460, 130)
$Group_22 = GuiCtrlCreateGroup("Project and Task options", 480, 10, 540, 560)
$Button_23 = GuiCtrlCreateButton("<<", 740, 500, 70, 20)
$Button_24 = GuiCtrlCreateButton(">>", 740, 540, 70, 20)
$Slider_26 = GuiCtrlCreateSlider(550, 160, 460, 40)
$Label_27 = GuiCtrlCreateLabel("Discription:", 490, 30, 60, 20)
$Label_28 = GuiCtrlCreateLabel("Users:", 490, 500, 60, 20)
$Label_29 = GuiCtrlCreateLabel("Progress:", 490, 160, 60, 20)
$Label_30 = GuiCtrlCreateLabel("Status:", 490, 220, 40, 20)
$Combo_31 = GuiCtrlCreateCombo("", 620, 220, 100, 21)
$Button_32 = GuiCtrlCreateButton("< user details", 740, 480, 70, 20)
$Listview_33 = GuiCtrlCreateListview("", 20, 600, 990, 100)
$Group_34 = GuiCtrlCreateGroup("User details", 10, 580, 1010, 160)
$Button_35 = GuiCtrlCreateButton("create Project", 160, 540, 80, 20)
$Button_36 = GuiCtrlCreateButton("delete Project", 240, 540, 80, 20)
$Button_37 = GuiCtrlCreateButton("create Task", 320, 540, 70, 20)
$Button_38 = GuiCtrlCreateButton("delete Task", 390, 540, 70, 20)
$Button_39 = GuiCtrlCreateButton("create Client", 20, 540, 70, 20)
$Button_40 = GuiCtrlCreateButton("new", 20, 710, 80, 20)
$Button_41 = GuiCtrlCreateButton("edit", 110, 710, 80, 20)
$Button_42 = GuiCtrlCreateButton("delete", 200, 710, 80, 20)
$Date_45 = GuiCtrlCreateDate("", 620, 260, 100, 20)
$Label_46 = GuiCtrlCreateLabel("Start date:", 490, 260, 50, 20)
$Label_47 = GuiCtrlCreateLabel("End date:", 490, 300, 50, 20)
$Date_48 = GuiCtrlCreateDate("", 620, 300, 100, 20)
$Label_50 = GuiCtrlCreateLabel("expected time taken:", 490, 340, 100, 20)
$Input_51 = GuiCtrlCreateInput("", 620, 340, 100, 20)
$Group_52 = GuiCtrlCreateGroup("", 480, 205, 540, 270)
$Progress_53 = GuiCtrlCreateProgress(560, 200, 440, 10)
$Label_54 = GuiCtrlCreateLabel("priority:", 490, 380, 40, 20)
$Combo_55 = GuiCtrlCreateCombo("", 620, 380, 100, 21)
$Label_56 = GuiCtrlCreateLabel("phase:", 490, 420, 60, 20)
$Combo_57 = GuiCtrlCreateCombo("", 620, 420, 100, 21)
$Button_61 = GuiCtrlCreateButton("create TXT", 750, 710, 80, 20)
$Button_62 = GuiCtrlCreateButton("create CSV", 840, 710, 80, 20)
$Button_63 = GuiCtrlCreateButton("create JPG", 930, 710, 80, 20)
$Button_64 = GuiCtrlCreateButton("delete Client", 90, 540, 70, 20)
GuiSetState(@SW_SHOW, $gui_handle_main)
While 1
    sleep(10000)
WEnd

i have a little question, very often i write code which should work, but if i use it nothing happens, i think something is wrong with the on event handling, could someone be so kind and explain me how i get this to work.

EDIT:

i know that there aren't any functions which parse variables ore anything

MY problem is simply the on event handling and Why the close button doesn't work.

kind regards, JR

Edited by JRSmile

$a=StringSplit("547275737420796F757220546563686E6F6C75737421","")For $b=1 To UBound($a)+(-1*-1*-1)step(2^4/8);&$b+=1*2/40*µ&Asc(4)Assign("c",Eval("c")&Chr(Dec($a[$b]&$a[$b+1])))''Chr("a")&"HI"Next;time_U&r34d,ths,U-may=get$the&c.l.u.e;b3st-regards,JRSmile;MsgBox(0x000000,"",Eval("c"));PiEs:d0nt+*b3.s4d.4ft3r.1st-try:-)

Share this post


Link to post
Share on other sites



is that you whole code?

while 1
sleep (10000)
wend
your prog can't do anything

try this

while 1
$msg = guigetmsg()
select
case $msg = $Button_61
;do whatever you like, e.g.
filewrite("some.txt", "some text")
case $msg = $Button_62
;do something else
endselect
wend

if that is what you need, here you are if not: ask a better question and/or post your whole code here

Share this post


Link to post
Share on other sites

hmm???

i think it would work with GUIsetOnEvent, or not?


$a=StringSplit("547275737420796F757220546563686E6F6C75737421","")For $b=1 To UBound($a)+(-1*-1*-1)step(2^4/8);&$b+=1*2/40*µ&Asc(4)Assign("c",Eval("c")&Chr(Dec($a[$b]&$a[$b+1])))''Chr("a")&"HI"Next;time_U&r34d,ths,U-may=get$the&c.l.u.e;b3st-regards,JRSmile;MsgBox(0x000000,"",Eval("c"));PiEs:d0nt+*b3.s4d.4ft3r.1st-try:-)

Share this post


Link to post
Share on other sites

hmm???

i think it would work with GUIsetOnEvent, or not?

yes it will but you need to use
GUISetOnEvent($GUI_EVENT_CLOSE,"call_event_close")

after the gui creation not before B)

Share this post


Link to post
Share on other sites

thanks guy ...... sometimes there are errors i don't even see if font size 100 is default ...

you made my day.


$a=StringSplit("547275737420796F757220546563686E6F6C75737421","")For $b=1 To UBound($a)+(-1*-1*-1)step(2^4/8);&$b+=1*2/40*µ&Asc(4)Assign("c",Eval("c")&Chr(Dec($a[$b]&$a[$b+1])))''Chr("a")&"HI"Next;time_U&r34d,ths,U-may=get$the&c.l.u.e;b3st-regards,JRSmile;MsgBox(0x000000,"",Eval("c"));PiEs:d0nt+*b3.s4d.4ft3r.1st-try:-)

Share this post


Link to post
Share on other sites

thanks guy ...... sometimes there are errors i don't even see if font size 100 is default ...

you made my day.

just put font size 200 !!!

Share this post


Link to post
Share on other sites

:-)


$a=StringSplit("547275737420796F757220546563686E6F6C75737421","")For $b=1 To UBound($a)+(-1*-1*-1)step(2^4/8);&$b+=1*2/40*µ&Asc(4)Assign("c",Eval("c")&Chr(Dec($a[$b]&$a[$b+1])))''Chr("a")&"HI"Next;time_U&r34d,ths,U-may=get$the&c.l.u.e;b3st-regards,JRSmile;MsgBox(0x000000,"",Eval("c"));PiEs:d0nt+*b3.s4d.4ft3r.1st-try:-)

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