Sign in to follow this  
Followers 0
igotandrew

Execute Function on Exit

5 posts in this topic

Well I don't have a gui, so my script runs off the system tray.

Is it possible to assign a function when someone clicks the icon and presses "exit"?

Share this post


Link to post
Share on other sites



Well I don't have a gui, so my script runs off the system tray.

Haha...Its not because you havnt GUI its because youve not loop like this :

While 1
    Sleep(250)
WEnd

And please search on forum before posting...

Cheers, 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

Thanks.

This looks like another "not looking thoroughly through help-file" incident.

Appreciate it.

Share this post


Link to post
Share on other sites

Well I don't have a gui, so my script runs off the system tray.

Is it possible to assign a function when someone clicks the icon and presses "exit"?

The help for TrayCreateMenu shows how you can turn off the default pause and exit menu items, and how to add your own exit item. You can then call a function when 'exit' is pressed which can do what you like.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

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