Trax Posted February 20, 2021 Share Posted February 20, 2021 It is the first time I have tried GUISetOnEvent and it is failing. I have no idea why: #region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=SRT.ico #AutoIt3Wrapper_Outfile=Collection.exe #AutoIt3Wrapper_Res_Comment= #AutoIt3Wrapper_Res_Description= #AutoIt3Wrapper_Run_Au3Stripper=y #Au3Stripper_Parameters=/so #endregion ;**** Directives created by AutoIt3Wrapper_GUI **** AutoItSetOption("MouseCoordMode", 1) ; 0=Relative to Active Window, 1=Absolute Screen 2=Relitive to Client Area Opt("TrayMenuMode", 1) Opt("GUIOnEventMode", 1) ; Change to OnEvent mode OnAutoItExitRegister("Quit") #include-once #include <GUIConstantsEx.au3> #include <GUIListBox.au3> #include <Date.au3> #include <GUIConstants.au3> Msgbox(0,"",GUISetOnEvent($GUI_EVENT_CLOSE, "Quit")) Link to comment Share on other sites More sharing options...
Developers Jos Posted February 20, 2021 Developers Share Posted February 20, 2021 What is this script supposed to do without any gui definition? Did you look at the examples in the helpfile? 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 More sharing options...
Trax Posted February 22, 2021 Author Share Posted February 22, 2021 Yes I did and to be honest I didn't think it mattered where you opened the GUI as long as you opened it. I see the error of my ways. Thanks. Link to comment Share on other sites More sharing options...
Developers Jos Posted February 22, 2021 Developers Share Posted February 22, 2021 ..but there is no gui definition in the shown code at all!? 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 More sharing options...
Trax Posted February 22, 2021 Author Share Posted February 22, 2021 There was in my code. It was after the GUISetEvent. I didn't include it because I didn't think positioning was important. Link to comment Share on other sites More sharing options...
Nine Posted February 22, 2021 Share Posted February 22, 2021 You need to create a GUI before you try to set an event... “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Developers Jos Posted February 22, 2021 Developers Share Posted February 22, 2021 45 minutes ago, Trax said: There was in my code. It was after the GUISetEvent. I didn't include it because I didn't think positioning was important. You simply need to learn to open the helpfile and try to understand before posting these kind of questions, as the examples in there are quit elaborate! ..so study first and try to understand it..... but an GUI won't magically appear unless you code it. FrancescoDiMuro 1 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now