MarcelloSoft Posted March 22 Posted March 22 (edited) Issue: I run a script with F5 from the SciTE editor, then if I press F1 it starts another instance of that same script if the first is still alive it doesn't matter which version of the SciTE editor, it doesn't matter what kind of script, GUI or not GUI. Now I'm using the latest version of SciTE, integrated with the autoit-v3-setup.exe (v3.3.16.1) installation I'm using AutoIt since longtime but never noticed this strange behaviour. Yet this was happening also with SciTE version 4.4.6 (now uninstalled). I wonder whether it is by design and if it can be disabled. It doesn't matter what kind of script, GUI or not GUI, for example it could be this script: Type 1: While True Sleep(100) WEnd or a script with a simple dialog Type 2: MsgBox($MB_OK, "AutoIt Version", "AutoIt Version: " & @AutoItVersion) Some facts about this issue: - F1 works normally if no script is running that was started with F5 - If the script is a series of dialogs (type 2) (but it could be mixed with other code in between), then the Help appears right after all the dialog and the application itself close. - If instead with F5 I run the first kind of script (type 1), then F1 doesn't work at all. In fact if I kill such instance of the script, then after that the help doesn't appear. If I press F1 again the Help appears as it should normally do. - If I ran the compiled script not from the SciTE editor, for example the command line. then F1 from the SciTE editor works as it should normally do. - A curious fact: I run many script with of type 2 (the first started with F5, while all the others started with F1). Then I go killing the last instance of AutoIt.exe, and then from the editor I press F1... what happens is that it opens the Help normally and it doesn't start any other instance of the script. This proves that this weird behaviour only happens the first time I press F1 after having pressed F5. And I think this could help pinpoint where the problem lies. - If I have two tabs in the editor with two scripts A and B, and I press F5 from A launching A, then I change tab, i.e. script B, and I press F1, then the instance that is launched is an instance of A, not of B. I have not found in the forum other people talking about this problem, which for me is very very annoying (I had to use _singleton in my script in order to be able to work). An automation script running without any warning could be a quite dangerous matter, it should be fixed soon. Edited March 22 by MarcelloSoft
Nine Posted March 22 Posted March 22 I cannot replicate your issue but I am running full version of SciTE, not the light version integrated to AutoIt installer. There is multiple advantages to use full version, so just download and install the full version... “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) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy
pixelsearch Posted March 22 Posted March 22 Just now, MarcelloSoft said: I have not found in the forum other people talking about this problem I have the same problem (Scite-Lite) . Unfortunately it will never be fixed, see this Track ticket closed 17years ago. Just now, MarcelloSoft said: (I had to use _singleton in my script in order to be able to work). I do same (more and more) using a personal function named _Doubleton , which prevents the script to be run twice : #include <MsgBoxConstants.au3> If _Doubleton("AutoIt - Clipboard Translate v14") Then Exit ; script already launched + user wants to quit ; ... Func _Doubleton($sTitle) If WinExists($sTitle) Then Local $iChoice = Msgbox(BitOr($MB_YESNO, $MB_DEFBUTTON2, $MB_ICONQUESTION, $MB_TOPMOST), $sTitle, _ "This script is already running. Launch another instance ?") If $iChoice = $IDNO Then Return True EndIf AutoItWinSetTitle($sTitle) ; remember the AutoIt window is always hidden EndFunc ;==>_Doubleton argumentum 1 "I think you are searching a bug where there is no bug..."
MarcelloSoft Posted March 22 Author Posted March 22 51 minutes ago, pixelsearch said: I have the same problem (Scite-Lite) . Unfortunately it will never be fixed, see this Track ticket closed 17years ago. Oh wow. Okay. Never say never, maybe one day? 🙂 53 minutes ago, pixelsearch said: I do same (more and more) using a personal function named _Doubleton , which prevents the script to be run twice Yes, thank you for this version I implemented this one, but anyone is good Func CheckSingleton($myScriptName) If _Singleton($scriptName, 1) = 0 Then ; Another instance is running Local $iMsgBoxResult = MsgBox($MB_OKCANCEL, "Script Already Running", "An instance of this '" & $scriptName & "' script is already running." & @CRLF & _ "This new instance will now close." & @CRLF ) Exit EndIf ; this is for when we have both AutoIt.exe and $myScriptName.exe running if $scriptName <> $myScriptName Then If _Singleton($myScriptName, 1) = 0 Then ; Another instance is running Local $iMsgBoxResult = MsgBox($MB_OKCANCEL, "Script Already Running " & $scriptName, "An instance of this '" & $myScriptName & "' script is already running." & @CRLF & _ "This new instance will now close." & @CRLF ) Exit EndIf EndIf EndFunc CheckSingleton()
Developers Solution Jos Posted March 22 Developers Solution Posted March 22 (edited) 31 minutes ago, MarcelloSoft said: Oh wow. Okay. Never say never, maybe one day? 🙂 It is solved in the Full version of SciTE4AutIt3 as that is using au3help.exe and I have added a test in our SciTE version for that to avoid re-shelling the helpfile. So just use the Full version! EDIT: A workaround could be to use the mod I made for the full SciTE and add this to your SciTEUser.properties: command.help.$(file.patterns.au3)="$(autoit3dir)\AutoIt.chm" command.help.subsystem.$(file.patterns.au3)=2 .. but that won't open on the keyword the cursor is on. Edited March 22 by 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.
MarcelloSoft Posted March 22 Author Posted March 22 1 hour ago, Nine said: I cannot replicate your issue but I am running full version of SciTE, not the light version integrated to AutoIt installer. There is multiple advantages to use full version, so just download and install the full version... I believe I had this issue with the full version too 'SciTE 32-bit Version 4.4.6', but maybe I'm confusing myself. BTW I tried to install the latest full version from https://www.autoitscript.com/cgi-bin/getfile.pl?../autoit3/scite/download/SciTE4AutoIt3.exe taken from https://www.autoitscript.com/site/autoit-script-editor/downloads/ but It was not compiling files like GuiListView.au3 so after trying few things I gave up, Maybe I should have used the files that we find in the section 'For those who want to run their own SciTE installation' I searched for the issue in the forum, but I didn't find anything useful. I know is another topic, but if someone would know a link where there are precise and clear instructions I would give it another try. Or maybe a can post this question on a separate thread. Cheers, M
Developers Jos Posted March 22 Developers Posted March 22 (edited) 5 minutes ago, MarcelloSoft said: but It was not compiling files like GuiListView.au3 so after trying few things I gave up, Maybe I should have used the files that we find in the section 'For those who want to run their own SciTE installation' I don't know what that means, so please post some snipped source that shows the issue and your error message from the SciTE outputpane! Goal should be to install the Full & Latest SciTE version! Edited March 22 by 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.
Nine Posted March 22 Posted March 22 7 hours ago, pixelsearch said: I have the same problem (Scite-Lite) Don't listen to bad advice. Just go with Full Version of SciTE. “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) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy
pixelsearch Posted March 22 Posted March 22 Advice : "guidance or recommendations offered with regard to prudent future action." So how can anyone write "Don't listen to bad advice." while quoting my sentence "I have the same problem (Scite-Lite)" There's not a shadow of an "advice" in the quoted sentence, so why the impolite post (again) ? So absurd and sad at same time... "I think you are searching a bug where there is no bug..."
MarcelloSoft Posted March 23 Author Posted March 23 (edited) 48 minutes ago, pixelsearch said: So absurd and sad at same time... I agree. I guess he misread, but in general people shouldn't post unpleasant comments without very good reason. People here work for free to help. 8 hours ago, Jos said: I don't know what that means, so please post some snipped source that shows the issue and your error message from the SciTE outputpane! Goal should be to install the Full & Latest SciTE version! Thank you, I'll post as soon as possible, in a new thread and refer to it here. Edited March 23 by MarcelloSoft pixelsearch 1
Developers Jos Posted March 23 Developers Posted March 23 9 hours ago, pixelsearch said: So how can anyone write "Don't listen to bad advice." while quoting my sentence "I have the same problem (Scite-Lite)" Not sure where the quibbling is coming from, but ........ To me it's simple: As far as I understand it, It's a design thing in the standard SciTE so in case one wants to get it resolved, post an issue/bug at their mail-list. The Full SciTE I maintain has a work-round since that is using the au3help.exe to open the helpfile at the correct selected word. (Hence to comment/advice made by @Nine) 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.
MarcelloSoft Posted March 25 Author Posted March 25 On 3/22/2025 at 4:57 PM, Jos said: On 3/22/2025 at 4:52 PM, MarcelloSoft said: but It was not compiling files like GuiListView.au3 so after trying few things I gave up, Maybe I should have used the files that we find in the section 'For those who want to run their own SciTE installation' I don't know what that means, so please post some snipped source that shows the issue and your error message from the SciTE outputpane! Goal should be to install the Full & Latest SciTE version! I created a snipped source and realized it simply was: #include <Process.au3> then analyzing it further I discovered that I had a local file named process.au3 that was including this phantom file #include <GuiList.au3> which doesn't actually exist anymore. So problem solved. One question I have left is this: in my memory the C/C++ language #include <somefile> doesn't search in the local directory, but I guess that the autoit language does... I just need to get used to it. The other thing is that when I analized the file "c:\Program Files (x86)\AutoIt3\Include\Process.au3" I saw that it includes #include-once and that is found in C:\Program Files (x86)\AutoIt3\Examples\Helpfile So I found strange that it does includes an example file, which, btw, doesn't do anything really useful, it seems to me in my ignorance. Just to point that out, nothing more, it's all good for me now. Thank you for all your answers.
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