xuzo Posted November 17, 2015 Share Posted November 17, 2015 Sometimes I have some scripts that are running, for example, some send Keys on a notepad++ window, like {alt} and keystrokes.If the notepad++ window closes for a variety of reasons...The script keeps running on the the Scite window and destroys all the code ;(Is there a way to "Lock" the scite window during F5 , so that no code can be written to it? Link to comment Share on other sites More sharing options...
xuzo Posted November 17, 2015 Author Share Posted November 17, 2015 I found a way by simply making the file read only with Scite:Options >> Read OnlyI suppose that's the way to do this? Link to comment Share on other sites More sharing options...
JohnOne Posted November 17, 2015 Share Posted November 17, 2015 no.don't operate on notepad unless it exists and is active. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
jdelaney Posted November 17, 2015 Share Posted November 17, 2015 Don't use notepad or notepad++ at all...use filewrite. Shrapnel 1 IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
Developers Jos Posted November 17, 2015 Developers Share Posted November 17, 2015 To answer the base question: When you have the full SciTE4AutoIt3 version installed you could also use:#AutoIt3Wrapper_Run_SciTE_Minimized= ;(Y/N) Minimize SciTE while script is running. Default=NJos 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...
xuzo Posted November 21, 2015 Author Share Posted November 21, 2015 This solution works pretty good:#AutoIt3Wrapper_Run_SciTE_Minimized=YIs it 100% safe? Absolutely NO keystroke can re-maximize and cause havoc?The read only option works pretty good, but it's tedious to click it on and off all the time."Alt+O+R" works , but not efficient, is there a way to toggle read only? A macro? Can I create a shortcut for that? Link to comment Share on other sites More sharing options...
AutoBert Posted November 22, 2015 Share Posted November 22, 2015 (edited) The script is so save as you worked accurate. When you using MouseClick's in your Script with false coordinates maybe the Scite-window get's keystrokes. When using ControlSend with a wrong the Handle of the Scitewindow or when using Title to identify Window and the Scitewindow has the same title maybe something is going wrong.Everything what happens is initiated by your code and when he is bugy then find the bugs and fix them.A little Tip, send only KeyStroke, Museclicks when the Application you want to automate is the active Window.If WinActive($hwndGame) Then ... Edited November 22, 2015 by AutoBert Link to comment Share on other sites More sharing options...
BrewManNH Posted November 22, 2015 Share Posted November 22, 2015 I'd avoid using Send unless there's absolutely no other way to do something. Send is an extremely unreliable method of automating a program, ControlSend, ControlCommand, and ControlClick are much more reliable.As you've described, your problem is showing how unreliable Send is, don't use it if you don't have to. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
xuzo Posted November 22, 2015 Author Share Posted November 22, 2015 (edited) My script example has no "send" commands at all.The script is NOT stopping with "Ctrl+break", regardless what I try.I need to be able to stop the script when something goes wrong, I don't want it to run like a fully compiled .exe on every run.I want it to stop, force stop, like CTRL+Alt+DELStop on the Scite window, stop everywhere, just STOP Edited November 22, 2015 by xuzo Link to comment Share on other sites More sharing options...
AutoBert Posted November 22, 2015 Share Posted November 22, 2015 My script example has no "send" commands at all.In this thread there ins't a example script! But did you know what you postet Tuesday?Sometimes I have some scripts that are running, for example, some send Keys on a notepad++ window, like {alt} and keystrokes.If the notepad++ window closes for a variety of reasons...The script keeps running on the the Scite window and destroys all the code ;(and the answer to stop your nonsence script in:is given in this thread.Btw.: it can't be a real reproducer from your problem script.So it's wasted time to try to help you until you show a real reproducer or your original script. Also possible solution's are already given: A little Tip, send only KeyStroke, Museclicks when the Application you want to automate is the active Window.If WinActive($hwndGame) Then ... I'd avoid using Send unless there's absolutely no other way to do something. Send is an extremely unreliable method of automating a program, ControlSend, ControlCommand, and ControlClick are much more reliable.As you've described, your problem is showing how unreliable Send is, don't use it if you don't have to.you just have to do what your are advised! Link to comment Share on other sites More sharing options...
Developers Jos Posted November 22, 2015 Developers Share Posted November 22, 2015 This solution works pretty good:#AutoIt3Wrapper_Run_SciTE_Minimized=YIs it 100% safe? Absolutely NO keystroke can re-maximize and cause havoc?The read only option works pretty good, but it's tedious to click it on and off all the time."Alt+O+R" works , but not efficient, is there a way to toggle read only? A macro? Can I create a shortcut for that? NO ... you need to take care of that by writing a smart script. 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...
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