ctrl break in office 2010, windows 7, hp dv4t laptop

Page 1 of 2 12 LastLast

  1. Posts : 5
    windows 7 home premium 64bit
       #1

    ctrl break in office 2010, windows 7, hp dv4t laptop


    I am running Office 2010 on an HP dv4t laptop with Windows 7. While testing new spreadsheets/databases I've written in Excel/Access, I sometimes need to break out of a process. For example, if an Excel Find command loops endlessly or an Access query never ends, I don't want to kill the application; I just want to kill the Find or the Query by hitting Ctrl-Break, as I used to do on my old Windows XP desktops. Trouble is, there is no "Break" key on my HP laptop. So I tried the Windows 7 onscreen keyboard, but it has no "Break" key either.

    I called HP, as I am under warranty. They insisted that no laptop has this key, so they referred me to Microsoft. As this is a problem with an Office application under Windows 7, Microsoft bounced me back and forth between twenty-seven Windows 7 and Office techs for six hours!!! before they referred me back to HP.

    I've seen lots of people have posted this question online, but I have found no solution. This effectively renders my Access applications unmodifiable!

    Anyone know how to activate a control break using some online application? (I don't want to lug around an external keyboard just for this.)

    Thank you.
      My Computer


  2. Posts : 934
    Windows 8.1 ; Windows 7 x86 (Dec2008-Jan2013)
       #2

    To cause Break you can try ESC while in Excel or FN + Right Shift (works for some HP models).

    FN button is located at bottom left corner, next to CRTL.
      My Computer


  3. Posts : 5
    windows 7 home premium 64bit
    Thread Starter
       #3

    Thanks, Neutron16. I tried those (using both the physical and the online keyboards), but they did not work.
      My Computer


  4. Posts : 10,485
    W7 Pro SP1 64bit
       #4

    I have the same problem when I use Remote Desktop Connection to remote to my desktop at the office. The laptop does not have a break key. I wrote/use an AutoIt script to send that key to the applicable window. Let me know if you are interested in doing something like that.
      My Computer


  5. Posts : 5
    windows 7 home premium 64bit
    Thread Starter
       #5

    would appreciate info on autoIt script.


    Thanks, I would truly appreciate info on how to clone your autoIt script for ctrl-break.
      My Computer


  6. Posts : 10,485
    W7 Pro SP1 64bit
       #6

    Sorry, but parts of this post might not make sense until you read the whole post.

    My script is specifically written to be use via a remote control session so I do not need the TrayTip and the Sleep lines that you see in the code below. You might not need them either, it depends on how you wish to invoke the script. If you have your MS Access full screened, then it might not be easy for you to double click on a shortcut to the script. It might be easiest to assign a Windows shortcut key (e.g. Ctrl-Alt-B) to a shortcut that leads to the script.

    Even if you have a portion of your desktop showing or if you use the Desktop toolbar on the Taskbar, you may find it difficult to double click on anything because the computer is so busy running the MS Access search that it might not accept each click fast enough to be considered a double click. Right clicking on the script (or a shortcut to the script) and then selecting Run Script from the context menu is an alternative, but context menus are slow to build when the computer is busy. Even OS shortcut keys can be missed at times. If, after a few seconds, you do not see the TrayTip, then press Ctrl-Alt-B again. If you should happen to end up with two or more copies of the script running at once, it won't matter; the other copies will just timeout after 5 or so seconds and will exit.

    Windows has a "feature" (I'll not call it a bug since it has been this way since Windows 3). If you hold down the Ctrl key and you send the Ctrl key via a script, then Ctrl key will continue to be "held down" even after you release the Ctrl key. It is not a big deal to undo this condition; you just press and release the Ctrl key once again. But to avoid the condition all together, I try to remember to add a Sleep line that gives me plenty of time to release the Ctrl on the real keyboard before the script sends a virtual Ctrl during the Ctrl Break line of code.

    Code:
    Opt("TrayIconDebug", 1)
    
    TrayTip("", "waiting for you to release the Ctrl key", 100)
    Sleep(5000)
    WinActivate("Find and Replace")
    If WinWaitActive("Find and Replace", "", 5) Then Send("^{BREAK}")
    I'll try and explain each line so that you can modify things as desired.
    Feel free to ask for help with modifications and I'll do what I can for you.

    TrayIconDebug
    If enabled shows the current script line in the tray icon tip to help debugging.
    0 = no debug information (default)
    1 = show debug
    If the script hangs, mouse over the AutoIt icon in the system tray and a tool tip should let you know the line of code that it is hung up on. There are much more detailed debug tools, but I leave this one turned on for minor debugging. There are no lines of code in this version of the script that can hang. If you just want to see the debug tool tip in action, run the script while there is no MS Access search taking place and you will have 5 seconds to mouse over the AutoIt icon in the notification area (system tray) down by the clock. The AutoIt icon might be hidden. You might want to tell Windows to always show icons from AutoIt or to just always show every system tray icon.

    TrayTip and Sleep
    I've already explained why they are there.

    WinActivate
    ...is just like it sounds. It activates the window. (Brings it into focus. Brings it to the foreground.) If you opt to start the script from a desktop shortcut, then the desktop will be in focus until this line of code attempts to change that.

    WinWaitActive
    Again, this is just like it sounds. The script waits until the window of interest is active before moving on to more code. The WinWaitActive function has a timeout feature. I have set the timeout to 5 seconds. If the timeout occurs, then the the function will return a 0. This 0 makes the condition for the single line If statement not true - so the Sending of the Ctrl-Break will not happen.

    In other words, if the Window of interest is not present or the computer is so busy that it cannot activate the window of interest within 5 seconds, the script will not attempt to send the Ctrl-Break key combo to any window; instead, the script will just exit. If desired, code can be added to let you know that it did not try to send the Ctrl-Break. I've just never had it be that busy, so I did not bother to code a notification.

    Here is a post that has some more info about AutoIt (and a download link):
    SysTray Icons of some programs don't re-appear after Explorer restart

    You do not need to compile this script into an exe; just leave it as a text file. If you plan on not using the OS shortcut key (e.g. Ctrl-Alt-B), then you can just put the script file directly on your desktop. Otherwise, put the script elsewhere and place a shortcut to it on your desktop.

    Obviously, the script above is meant to send Ctrl-Break to the MS Access Find/Replace dialog box. You will need to code another script for your MS Excel needs. It is possible to put the code for both needs into one script, but we can save that for later.

    AutoIt comes with a script editor. Because you will be making another script, I would suggest that you install the more advanced editor from here. (Click on the link named SciTE4AutoIt3.exe) That version should give you auto-complete prompts and syntax prompts - as well as take you to the help file entry for a given function if you place the cursor on the function and press F1.


    Now - having put you to sleep with that boring novel of a post - I'll mention another way to use a script to send the Ctrl-Break key combo to an app. You could have the script start when your computer starts and have the script run in a loop until you press a key combo like Ctrl-Shift-a. That would cause the script to activate the MS Access window and send the Ctrl-Break key combo. Pressing another key combo like Ctrl-Shift-x could send the Ctrl-Break key combo to MS Excel. The way that you write/use the script depends on how often you encounter the need to send Ctrl-Break key combo to an app.

    Here is a link to another AutoIt script that I offered to another OP: Stop Excel 2010 from appending .txt to file with existing extension but I never heard back to know if the OP made use of it :-(
      My Computer


  7. Posts : 86
    Windows 7 Ultimate x64
       #7

    Leah01 said:
    I am running Office 2010 on an HP dv4t laptop with Windows 7. ... Trouble is, there is no "Break" key on my HP laptop.
    There is on mine. Some of the key require you to hold down the Function (Fn) key. On my Keybord the [pg dn] key in the upper right corner has "break" in a box bellow the "pg dn". For me ctrl-fn-[pg dn] does a ctrl-break. Works great. If you can't find it, I would look at the documentation for your laptop.
      My Computer


  8. Posts : 86
    Windows 7 Ultimate x64
       #8

    UsernameIssues said:
    Windows has a "feature" (I'll not call it a bug since it has been this way since Windows 3). If you hold down the Ctrl key and you send the Ctrl key via a script, then Ctrl key will continue to be "held down" even after you release the Ctrl key. It is not a big deal to undo this condition; you just press and release the Ctrl key once again. But to avoid the condition all together, I try to remember to add a Sleep line that gives me plenty of time to release the Ctrl on the real keyboard before the script sends a virtual Ctrl during the Ctrl Break line of code.
    What you are referring to is called "Sticky Keys". See:
    Using StickyKeys

    It is possible to turn of this feature. Have you tried that?
      My Computer


  9. Posts : 10,485
    W7 Pro SP1 64bit
       #9

    Sticky Keys is off and this still happens.

    Sending the Ctrl key can also impact the Alt key so I tab the left Ctrl and left Alt keys followed by the right Ctrl and right Alt keys.
      My Computer


  10. Posts : 233
    Windows 7 Home Premium SP1 64bit
       #10

    I don't use excel or access very much, but I was wondering if CTRL+Z will do the trick.
      My Computer


 
Page 1 of 2 12 LastLast

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 10:44.
Find Us