Jump to content
Sign in to follow this  
tuur

Gui starterquestion

Recommended Posts

tuur

Hi,

Here's another one from the category "Basics" (but I haven't found my answer yet ...)

How do I close a GUI without completely exiting my script.

Uptill now I have worked around with hiding the thing >> GUISetState (@SW_HIDE)

But that cannot be the way to go about ... (can it?)

Arthur

Share this post


Link to post
Share on other sites
FireFox

Hi,

Here's another one from the category "Basics" (but I haven't found my answer yet ...)

How do I close a GUI without completely exiting my script.

Uptill now I have worked around with hiding the thing >> GUISetState (@SW_HIDE)

But that cannot be the way to go about ... (can it?)

Arthur

Hello,

Here is simple example :

#Include <GuiConstants.au3>;Constant for $GUI_EVENT_CLOSE
Opt("GuiOnEventMode",1);Active on event for gui

$win=GuiCreate("",500,500); your gui
GUISetOnEvent($GUI_EVENT_CLOSE,"_Exit");If you click on button for close gui go to _Exit function
GUISetState();Show gui


While 1; Make looping for the script no exit on the end and your gui will be visible
Sleep(250)
WEnd

Func _Exit();Exit with $GUI_EVENT_CLOSE
GuiSetState(@SW_HIDE,$win)
;Here you write what you want
EndFunc
Edited by FireFox

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
tuur

Hi FireFox,

Your solution is the one I have been using sofar.

My problem is that after I have collected my input via the GUI-Dialog, I want to close the GUI and go on with the rest of my script.

So instead of "Exit" I use "ExitLoop" .

At that point the GUI still lives (even though I have hidden it with the GUISetState (@SW_HIDE))

How do I completely kill the GUI and go on with the rest of the script???

Arthur

Share this post


Link to post
Share on other sites
FireFox

Hi FireFox,

Your solution is the one I have been using sofar.

My problem is that after I have collected my input via the GUI-Dialog, I want to close the GUI and go on with the rest of my script.

So instead of "Exit" I use "ExitLoop" .

At that point the GUI still lives (even though I have hidden it with the GUISetState (@SW_HIDE))

How do I completely kill the GUI and go on with the rest of the script???

Arthur

I don't understand really what you want to do,

completely kill the GUI

Perhaps this function would help you :

GUIDelete()


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.