AutoHotKey

Ahk: run a python script with args

依然范特西╮ 提交于 2019-12-05 07:21:37
问题 I have seen this thread (and many others) but I am still not able to retrieve the args in python. 1) With this... Run Cmd \k "Python C:\my.py %myvar%" ... a Cmd is open but nothing happens : my.py isn't started. 2) With this... Run C:\my1.py %myvar% ... the python script is run but when I retrieve the args with sys.argv , I only get the path of the script not myvar . Len(sys.arg) return 1 so myvar isn't passed down to python. 回答1: This thread solved it. commands= (join& python "C:\my.py" "

Low-level Keyboard Hooks/SendInput with Winkey+L possible? (workstation lockout is intercepted in Vista and higher)

别等时光非礼了梦想. 提交于 2019-12-05 06:46:10
I work on a project called UAWKS (Unofficial Apple Wireless Keyboard Support) that helps Windows users use Apple's bluetooth keyboard. One of the main goals of UAWKS is to swap the Cmd key (which behaves as Winkey in Windows) with Ctrl , allowing users to do Cmd + C for copy, Cmd + T for new tab, etc. It is currently developed using AutoHotkey , which worked pretty well under Windows XP. However, on Vista and Windows 7, Cmd + L causes problems: Regardless of low-level keyboard hooks, Win + L is always intercepted by Windows and normally locks the workstation... You can disable workstation

Finding the scan code of FN Key

青春壹個敷衍的年華 提交于 2019-12-05 05:01:10
I want to use Fn + S to emulate Ctrl + S , so far this is my code: #InstallKeybdHook #Persistent SC126 & s:: Send ^{s} return My problem is that I don't know the Fn key's scan code. How can I find it? Person93 The Fn key does not have a scan code. The keyboard driver does not expose the Fn key to the operating system, so basically your operating system (and therefore AutoHotkey) does not know that it exists. When you press the Fn key in combination with a supported key, the keyboard driver reports a single key press to the operating system with a different scan code. Basically, it tells the

Get available screen area in autohotkey

半世苍凉 提交于 2019-12-05 04:25:23
I'm trying to write a few simple AutoHotkey scripts for moving windows around, and I'm having trouble getting the correct screen size values. I'm trying to get the size of the usable area on the screen (generally the full screen resolution minus the taskbar, and maybe any other docked windows like the sidebar in Vista). Neither of the methods I've found for getting the screen width seems to work. None of the 3 methods I found to get the screen size are giving me the right values. Here's the test script I'm using (running on XP with the taskbar on the bottom at its default size): #7:: WinMove A

Playback 24bit audio not possible

有些话、适合烂在心里 提交于 2019-12-05 03:02:00
I'm trying to play a 24bit audio file with my AutoHotkey app. It just uses SoundPlay . Windows 7 has no problem, however Windows XP users cannot play the 24bit files. The documentation says: All Windows OSes should be able to play .wav files. However, other files (.mp3, .avi, etc.) might not be playable if the right codecs or features aren't installed on the OS. Possible fixes mentioned in the article How to play 24bit WAV files in Windows Media Player are fixing the problem for Windows Media Player, however but not for autohotkey: Step-by-step guide Download Legacy HD Audio Filter regsvr32

Change Monitor Input Source

和自甴很熟 提交于 2019-12-05 03:00:46
I want to change my monitor input source with AutoHotkey, and I have this partially working. However when I use the hotkey to change the Monitor Input Source to my xbox(YPbYr) from pc(DVI), the monitor doesn't detect that the xbox is on, it says no source. Monitor => Asus vg236 VCP Monitor Input Source codes for my monitor: DVI => 3 HDMI => 4 YPbPr => 12 I'm using the Windows API Monitor Configuration Functions specifically the SetVCPFeature function which uses DDC/CI. After some research I've decided I want to set the VCP Input Source this has some useful information specifically on page 71

AutoHotkey's ComObjActive handle to specific Worksheet

你。 提交于 2019-12-04 21:13:36
The simplest way to create a handle to your currently active Excel sheets in your .ahk script is: Xl := ComObjActive("Excel.Application") Nonetheless, if one switches to another workbook, this becomes the new " currently active sheet " and AutoHotkey tries to use methods for sheets and cells on the new workbook through COM: of course scripts designed to work with specific sheets and cells don't work anymore on a different workbook. Do you know how to create COM handles to specific workbooks instead of currently active sheet? The goal should be to allow the user to loop between workbooks

How to map a global key to refresh?

时间秒杀一切 提交于 2019-12-04 19:29:52
Winamp has a neat feature. Global keys. That way I can change the playing song even if Winamp GUI doesn't have focus. I am looking for a similar solution to Firefox or Chrome . I use Eclipse to code PHP. It auto SSH's and saves to another machine (testing) I could use something like XRefresh with a mapped virtual drive but I cant install Samba on the testing machine. Right now I have to: CTRL + S (save and auto-update) ALT + TAB (switch to Firefox GUI) F5 (refresh current Firefox page) ALT + TAB (back to Eclipse) I am looking for something like: CTRL + S (save and auto-update) CTRL + X

How to map arrow keys with an AutoHotKey script like Vim?

六月ゝ 毕业季﹏ 提交于 2019-12-04 18:59:40
Referring to question Windows 7 Map CTRL + j to the Down Arrow Key How can I map the arrow keys with AutoHotKey like vim? Ctrl+h = Move left Ctrl+j = Move down Ctrl+k = Move up Ctrl+l = Move right Make an AutoHotKey-script like this: ^h:: Send, {Left down}{Left up} Return ^j:: Send, {Down down}{Down up} Return ^k:: Send, {Up down}{Up up} Return ^l:: Send, {Right down}{Right up} Return 来源: https://stackoverflow.com/questions/31425458/how-to-map-arrow-keys-with-an-autohotkey-script-like-vim

Communicating between Autohotkey and python

∥☆過路亽.° 提交于 2019-12-04 18:15:15
问题 Is there a way to send some parameter from autohotkey to python. Using Autohot key I read some number from the notepad and store in a variable and now I want to send this number to the python code in order to do some calculations. My Autohotkey code is: controlGetText, telphoneNumber, Edit1, Untitled - Notepad And I want to send this telphoneNumber to python file. Is there a way I can do that? Do I need to create an exe file of a python and then call from autohotkey? For example: RunWait, C: