Sign in to follow this  
Followers 0
shawnmstout

Advice on a better way to do this

11 posts in this topic

#1 ·  Posted (edited)

what is the best thing to use when you close out of a gui

before i was using below

While 1

If GUIGetMsg() = -3 Then

ExitLoop

EndIf

WEnd

GuiDelete("System Information")

Im running multiple forms controlled by the system tray so i cant just exit or it will close out the system tray also

once i close out of the form then i cant reopen it and i also cant close out of the system tray, it freezes

also if there is a way i would like to be able to open up multiple forms at once and switch in between, right now it seems like when 1 is open you cant do anything else inside of the system tray

SRC.zip

Edited by shawnmstout

Share this post


Link to post
Share on other sites



Are you looking for GUIDelete()? If you don't want to totally delete it, just hide it. Use GuiSetState(@SW_HIDE, handle to gui).


[font="Verdana"] [size="2"]"[/size][/font]Failure is not an option -- it comes packaged with Windows"[font="Verdana"][size="2"] Gecko Web Browser[/size][/font][font="Verdana"][size="2"], [/size][/font][font="Verdana"][size="2"]Yahtzee![/size][/font][font="Verdana"][size="2"], Toolbar Launcher (like RocketDock)[/size][/font][font="Verdana"][size="2"]Internet Blocker, Simple Calculator, Local Weather, Easy GDI+ GUI [/size][/font][font="Verdana"][size="2"]Triangle Solver, TCP File Transfer, [/size][/font][font="Verdana"][size="2"]Valuater's Autoit Wrappers[/size][/font][font="Verdana"][size="3"][size="2"][size="2"]OOP In AutoIt[/size][/size][/size][/font][font="Verdana"][size="2"][size="1"]Using Windows XP SP3, 1GB RAM, AMD Athlon Processor @ 2.1 GHzCheck me out at gadgets.freehostrocket.com[/size][/size][/font]

Share this post


Link to post
Share on other sites

Are you looking for GUIDelete()? If you don't want to totally delete it, just hide it. Use GuiSetState(@SW_HIDE, handle to gui).

i probably should of mentioned that i tried that also,

GuiSetState(@SW_HIDE, "Memory Status")

dont get me wrong, both work and you dont see it , but then once it is hidden or deleted, you cant choose anything from the system tray or close it out

Share this post


Link to post
Share on other sites

i probably should of mentioned that i tried that also,

GuiSetState(@SW_HIDE, "Memory Status")

dont get me wrong, both work and you dont see it , but then once it is hidden or deleted, you cant choose anything from the system tray or close it out

well it looks like the only one causing issues is memstats.au3

Share this post


Link to post
Share on other sites

So far, I have come up with a little bit. I know that the script is getting caught somewhere not in the MemStats function because when I put a messagebox at the beginning of the function and try to run it, I get a messagebox the first time, but not the second time.


[font="Verdana"] [size="2"]"[/size][/font]Failure is not an option -- it comes packaged with Windows"[font="Verdana"][size="2"] Gecko Web Browser[/size][/font][font="Verdana"][size="2"], [/size][/font][font="Verdana"][size="2"]Yahtzee![/size][/font][font="Verdana"][size="2"], Toolbar Launcher (like RocketDock)[/size][/font][font="Verdana"][size="2"]Internet Blocker, Simple Calculator, Local Weather, Easy GDI+ GUI [/size][/font][font="Verdana"][size="2"]Triangle Solver, TCP File Transfer, [/size][/font][font="Verdana"][size="2"]Valuater's Autoit Wrappers[/size][/font][font="Verdana"][size="3"][size="2"][size="2"]OOP In AutoIt[/size][/size][/size][/font][font="Verdana"][size="2"][size="1"]Using Windows XP SP3, 1GB RAM, AMD Athlon Processor @ 2.1 GHzCheck me out at gadgets.freehostrocket.com[/size][/size][/font]

Share this post


Link to post
Share on other sites

So far, I have come up with a little bit. I know that the script is getting caught somewhere not in the MemStats function because when I put a messagebox at the beginning of the function and try to run it, I get a messagebox the first time, but not the second time.

yes its like something is preventing it to run a 2nd time or its just causing a loop or something similar

Share this post


Link to post
Share on other sites

This doesn't fix your problem at all, but I see two things. You don't need to use the Case 0. You also should use Switch instead of Select because it is faster. Just some suggestions. Still can't figure out your problem.


[font="Verdana"] [size="2"]"[/size][/font]Failure is not an option -- it comes packaged with Windows"[font="Verdana"][size="2"] Gecko Web Browser[/size][/font][font="Verdana"][size="2"], [/size][/font][font="Verdana"][size="2"]Yahtzee![/size][/font][font="Verdana"][size="2"], Toolbar Launcher (like RocketDock)[/size][/font][font="Verdana"][size="2"]Internet Blocker, Simple Calculator, Local Weather, Easy GDI+ GUI [/size][/font][font="Verdana"][size="2"]Triangle Solver, TCP File Transfer, [/size][/font][font="Verdana"][size="2"]Valuater's Autoit Wrappers[/size][/font][font="Verdana"][size="3"][size="2"][size="2"]OOP In AutoIt[/size][/size][/size][/font][font="Verdana"][size="2"][size="1"]Using Windows XP SP3, 1GB RAM, AMD Athlon Processor @ 2.1 GHzCheck me out at gadgets.freehostrocket.com[/size][/size][/font]

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

This doesn't fix your problem at all, but I see two things. You don't need to use the Case 0. You also should use Switch instead of Select because it is faster. Just some suggestions. Still can't figure out your problem.

what does case 0 do?

heh just noticed your from ohio, i live about 5 minutes away from the border of ohio

Edited by shawnmstout

Share this post


Link to post
Share on other sites

attached is the current memstats.au3

memstats.au3

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

Case 0 doesn't do much of anything. In your script it is unneeded and I dont' think it is ever needed.

Yeah. I live a little bit north of Cincinnati. Maybe 10 minutes Northeast.

Edited by dantay9

[font="Verdana"] [size="2"]"[/size][/font]Failure is not an option -- it comes packaged with Windows"[font="Verdana"][size="2"] Gecko Web Browser[/size][/font][font="Verdana"][size="2"], [/size][/font][font="Verdana"][size="2"]Yahtzee![/size][/font][font="Verdana"][size="2"], Toolbar Launcher (like RocketDock)[/size][/font][font="Verdana"][size="2"]Internet Blocker, Simple Calculator, Local Weather, Easy GDI+ GUI [/size][/font][font="Verdana"][size="2"]Triangle Solver, TCP File Transfer, [/size][/font][font="Verdana"][size="2"]Valuater's Autoit Wrappers[/size][/font][font="Verdana"][size="3"][size="2"][size="2"]OOP In AutoIt[/size][/size][/size][/font][font="Verdana"][size="2"][size="1"]Using Windows XP SP3, 1GB RAM, AMD Athlon Processor @ 2.1 GHzCheck me out at gadgets.freehostrocket.com[/size][/size][/font]

Share this post


Link to post
Share on other sites

found the solution

Opt("TrayOnEventMode",0)

at the end of the function

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