I have a surface pro 4 but the physical buttons has a hardware problem where the buttons press them self or when you move or touch the corner of the screen.
I was hoping to remap the buttons to "nothing" but it seems to be remapped to Shift, Ctrl, Alt.
Am i missing something?
Here is the code:
#SingleInstance,
Force SetBatchLines, -1
SC130::
SC12E::
Is that the entire code?
Since there is no return, it's going to continue on with the script. In other words, if I wanted AHK to type "help" anytime I pressed "y" or "e", I could do this:
y::
e::
SendInput help
return
Try changing the hotkey to something like this and see if it makes a difference:
SC130::Return
SC12E::Return
Related
I have 2 windows that have the same title. So, I have to detect them by handle. They use very long time to begin from the beginning of my code, too. So I have to begin them before, then debug the middle of code by detect them by their handle. The codes are difference between them, so I must specify the handle by my hand. However, thank you very much.
I got my own window's handle number by Au3Info application.
But It didn't work when I use like this:
;run Au3Info.exe to get calc.exe window's handle number
;then activate minimizing calc.exe by copied window's handle number from Au3Info.exe
Run("C:\Program Files\AutoIt3\Au3Info.exe")
WinWaitActive("(Frozen) AutoIt v3 Window Info")
WinSetOnTop("(Frozen) AutoIt v3 Window Info", "", 0)
WinMove("(Frozen) AutoIt v3 Window Info","",0,0)
Run("calc.exe")
WinWaitActive("Calculator")
Winmove("Calculator","",500,500)
WinActivate("(Frozen) AutoIt v3 Window Info")
WinWaitActive("(Frozen) AutoIt v3 Window Info")
MouseClickDrag("left",261, 156,505,505)
MouseClick("left",136, 374,10) ;copy calculator window's handle number form Au3Info
WinSetState ( "Calculator", "", #SW_MINIMIZE )
WinActivate(ClipGet ( ))
;$hWnd=0x004D01DE ; window's handle number copy from Au3Info
;ConsoleWriteError(#crlf & WinActivate($hWnd) & #crlf)
Above, I want to active current session 0x004D01DE-handle windows, but it didn't work, returned me "0", not found specific window. Although the window's handle number still be the same, when I recheck.
I debugging some part of my script, so I have to copy the specific handle window's number by myself to save a long period of time for debugging from the full code.
Did I use that window's handle number in right way?
I see no reason to use Au3Info.exe. WinWaitActive already returns the handle. Just use it:
Run("calc.exe")
$hCalc=WinWaitActive("Calculator")
MsgBox(0,"Handle","Calculatior's handle is: " & $hCalc)
WinMove($hCalc,"",500,500)
WinSetState($hCalc,"",#SW_MINIMIZE)
Another possibility is WinGetHandle
The answer is HWnd(). Just change WinActivate(ClipGet()) to WinActivate(HWnd(ClipGet())).
I wonder if it is possible to check to see if a window has focus in AutoIt. I have checked and not found much. I have tried using WinSetOnTop but this didn't seem to do anything so then I considered using WinActivate but this didn't seem to do what I need.
The reason I want to do this is because I have this application I am writing as a prank and I do not want the co-worker on whom I'm playing the prank to just ignore the window when it starts automatically. I am wanting to put a shortcut to it in the startup folder and we have several applications that run on startup and so I want mine to either always be on top or audibly shout rude words at the user if they try and ignore the application.
Is this possible and, if so, can you help me out because I am out of ideas.
Regardless of your motives, you may try WinWaitActive.
Syntax:
WinWaitActive ( "title" [, "text" [, timeout = 0]] )
Example that may be useful to try it out:
Func Example()
; Run Notepad
Run("notepad.exe")
; Wait 10 seconds for the Notepad window to appear.
WinWaitActive("[CLASS:Notepad]", "", 10)
; Wait for 2 seconds to display the Notepad window.
Sleep(2000)
; Close the Notepad window using the classname of Notepad.
WinClose("[CLASS:Notepad]")
EndFunc ;==>Example
Reference:
https://www.autoitscript.com/autoit3/docs/functions/WinWaitActive.htm
I'm a new Atom user and I want to override the Atom command palette (shift-ctrl-p) scrolling key bindings to something more vi friendly like
ctrl-n and ctrl-p instead of the annoying arrow keys (which force me to take my hands off the home row).
Just to be clear, I don't want to change the key binding that brings up the command palette, but the key bindings you use to scroll through the list once it's up:
I can only find a binding to override the command palette toggle:
As you can see in the following config file, I was able to override the autocomplete scrolling, and I hope to do the same with the command palette. I've tried 'command-palette:up' ,'command-palette:down' and 'command-palette:move-up' etc. to no avail.
Here's is my keymap.cson.
# Atom Flight Manual:
# https://atom.io/docs/latest/using-atom-basic-customization#cson
#vt add
'body atom-text-editor.autocomplete-active':
'ctrl-p': 'autocomplete-plus:move-up'
'ctrl-n': 'autocomplete-plus:move-down'
'alt-p': 'autocomplete-plus:page-up'
'alt-n': 'autocomplete-plus:page-down'
'home': 'autocomplete-plus:move-to-top'
'end': 'autocomplete-plus:move-to-bottom'
# vim-plus ex mode 2016-04-18
'atom-text-editor.vim-mode-plus.normal-mode':
':': 'vim-mode-plus-ex-mode:open'
'!': 'vim-mode-plus-ex-mode:toggle-setting'
# add cmd palette key bindings --> These do not work.
'body .native-key-bindings':
'ctrl-p': 'command-palette:up'
'ctrl-n': 'command-palette:down'
#vt end
I've been really impressed with the key binding support in Atom thus far. I'd be really surprised if it couldn't handle this but, alas, I think this might be the case.
Does anyone know of a way to do this?
Atom 1.7.2, linux
I was able to get single line scroll to work, but not page scroll to work with the following in my keymap.cson:
'atom-workspace':
# these work
'ctrl-p' : 'core:move-up'
'ctrl-n' : 'core:move-down'
# these don't work
'alt-p' : 'core:page-up'
'alt-n' : 'core:page-down'
It would be nice to have page scroll as well, but I should be able to narrow down the list down by typing in text, so I don't foresee needing page-up, page-down all that often.
Now I'm happy.
To target keybindings for just the command palette, you can find an appropriate selector by looking in the command-palette repo keymaps: https://github.com/atom/command-palette/blob/v0.43.5/keymaps/command-palette.cson
This suggests the use of the .command-palette selector, which seems more appropriate then atom-workspace.
'.command-palette':
'ctrl-n': 'core:move-down'
'ctrl-p': 'core:move-up'
I was not able to find a mapping to scroll a page at a time within the command palette, though I'm sure someone else can figure it out. The keyboard page up/down keys have no effect so mapping to core:page-down etc. is not going to work.
This is what Standard Editor looks like:
This is what Assistant Editor looks like:
This is a problem because whether I click on the eye icon or the + next to (6 times), it shows me a graph only: I was wondering if there would be a way to show more useful output?
Edit: When I show the debug area, it doesn't show any output there:
You can access the console by the menu
View > Debug Area > Show Debug Area
There's also a little upper arrow icon in the bottom left of the Playground, and the SHIFT+CMD+Y shortcut.
In the console you will be able to see not only the error messages but also anything you print.
To be able to see the output in the preview panel you have to place the statement you want to see on a separate line, and break down the logic on separate lines up to some point.
In your case, for example:
let arr = [1,2,3,4,5]
let triple = arr.map({
(i:Int) -> Int in
return i*3
})
Here with let triple ... not being on the same line as the closure anymore, the Playground is able to preview it.
And by clicking on the + on the right side, you can now unfold the special panel where all values are visible:
In the terminal of Mac OSX, I open SML, if I type something wrong, I wish to move my cursor to that place to modify something or add/delete something, but once I hit <- (the left arrow ) on the keyboard, the REPL gives me
Yes, that ^[[D thing.
So how do I move the cursor?
Yes, the REPL of SML/NJ does not support arrow keys. You can use the rlwrap tool to fix this. That allows you to use the left and right arrow keys to navigate within a line and the up and down arrow keys to recall lines you've entered earlier.
If you're using Emacs to write your SML files, you can also run SML in an Emacs buffer.