SteveM8 Posted March 8, 2010 Share Posted March 8, 2010 I wrote a simple script for my job that has failed for an odd reason. We're running on Windows XP Pro, SP3. This script is needed to get around a bug in a recent release that we just installed. I am copying some text from InCopy, pasting it into Notepad and copying it from there to strip out hidden codes. Then it can be pasted into a properties box without crashing the database application. Yeah, sounds like a pain but it'll be a few months before a fix will come from the vendor. So the script works okay, now here's the problem ... If I launch the script from a desktop or quick launch shortcut it will run just fine. But if I launch it using a Windows Shortcut Key (as defined in a shortcut's properties) there is a 30 second or so pause before the script starts. Any idea what could be causing the long delay? I don't think anything is wrong in the script but here it is, just in case. BlockInput(1) WinActivate("Adobe InCopy CS3") If Not WinActive("Adobe InCopy CS3") Then Exit Send("{CTRLDOWN}c{CTRLUP}") Run("notepad.exe") WinWait("Untitled - Notepad") If Not WinActive("Untitled - Notepad") Then WinActivate("Untitled - Notepad") WinWaitActive("Untitled - Notepad") Send("{CTRLDOWN}v{CTRLUP}{CTRLDOWN}a{CTRLUP}{CTRLDOWN}c{CTRLUP}") WinClose("Untitled - Notepad") WinWaitActive("Notepad", "Do you want to save") Send("!n") WinWait("Adobe InCopy CS3") If Not WinActive("Adobe InCopy CS3") Then WinActivate("Adobe InCopy CS3") WinWaitActive("Adobe InCopy CS3") Send("{ALTDOWN}f{ALTUP}") Send("p{ENTER}") WinWait("Text Document Properties") If Not WinActive("Text Document Properties") Then WinActivate("Text Document Properties") WinWaitActive("Text Document Properties") BlockInput(0) Link to comment Share on other sites More sharing options...
Beege Posted March 8, 2010 Share Posted March 8, 2010 This could be a problem with windows. The reason I say that because I had a very similar problem in the past when I created a shortcut key for the calculator. If i launched it from start menu everything was fine, but using the shortcut there was always a delay. Humor me and assign a shortcut to calc or something and see if a delay happens with that program. If so we know its not your script. Assembly Code: fasmg . fasm . BmpSearch . Au3 Syntax Highlighter . Bounce Multithreading Example . IDispatchASMUDFs: Explorer Frame . ITaskBarList . Scrolling Line Graph . Tray Icon Bar Graph . Explorer Listview . Wiimote . WinSnap . Flicker Free Labels . iTunesPrograms: Ftp Explorer . Snipster . Network Meter . Resistance Calculator Link to comment Share on other sites More sharing options...
SteveM8 Posted March 12, 2010 Author Share Posted March 12, 2010 Thanks for the reply, Beege. I should have mentioned that other Shortcut Keys are also delayed. Even the WinKey+E or +R (Windows Explorer and Run) are delayed. Seems it may be connected to InCopy or our database app that supports it. Just hoping that someone would spot something in my script that was creating the delay. Link to comment Share on other sites More sharing options...
denishowe Posted June 2, 2013 Share Posted June 2, 2013 other Shortcut Keys are also delayed. Even the WinKey+E or +R (Windows Explorer and Run) are delayed. Does the delay happen when you've been logged in for a while? I get a huge delay between logging in and Windows responding to shortcut keys (e.g. Ctrl-Alt-. I've seen this on many versions of Windows. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 2, 2013 Moderators Share Posted June 2, 2013 denishowe,Welcome to the AutoIt forum. In fiture please look at the date when a thread was last active before you post. I doubt the OP, who has not been online here for over 3 years, is likely to respond. 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...
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