Search found 30 matches

by knn
29 May 2020, 19:00
Forum: Ask for Help (v1)
Topic: Close other tab in Notepad++
Replies: 4
Views: 678

Re: Close other tab in Notepad++

iPhilip wrote:
29 May 2020, 18:18

Code: Select all

#IfWinActive ahk_class Notepad++
^e::
   WinMenuSelectItem, A, , View, Tab, Next Tab
   WinMenuSelectItem, A, , File, Close
Return
#IfWinActive
Doesn't work. Only works when the menu bar is visible :shifty:

Is there maybe a scintilla way to close a tab?
by knn
29 May 2020, 18:46
Forum: Ask for Help (v1)
Topic: Detecting keyboard type/device name
Replies: 5
Views: 2547

Re: Detecting keyboard type/device name

Albireo wrote:
29 May 2020, 17:08
(Have no idea what this is - maybe something for you?)
DeviceInterfaces.ahk
Thank you very much for your help. That's a huge script and I am not sure it would run on a non-elevated account. The script you posted works fine :dance:
by knn
29 May 2020, 17:49
Forum: Ask for Help (v1)
Topic: Close other tab in Notepad++
Replies: 4
Views: 678

Re: Close other tab in Notepad++

First of all, thank you very much!!

You use Send,{Blind}w to close the tab. If I define CTRL+W to be something else or if I want CTRL+W to close the left tab, then your code won't work anymore.

Is there another way to close a Notepad++ tab?
by knn
29 May 2020, 16:40
Forum: Ask for Help (v1)
Topic: Close other tab in Notepad++
Replies: 4
Views: 678

Close other tab in Notepad++

Is it possible with AHK to close the "next" Notepad++ Document, i.e. to close a tabulator which is to the right of the tab that I am in?

So, if I press CTRL+W it closes the current tab, but CTRL-E would close not the current tab but the next tab?
by knn
29 May 2020, 11:05
Forum: Ask for Help (v1)
Topic: Detecting keyboard type/device name
Replies: 5
Views: 2547

Re: Detecting keyboard type/device name

Do you see the name of the keyboard somewhere? (in the device manager?) Maybe this give you all devices? ; Enumerate Query for device in ComObjGet("winmgmts:").ExecQuery("Select * from Win32_PnPEntity") list .= device.name "`n" MsgBox, %list% Yes, this works :bravo: Is there a way to list Keyboards...
by knn
28 May 2020, 12:27
Forum: Ask for Help (v1)
Topic: Detecting keyboard type/device name
Replies: 5
Views: 2547

Detecting keyboard type/device name

Is there any way programmatically to detect the Keyboard Type/Keyboard name? The reason is, I am often switching keyboards and computers, yet I would like to have only 1 .ahk script.

Can AHK fetch the keyboard name from the device manager or so?
by knn
03 May 2020, 19:38
Forum: AutoHotkey Development
Topic: v2-thoughts Discussion
Replies: 51
Views: 55670

Re: v2-thoughts Discussion

I am by no means an AHK expert, but for v2 I would like to have $variable names, i.e. names which start with a $ . Simply allow it as a normal character (like in Javascript) or as a mandatory prefix (like in PHP). That way one can program syntax highlighting better (UDL files for Notepad++). Also I ...
by knn
02 May 2020, 23:42
Forum: Ask for Help (v1)
Topic: Pasting without losing selection
Replies: 11
Views: 1533

Re: Pasting without losing selection

This seems to be working here but it requires the Menu to be visible(unless you map a hotkey to the "Begin/End Select" from Settings=>Shortcut Mapper I've added now a shortcut to Notepad++. Thank you for that tip. Now everything works. Interestingly, sometimes clipboards do get messed up when I use...
by knn
02 May 2020, 14:57
Forum: Ask for Help (v1)
Topic: ahk_control?
Replies: 3
Views: 384

Re: ahk_control?

Thank you!!! That's what I was looking for.

However, when I do it in Firefox's or Opera's URL bar, it shows nothing. Hmmm :think:
by knn
02 May 2020, 14:23
Forum: Ask for Help (v1)
Topic: ahk_control?
Replies: 3
Views: 384

ahk_control?

Is it possible to get the name of the currently active control? Something like ctrlname := WinGetControl("A") or WinGet, ctrlname, Control, ahk_id %hwnd% and it would return "Scintilla1" or "Edit2" or so? I know that you can use Window Spy, and I know that you can get a list of all control names wit...
by knn
02 May 2020, 03:28
Forum: Ask for Help (v1)
Topic: Pasting without losing selection
Replies: 11
Views: 1533

Re: Pasting without losing selection

GEV wrote: What about this

Code: Select all

^v::
	MouseMove, A_CaretX, A_CaretY, 0...
Your code doesn't work for me. Also I guess it would fail when the pasted text is long and scrolls the the screen.
by knn
01 May 2020, 18:14
Forum: Ask for Help (v1)
Topic: Pasting without losing selection
Replies: 11
Views: 1533

Re: Pasting without losing selection

This kinda work...most of the time ~^c:: WinMenuSelectItem,A,,Edit,Begin/End Select Doesn't work if the menu bar is hidden :( Could it be done via Scintilla Control somehow? I found https www.scintilla.org /ScintillaDoc.html#SelectionAndInformation . Broken Link for safety Could AHK use Scintilla d...
by knn
01 May 2020, 12:42
Forum: Ask for Help (v1)
Topic: Pasting without losing selection
Replies: 11
Views: 1533

Re: Pasting without losing selection

>>>There's mine (now supporting multiple lines) but still only spaces. Took out the tutorial to shorten it down lol Yes, unfortunately it only supports spaces and not other delimiters that ctrl-left stops at, like / or . It also doesn't handle leading spaces and tabs. The fool-proof way (handles ev...
by knn
28 Apr 2020, 16:55
Forum: Ask for Help (v1)
Topic: Pasting without losing selection
Replies: 11
Views: 1533

Pasting without losing selection

When I select text in Notepad++ and then copy ^c and paste ^v, I lose the selection.

Is there a way to paste but keep the pasted text selected?
by knn
27 Apr 2020, 17:03
Forum: Ask for Help (v1)
Topic: Clipboard --UTF-8-->to file
Replies: 7
Views: 1058

Re: Clipboard --UTF-8-->to file

Does File := FileOpen(filePath, "r", "UTF-8") handle UTF-8 with BOM automatically?
by knn
27 Apr 2020, 16:28
Forum: Ask for Help (v1)
Topic: Clipboard --UTF-8-->to file
Replies: 7
Views: 1058

Re: Clipboard --UTF-8-->to file

Thank you very much for your help. I found out the reason why it didn't work. I use PHP to process the UTF-8 file and it turned out that PHP does not automatically handle UTF-8 files with BOM, i.e. the file that was created by AHK's file.write() . I needed to write my own UTF-8 BOM read/write functi...
by knn
27 Apr 2020, 14:49
Forum: Ask for Help (v1)
Topic: Clipboard --UTF-8-->to file
Replies: 7
Views: 1058

Re: Clipboard --UTF-8-->to file

Thank you, I can confirm that the file is being saved correctly. But now the reading back doesn't work.

Code: Select all

file := FileOpen(path, "r-d")
file.Encoding := "UTF-8"
vText := file.read()
MsgBox % vText <--- Shows �ннемЀѸЄ�
file.close()
I tried also with file := FileOpen(path, "r-d", "UTF-8")
by knn
27 Apr 2020, 14:22
Forum: Ask for Help (v1)
Topic: Clipboard --UTF-8-->to file
Replies: 7
Views: 1058

Clipboard --UTF-8-->to file

OK, I've been looking around for a day now and I cannot find the solution. I want to select a text in Notepad++, e.g. фирменно create a UTF-8 file and save the text into it I managed to get the text to display correctly in a MsgBox, so I know that AHK got фирменно correctly. But when I save it into ...
by knn
26 Apr 2020, 22:19
Forum: Ask for Help (v1)
Topic: Pass data from AHK to PHP
Replies: 1
Views: 391

Pass data from AHK to PHP

I want to pass data from AHK --to--> PHP --back to--> AHK. I want to select some text then pass the selected text to a php script (called via c:\php\php.exe myscript.php ) then pass the processed text back to AHK (via stdout or elsehow) Now, the main difficulty is to somehow serialize/JSONify the se...
by knn
25 Apr 2020, 15:15
Forum: Ask for Help (v1)
Topic: How can I get the logged in user (not A_Username)?
Replies: 9
Views: 1429

Re: How can I get the logged in user (not A_Username)?

OK, got this now since the username can contain not only alphanumeric chars wmicOut := ComObjCreate("WScript.Shell").Exec(ComSpec " /C wmic computersystem get username").StdOut.ReadAll() RegExMatch(wmicOut, "(?<=\\).*?(?=$|`n|`r)", username) username := trim(username) MsgBox % "-->" . username . "<-...

Go to advanced search