AutoHotKey

Displaying List of AutoHotkey Hotkeys

怎甘沉沦 提交于 2019-12-11 06:46:47
问题 I’ve written script that contains numerous hotkeys (general structure is as below). I would like to create another one that when pressed displays a list of all of the hotkeys and their corresponding descriptions that the script contains in a nice, formatted table. The formatting and display are tenuous since AutoHotkey’s output is limited to message-boxes, but possible. More problematic is getting the hotkeys and corresponding descriptions. The hotkeys all call the same function with

function containing GuiControl doesn't work with hotkey

拟墨画扇 提交于 2019-12-11 06:39:22
问题 test() { GuiControl, , abc, 123456789 } GUI New GUI Add, ListBox, xm y+m w100 h100 vabc GUI Add, Button, xm y+m w60 h30 grun, Add GUI Show, Autosize Return run: test() return GuiClose: ExitApp !1:: test() MsgBox 1 return I wanna call test() when I press the key Alt + 1, But my code above doesn't work. Only the message '1' is output. Obviously I seem to be misunderstanding something.. How to solve this problem? 回答1: This displays a GUI window containing a list control and appends a row with

My macro wont run more than once?

半世苍凉 提交于 2019-12-11 05:32:16
问题 I have a simple macro, since i am very new to it. Literally started today. But i run this macro, and it runs once and stops. Why is that? Here it is: q:: Send asdq Esc::ExitApp return If someone could help me, I would really appreciate it. 回答1: Each hotkey you assign, that isn't a single line, requires a Return . Since you have a definition of a Hotkey inside another, your second hotkey esc::exitapp is being executed when you press q and exiting your script. Try: q::Send, asdq Esc::ExitApp or

How can I get bitmap data from gdip libraries in AHK in a grid format? [duplicate]

狂风中的少年 提交于 2019-12-11 05:21:13
问题 This question already has answers here : How can I get the pixel data from an area of the screen (much) faster in AHK? (2 answers) Closed 2 years ago . I'm doing some kind of image recognition / motion detection and need to be able to access the pixel data from the screen with some manner of coordinates so I can see what color the pixel at [350,425] is and so on. I recently asked a question about getting pixel data from an area of the screen. The default method of viewing pixels in AHK is

How to select printer and print with AutoHotKey

丶灬走出姿态 提交于 2019-12-11 05:09:29
问题 I am trying to automate export of Lotus Notes emails to Microsoft XPS documents so that I'll be able to search through them. Now I would like to automate the export by using AutoHotKey to print and select 'Microsoft XPS document' in the printer name list. I have the following script: ; F2 is my chosen HotKey that will trigger the script, starting with a CTRL-P *F2::^p ; type 'm' to choose 'Microsoft XPS Document Printer' Send m {enter} which opens the print view window, but does not select

Cannot access font-weight property with DOM

醉酒当歌 提交于 2019-12-11 05:06:05
问题 I'm having troubles accessing the font-weight property with DOM. html = (Ltrim <html> <head> <style type="text/css"> #bar{ border: 1px solid black; } div { font-weight: bold; } </style> </head> <body><div>foo</div><p id="bar">bar</p></body> </html> ) doc := ComObjCreate("HTMLfile") doc.write(html) msgbox % doc.styleSheets[0].rules[0].style.border ; "black 1px solid" msgbox % doc.styleSheets[0].rules[1].style.font-weight ; nothing msgbox % doc.styleSheets[0].rules[1].style["font-weight"] ; "

How to input English-Character in non-English keyboard

£可爱£侵袭症+ 提交于 2019-12-11 04:29:26
问题 I'm a Chinese guy.This question trapped me very long time.This is my current method to input English-Charater () in my Chinese-input-method: ^b:: ClipSaved := ClipboardAll Clipboard=() Send ^v Clipboard := ClipSaved Return But,I really don't want to call the clipboard to do this thing,and the clipboard method is inconvenient to input multi-line text .Any better suggestion can give? Note it is () but not () 回答1: How about sending the ASCII values for left/right parentheses? F3:: SendInput,

Sending keystrokes/mouse clicks to a Java program with Autohotkey

岁酱吖の 提交于 2019-12-11 04:24:17
问题 Im trying to send keystrokes and mouse movements to a Java program but once the applicaton has focus nothing is sent. It's as if the Java application takes focus of everything because Autohotkey stops responding. Everything works fine in a regular Windows app (e.g. Notepad). I've tried using various send methods (Send, SendInput, and SendEvent) but nothing works. Does anyone have any suggestions? The program in particular is ThinkOrSwim's ThinkDesktop. 回答1: I was able to get my script running

AutoHotKey run program on any key

与世无争的帅哥 提交于 2019-12-11 04:12:11
问题 I'd like to run a program when any key is pressed with AutoHotKey Something like: AnyKey::Run, D:\my\program\to\run\on\any\key.bat EDIT2: This code is working perfectly: #InstallKeybdHook SetTimer, AnyKeyPressed, 100 AnyKeyPressed: if( A_TimeIdlePhysical < 100 ){ Run, D:\my\program\to\run\on\any\key.bat } ^!p::pause 回答1: A simple solution: #InstallKeybdHook ; this MUST be called at the start of your script AnyKeyPressed() ; returns a 1 if any keyboard key is pressed, else returns 0 { if( A

AutoHotKey: How to access array with counter variable

怎甘沉沦 提交于 2019-12-11 03:15:58
问题 ; Declare the window_title_array window_title_array%1% = 3270 Display A - A window_title_array%2% = 3270 Display A - B window_title_array%3% = 3270 Display A - C window_title_array%4% = 3270 Display A - D window_title_array%5% = 3270 Display A - E window_title_array%6% = 3270 Display A - F counter := 1 my_string := window_title_array%counter% MsgBox, %my_string% How to get the string from the array with a counter variable? I tried to do counter = 1 and counter := 1 . Both of them failed to