Control Left doesn't move the cursor to the previous word - windows-8

In no program that is capable of editing text (such as notepad, Notepad++, or Chrome) on either my Windows Vista or Windows 8 laptops does CTRL+LEFT move the cursor to the previous word.
Prior Troubleshooting Steps (other than researching):
CTRL+RIGHT moves the cursor to the next word.
CTRL+SHIFT+LEFT highlights the previous word.
I put the following line in AutoHotKey (and saved/reloaded the script) and CTRL+LEFT then moves the cursor to the next word (as it should):
^Left:: Send ^{Right}
As step 3 above, but the following line did nothing when I used ALT+LEFT.
!Left:: Send ^{Left}
I'm at a loss. I run Avast Antivirus, Spybot, and ZoneAlarm Firewall on strict settings and scans aren't turning up anything. Rebooting in safe mode has no effect either.

Are you running any other AutoHotkey scripts on these computers that have Ctrl or Left Arrow set as hotkeys?
If so and you are not using #IfWinActive or ~ then it's possible you are blocking yourself by having those keys Hooked.
http://www.autohotkey.com/docs/FAQ.htm
http://www.autohotkey.com/docs/Hotkeys.htm#Symbols
You can also try various methods of Sending those keys, SendRaw, SendInput, SendEvent etc... More details here:
http://www.autohotkey.com/docs/commands/Send.htm
To verify that the keys are being read by your script...
Run a script with:
#InstallKeybdHook
~LCtrl & Left::
Send {RCtrl Down}{Left Down}{RCtrl Up}{Left Up}
Double Left Click AutoHotkey Script Tray Icon->Select View->Key history
Press Ctrl + Left and verify that your keys are being read.
If all the above has be tried, it is possible that some software on your system has Hooked your Keys and you will have to figure out what you installed recently and remove that program. Good luck.

Related

Close access navigation pane even if there is no search result

When starting our vba-access-application (which is done by a VBE-add-in which starts a VBA-function) we used to close the navigation-pane with this code:
DoCmd.SelectObject acMacro, "Autoexec", True
DoCmd.RunCommand acCmdWindowHide
As I started to use the built-in search/filter bar inside the navigation-pane, this code did not work anymore when the macro "Autoexec" is not visible. So I changed it to:
DoCmd.NavigateTo "acNavigationCategoryObjectType"
DoCmd.RunCommand acCmdWindowHide
This seems to work fine as long as there are any search results left. When I write "nothing with that name" inside the search bar(=the filter), the navigation pane will not close.
Does anyone know a way to close the navigation pane even if there is no search result visible?
DoCmd.NavigateTo "acNavigationCategoryModifiedDate"
DoCmd.NavigateTo "acNavigationCategoryObjectType"
DoCmd.RunCommand acCmdWindowHide
In order for the command DoCmd.RunCommand acCmdWindowHide to successfully close the Navigation Pane, the Navigation Pane must have the focus. But for an Access window to have the focus, a control within the window must have focus. It turns out that the NavigateTo command will never place the focus in the Search textbox, so if the search results are blank and there is nothing to select, then focus will not change to the Navigation Pane (even though technically the Navigation Pane's selected group may have been updated.)
If you play with the Navigation Pane long enough, you'll find that the Navigation search results and textbox are reset when switching between the highest-level Navigation categories. Hence my suggested code... it changes between two Navigation categories so that the search results are cleared during that action, so that the Navigation window will eventually gain focus when one of its listed objects finally gets focus.
(Really, using the NavigateTo command in this case is just a stupid trick to place focus on the Navigation Pane. It's just another glaring deficiency of the Access interface that there is no direct commands/objects for controlling the Navigation Pane.)
I suggest you don't write any code—but just use the built in Access settings to prevent (hide) the nav pane.
So work, then you hold down the shift key during startup.
(shift key by-pass).
The shift key development dance:
You will find that you can launch + develop a lot of code and work on forms/reports without having to exit.
However, you STILL will have done a shift key start-up bypass. The reason of course is that on start up, you code may well hide the ribbon. (Or launch a custom one). Same goes for start-up form—it may run a bunch of code, ask for logon, check table links.
And then there is the start-up settings you have. You likely have a start-up form (you don’t want that running). You likely have un-checked the display nav pane, but you need this during development. And what about if you have a custom ribbon? (Again a setting in tools→options). And use special keys—again turned off for users, but REQUIRED for developers.
And then there is the auto keys macro. This is used to re-purpose the F1 key (help—either disable or launch your own custom help—say a pdf or word file).
And any re-purpose such as say an f12 to popup some custom search box etc.
So, all of these custom setup is going to be rather LARGE amount of settings. Many will be from tools→options (main form, ribbon, etc.). And some will be from your code.
You REALLY (but REALLY) can’t code out all of these settings, and some require a re-start anyway. In a typical application there really going to be a lot of settings that are changed for your users vs you as the developer.
On start-up you thus hold down shift key. This will not only prevent your start up code from running, but ALSO your start up settings – even things like nav pane, and especially the tools→settings area (shift key ignores most of those settings).
So during a day of development, I will do this shift key dance all day long.
However, there are two tricks and shortcuts you can use here that will minimize this exit + re-enter down to a dull roar.
One great tick is to always place a custom compact repair button on the QAT. So QAT button is now ONE mouse click and always available to you. So if I am working on a form in design mode, flipping into view mode will often suffice, but in those cases where I need a full exit + re-start to test? I don’t even save the form, I just do a quick simple one click on that QAT compact + repair button.
One click! (Might have to answer yes to save). At this point, the application will re-start without you having to exit. And you don’t hold down the shift key—so all your start up settings run. You now flipped into user test mode, and it only took ONE mouse click.
This allows you to flip from developer mode and into “user test” mode with ease and only one mouse click.
So you can now run your application as it will appear to the end user.
To flip back into developer mode, just one simple click on your custom C+R button. (And you HOLD down shift key). This will flip you back into developer mode (you nav pane, your function keys, everything and all those start up settings are now ignored – you are free to develop without all those hassles and issues in your way). Full wide open use of Access as if no settings at all occurred.
And as noted, you get a c+r to boot, and you need + want to do that multiple times during the day anyway.
And as noted, for a good many changes, you not have to do this flip and can stay in developer mode.
Of course in some cases your “user mode” will REALLY lock down the Access and thus you have to exit (you lose the QAT trick). So you often be able to jump from developer to user, but not back the other way. Again, you not have to run + test everything in user mode all the time, but often some global variables, start up, password stuff will force this issue on you.
So, in this case?
I use a quick hit of alt+f4 to exit the application. AT this point, the accDB file should STILL be highlighted in the windows explorer. So, now it just a quick tap of the enter key to re-launch the accDB. And if wanting “user mode”, then simply don’t hold down the shift key. Do some testing, now alt+f4, and then a simple quick tap of the enter key (we back to the windows file explore and that accDB file is highlight). However, this time you WILL hold down the shift key, and thus you now back into developer mode.
And often, I will call my start up code before testing.
Ctrl+g (jumps to debug window), type in MyStartup
(MyStartup is assumed to be your first start up routine that does all that setup and THEN launches the main form – so in some applications I don’t use the built in start-up form setting, but use the autoexec macro to call my main start up routine (MyStartup)
So in a good many cases, I don’t have to exit Access to flip into test mode.
And of course some reports and forms can be used, viewed, developed on without having to full run the application with all that “user” start-up code stuff.
So some report might work, but then again it may well require some form to be open for it to work. (Or a system wide function and company name setting may be required + set in your start up code). So how badly you need to exit vs that of being able to do “some” development will often vary here.
So I will say that often I am forced to exit + re-load the application (alt+f4, tap enter key). So it only really 2 key combo to exit out and re-load/re-enter Access.
At the end of the day, if you can’t use that QAT shortcut suggestion, then you will exit + re-enter MANY MANY times during the day.
As noted, for a good number of forms etc., then you can flip between view and design mode. (But you of course be running access without all that start up crap stuff that prevents you the developer from working).
The simple matter is at the end of the day, there is going to be FAR MORE settings then just the nav pane (or lack of) that going to mess up your development process. So, the above shift key dance and QAT suggestion ALSO solves all of the OTHER many settings, and does so without you having to write one line of code to deal with this issue.
Of course, once all is working, then you will compile the application down to an accDE. And then apply the shift key by-pass code to that to lock the application further down.

WSL terminal forgets to update and loses focus

I'm trying to use the WSL console in Windows 10 (version 1909) for some development work, but I find that often running processes will simply appear to have hung, but when I send a keystroke to the terminal it will update back to the bash terminal (as if had completed all along but hadn't updated).
I am running the latest version of the debian package from the store.
Is there anyway to make this problem go away or am I wasting my time trying to use the default terminal?
Just a hunch, but I am guessing you are ending up in select mode. If you click anywhere in the terminal the title of the window will change to be prefixed with "select" and the terminal output will freeze so that you can select text without it changing while you try to highlight it. Pressing any key will cause you to exit select mode.
If this bothers you you can turn it off by right clicking on the title bar, clicking properties, and disabling quick-edit mode. Alternately, might I recommend the new Windows terminal, which handles selection and the clipboard in a more intuitive way.

Switch to active window to left/right in taskbar

I have been using 7+ Taskbar Tweaker for a day and I'm blown away with two features. Mainly because windows alt+tab is not memorising order of open windows in it. There are two commands that I use constantly. 101 - Switch to the window which is located on the left to the active window on the taskbar and Switch to the window which is located on the right to the active window on the taskbar.
So when I do some programming and have to switch between windows fast, I just assign shortcuts for those 2 operations. It's making switching between windows so easy. One key is moving focus left and other to do right.
Is it possible to do this in autohotkeys? It would be so awesome. Because actually I don't need whole program, only this feature. I saw some code for it on web but it's not working in win 7/64. Basically I need script that will assign hotkey for moving focus from active window on taskbar to one to the left or one to the right. Also when it run out of left/right windows it should circle back to starting window(like normal alt tab is doing.)
Aw... yes I think I wrote a script could do just that some years ago, but I'm not sure how exactly I did it.
The real problem here is finding the order of the windows in the takbar.
But I can tell you there is no official api for it and from what I could tell using registry monitoring software, the order isn't stored in the registry.
For now, that's the only thing that comes to my mind:
F1::WinActivateByTbIndex(4) ;activate the fourth window in the task bar with F1
F2::WinActivateByTbIndex(2) ;activate the second window in the task bar with F2
WinActivateByTbIndex(index) {
WinActivate, ahk_class Shell_TrayWnd
ControlSend, MSTaskListWClass1, % "{Tab}{Right " index-1 "}", ahk_class Shell_TrayWnd
Send, {Up}{Enter}
}
But if you have multiple windows behind one taskbar icon, then you will just enable the first one, so that may not be too useful..
Windows also provides the hotkeys Win+1 up to Win+0 Win+2 ... upt to Win+0 as quick shortcuts to enable window 1-10, but it suffers from 2 limitations: It only works for the first 10 windows and you always activate the first window of a stack (just like my hotkeys).
Actually I was reading about this a lot, and the alt + esc and alt+ shift +esc that is native in windows is doing a pretty good job of functionality that I need. It's cycling through open windows, in order that they were open. Only downside is that if you have minimized windows it will select them and they will stay minimized, it will not put them to front. I was tripped by this until I figure it out. One shortcut is for moving left and other right, you just have to open windows in order in which you would like to cycle through.
So.. alt+esc and alt+ shift+esc are working, but they are so hard to press, especially if you want to do that fast. Along came autohotkey, I tested this code and it's working flawlessly.
!w::
sendInput {alt down}{esc}{alt up}
return
!e::
sendInput {alt down}{shift down}{esc}{alt up}{shift up}
return

Kill application not Process - VB

I have a program that out of my control will bring up a message box (I didn't write or have source code)
I am trying to find out if it is possible to write a program (visual studio) that can at a set time, say every 10 minutes close all open applications(msgbox) but keep the process going? The application/task name is different to the process name.
It runs on XP and 7.
I've tried google but haven't managed to find what I'm after, all i can find is process kill. Not 100% sure on correct terminology.
You might be better-off writing a program that finds a current open dialog (window, messagebox, etc) and closing it. Sending an Esc keystroke is a pretty easy approach. Here is another SO article that talks about doing this: How to send a mouse click event to a hidden window?

excel VBA break execution when there's no break key on keyboard [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I'm just noticing that on my laptop (Dell XPS 15z) there's no BREAK key (no dedicated number keypad). I'm running the debugger step-by-step and then when all seems fine, I just let it play out. However, it's running in an infinite loop and now I'm realizing there's no way to stop it without the break key!!!!
Is this a bad joke? I had to reboot the computer; is there a more graceful way??
just press the escape key twice ;-)
Solution #1 (It works most of the time):
When some particular keys (Pause, Break or ScrLk) are missing on the keyboard and pressing Esc 2, 3 or multiple times doesn't stop the macro too.
Step #01: If your keyboard does not have a specific key, please do not worry and open the 'OnScreen Keyboard' from Windows Utilities by pressing Win + U.
Step #02: Now, try any of the below option and of them will definitely work depending on your system architecture i.e. OS and Office version
Ctrl + Pause
Ctrl + ScrLk
Esc + Esc (Press twice consecutively)
You will be put into break mode using the above key combinations as the macro suspends execution immediately finishing the current task. For eg. if it is pulling the data from the web then it will halt immediately before executing any next command but after pulling the data, following which one can press F5 or F8 to continue the debugging.
When Solution #1 doesn't work or you need a permanent solution then try adding a new KEY to the Registry. (I am running Win 10 Creators Update on Dell 3530 Inspiron Laptop)
Disclaimer: Please only make changes to Windows Registry at your own risk and it is advisable only if you are windows administrator or have prior experience in the changing the key values in the registry.
You can also look for Solution #2 which use accessibility keyboard Win + U
Solution #2:
1) Click the START, then type REGEDIT into the search box. This will start the registry editor.
2) Explore the Registry, expanding each element
HKEY_LOCAL_MACHINE
-SYSTEM
-Current Control Set
- Control
- Keyboard Layout
Click on the Scancode Map, and EDIT the key values to match that shown below.
i.e. to have values of : 00,00,00,00,00,00,00,00,02,00,00,00,46,e0,44,00,00,00,00,00
Once Done you will need to reboot your laptop, but after that, you can use as the pause/Break Key.
To understand it in detail and customize it as per your needs, please refer this link: KeyBoard Scancodes
I have a Dell Precision without a Pause/Break key but there is a replacement for that: Fn + B, so:
- Fn + B == Pause (pause execution);
- Ctrl + Fn + B == Break (break execution);
- Win + Fn + B == Windows + Pause (open System properties).
You can execute the command:
dir /s C:\
and test the Pause and Break combination keys while dir lists all files in drive C.
reference
Despite this being an old question, I have just encountered the same issue and discovered that Ctrl+Scroll lock works as a break.
"Scroll lock" can be accessed on my DELL Laptop via the blue function key "Fn" and the "F6" key which has a small blue lock symbol on it with an ⇳ symbol in it. At other computers it may look like ⤓ . So effectively I press Ctrl+Fn+F6.
I have an HP laptop and this works when I want to break after a msgbox, hold fn+ctrl and click right shift key (has pause on it as well) then respond to msgbox and code will break.
On my Dell at least : ctrl + alt + esc BEFORE your cursor starts looping itself
I got this info from aidangrogan on this website :
http://en.community.dell.com/support-forums/laptop/f/3518/t/19355018
So I don't claim to have found it myself. All credits to him (or her)
Hold CTRL+Fn & hit Shift - Stopped my macro from running. I don't have a 'Break' key either on the keyboard of my HP Pavilion G7.
Ctrl + Fn + B works for Excel 365 (Office 365) on my Dell Latitude 5480 (no Break key).
I found this thread and saw the solution that has the most votes, but then realized my laptop has no Pause, Break or ScrLk) keys. I tried other proposed solutions, like 'OnScreen Keyboard' or alternative key combinations, but those didn't work either.
Then it hit me: if it's a phantom break point associated with particular line(s) of code, why not just get rid of the line(s)?
So that's what I did:
I cut the line(s) where execution was breaking.
Ran the macro again (it didn't break this time)
Pasted the line(s) again.
It worked for me, when no other key combination (onscreen or physical) worked. Hope it helps someone!
None of the above answers work for me.
I did how ever find this, it's not perfect since you need to keep ALT pressed and then a keys twice. On top of that it's depended on what language your Excel is set to.
In an English Excel you'd use ALT + R + R in German you need to use ALT + U + R
I have a Japanese Layout keyboard. I neither have a scroll lock nor a break on my laptop-Lenovo E470.
A long press on the Esc key worked as a terminator for me.
I found a way round this, opened another instance of Excel and another spreadsheet, then opened the VBA editor from there and it showed as "running" so I could click the stop button
Because all of the above werent working for my application, I ended up writing a VBS script which I can run from the terminal. Not elegant. Probably not the first choice if one of the others work. But, effective.
break.vbs
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.SendKeys "^%{BREAK}"