Emiel Wieldraaijer Posted August 10, 2013 Share Posted August 10, 2013 Hi, When i run the following script from Scite and press the restart button in the GUI it restarts the GUI.. but after compiling it .. the restart ends the GUI but it never restarts.. Can anyone else confirm this ? AutoIt 3.3.9.15 beta #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseUpx=n #AutoIt3Wrapper_Res_requestedExecutionLevel=asInvoker #AutoIt3Wrapper_Add_Constants=n #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <UpDownConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Parent = GuiCreate ("Test", 400, 400) $Tab = GUICtrlCreateTab(10, 10, 350, 300) $Tab1 = GUICtrlCreateTabItem("Tab1") $Restart = GuictrlCreateButton("Restart", 200,100,150,20) $Tab2 = GUICtrlCreateTabItem("Tab2") GUICtrlCreateTabItem("") $Menu = GUICtrlCreateMenu("help") GUISetState() While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then Exit If $msg = $Restart Then Run('"' & @AutoItExe & '"' & ' /AutoIt3ExecuteScript "' & @ScriptFullPath & '" /restart') Exit EndIf WEnd Best regards,Emiel Wieldraaijer Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 10, 2013 Moderators Share Posted August 10, 2013 Emiel Wieldraaijer,if you want the script to rerun when compiled then you need to tell Windows that - rather than asking it to run AutoIt3.exe and a script. Change the Run line to read:Run(@ScriptFullPath)and it should do as you expect when compiled - it certainly does for me. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Developers Solution Jos Posted August 10, 2013 Developers Solution Share Posted August 10, 2013 The default is changed and you now need to add #pragma statement to allow the use of /AutoIt3ExecuteScript on a compiled script: #pragma compile(AutoItExecuteAllowed, true) 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...
Emiel Wieldraaijer Posted August 10, 2013 Author Share Posted August 10, 2013 Thanks Melba32 and Jos Best regards,Emiel Wieldraaijer 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