l3ill Posted April 11, 2010 Share Posted April 11, 2010 (edited) Hi All, Is there a way to force a window to stay activated during a popup event like a print dialog for instance? The script works fine most of the time with the normal winact ,winwaitact & sleeps but in the event that the default printer is out of paper or ink or whatever I have send's going to the print dialog instead of the pdf fields where they belong. Thanks for any help... Edited April 11, 2010 by billo My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example Link to comment Share on other sites More sharing options...
martin Posted April 11, 2010 Share Posted April 11, 2010 Hi All, Is there a way to force a window to stay activated during a popup event like a print dialog for instance? The script works fine most of the time with the normal winact ,winwaitact & sleeps but in the event that the default printer is out of paper or ink or whatever I have send's going to the print dialog instead of the pdf fields where they belong. Thanks for any help...You could use ControlSend instead of Send then you can direct the text to the correct window. Also, you could detect when the dialogue pops up and deal with it some way. 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. Link to comment Share on other sites More sharing options...
l3ill Posted April 11, 2010 Author Share Posted April 11, 2010 (edited) thanks Martin, I had played with the idea of control send but as soon as the user clicks the cancel button on the print popup...well you know. What kind of ideas do you have on detecting the "focus thief" and then pausing the script (function) until focus is returned ? The script is a list of hotkeys tied to functions that fill in a barrage of pdf forms one at a time and then prints and closes them before opening another one to continue. I can stop the danger of clicking around by the user with "blockinput" but this little problem is proving to be an annoying little bug. Thanks again for all your help! Edited April 11, 2010 by billo My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example Link to comment Share on other sites More sharing options...
Ascend4nt Posted April 11, 2010 Share Posted April 11, 2010 Maybe try the function SendKeepActive? I haven't tested it myself, but it looks like it might help here. My contributions: Performance Counters in Windows - Measure CPU, Disk, Network etc Performance | Network Interface Info, Statistics, and Traffic | CPU Multi-Processor Usage w/o Performance Counters | Disk and Device Read/Write Statistics | Atom Table Functions | Process, Thread, & DLL Functions UDFs | Process CPU Usage Trackers | PE File Overlay Extraction | A3X Script Extract | File + Process Imports/Exports Information | Windows Desktop Dimmer Shade | Spotlight + Focus GUI - Highlight and Dim for Eyestrain Relief | CrossHairs (FullScreen) | Rubber-Band Boxes using GUI's (_GUIBox) | GUI Fun! | IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) | Magnifier (Vista+) Functions UDF | _DLLStructDisplay (Debug!) | _EnumChildWindows (controls etc) | _FileFindEx | _ClipGetHTML | _ClipPutHTML + ClipPutHyperlink | _FileGetShortcutEx | _FilePropertiesDialog | I/O Port Functions | File(s) Drag & Drop | _RunWithReducedPrivileges | _ShellExecuteWithReducedPrivileges | _WinAPI_GetSystemInfo | dotNETGetVersions | Drive(s) Power Status | _WinGetDesktopHandle | _StringParseParameters | Screensaver, Sleep, Desktop Lock Disable | Full-Screen Crash Recovery Wrappers/Modifications of others' contributions: _DOSWildcardsToPCRegEx (original code: RobSaunder's) | WinGetAltTabWinList (original: Authenticity) UDF's added support/programming to: _ExplorerWinGetSelectedItems | MIDIEx UDF (original code: eynstyne) (All personal code/wrappers centrally located at Ascend4nt's AutoIT Code) Link to comment Share on other sites More sharing options...
l3ill Posted April 11, 2010 Author Share Posted April 11, 2010 (edited) Nice find ascendant. hadn't seen that before, certainly sounds like it should work. But I was just playing with the example and a click away from the window still causes it to drop letters. Thanks anyway man!Just finished testing again on my code and it works!!The example has a second sleep that was allowing it to skip letters.Rock on Ascend4nt Edited April 11, 2010 by billo My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example 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