Search found 65 matches

by llinfeng
18 Nov 2020, 16:28
Forum: Ask For Help
Topic: On disabling the Magnifier Topic is solved
Replies: 0
Views: 37

On disabling the Magnifier Topic is solved

I find the Magnifier not useful and was intending to disable it completely. Yet, as clarified in the following screenshot (from Windows Settings window), the " win + + " shortcut will "turn on Magnifier". image.png I was surprised first, and then searched around for a while, for why the following tw...
by llinfeng
26 Apr 2020, 13:40
Forum: 脚本函数
Topic: AHK "driver" for Thinkpad Keyboards - 小红点按下中键,用指点杆上下左右滚动页面
Replies: 1
Views: 2044

Re: AHK "driver" for Thinkpad Keyboards - 小红点按下中键,用指点杆上下左右滚动页面

llinfeng wrote:
05 Apr 2020, 19:12
使用:最保险的方法是删除ThinkPad键盘自己会装上去的驱动,名字大概叫“Thinkpad compact keyboard with bluetooth”,
保留原有的 ThinkPad Keyboard 驱动该也能正常工作,但要记得取消对“ThinkPad Preferred Scrolling”的勾选,如图:Image

另外,这个脚本起两个作用:1. 保留原先按住中键上下滚动的功能;2. 保留单击中键的功能。
by llinfeng
18 Apr 2020, 19:15
Forum: 请求帮助
Topic: 中文字符串赋值给剪切板会变乱码【需要对应的Windows设定?】
Replies: 3
Views: 6135

Re: 中文字符串赋值给剪切板会变乱码【需要对应的Windows设定?】

@Marcosa1020 我没坚持到你回复,重装个系统就好了 lol
by llinfeng
18 Apr 2020, 18:16
Forum: 请求帮助
Topic: 如何解决从PowerShell转化过的中文乱码问题?【Markdown转换到富文本格式】 Topic is solved
Replies: 6
Views: 30998

Re: 如何解决从PowerShell转化过的中文乱码问题?【Markdown转换到富文本格式】 Topic is solved

简单粗暴的解决——直接重装问题电脑(上述问题只发生在一台机器上,可能是Dell Alienware的操作系统安装包有问题。换作普通的Microsoft Windows 10的 Media Creation Tool 试了下,他就自己好了 lol)

重装之后的配置:对System Locale选做Simplieid Chinese,为保险起见,也勾选了个啥Beta feature,参见这个截图Image

别的配置就再没调整,powershell的配置也没有碰。
by llinfeng
06 Apr 2020, 11:40
Forum: Ask For Help
Topic: How to extract texts displayed in MsgBox without the markers?
Replies: 3
Views: 334

How to extract texts displayed in MsgBox without the markers?

Can I add some option to MsgBox , so that I can Copy (with ctrl + v ) from its message box ONLY the input that I have fed to it? For now, I am using Vim macros to clean up the markers around the real contents of interest. A typical clipboard content obtained by pressing ctrl + v in a MsgBox window:...
by llinfeng
06 Apr 2020, 11:15
Forum: 请求帮助
Topic: 中文字符串赋值给剪切板会变乱码【需要对应的Windows设定?】
Replies: 3
Views: 6135

Re: 中文字符串赋值给剪切板会变乱码【需要对应的Windows设定?】

实际使用情景是这样的:下面的 SubRoutine 可以保存当前浏览器标签页的 题目 和 链接地址 ,排版做Markdown格式(纯文本)并更新给剪切板。在其他Windows电脑上用的好好的,在问题电脑上就会粘出来乱码。 ; Single URL with tab title ahk_tool_copy_single_url: { Clipboard = ; empty clipboard url_list := "" first_url := "" url := "" Send,^l Sleep,100 Send,^c ClipWait,0 url := Clipboard WinGetTi...
by llinfeng
06 Apr 2020, 11:02
Forum: 请求帮助
Topic: 中文字符串赋值给剪切板会变乱码【需要对应的Windows设定?】
Replies: 3
Views: 6135

中文字符串赋值给剪切板会变乱码【需要对应的Windows设定?】

同一个变量,只有在赋值给Clipboard时,才会出现错误,在Autohotkey内部读取、赋值、显示都没有问题。【注:这个问题只在同一台Windows 10台式机上出现。AHK脚本通过Dropbox同步到其他几台电脑,均没有问题。】 示例 `:: WinGetTitle, WinTitle, A` Str4Clipboard = %WinTitle% MsgBox, %Str4Clipboard% Clipboard = %Str4Clipboard% return 切换到 示例页面 并按下激活热键,能完整得通过 MsgBox 显示标签页标题。然而,同样的内容,赋值给剪切板之后,会粘贴成这样...
by llinfeng
06 Apr 2020, 08:37
Forum: 请求帮助
Topic: 如何解决从PowerShell转化过的中文乱码问题?【Markdown转换到富文本格式】 Topic is solved
Replies: 6
Views: 30998

Re: 如何解决从PowerShell转化过的中文乱码问题?【Markdown转换到富文本格式】 Topic is solved

搜索“PowerShell 中文乱码”,发现——调整Region/SystemLocale,增加Beta: Use Unicode UTF-8 for worldwide language support,能让中文内容在PowerShell里显示了,但最后更新到剪切板的内容还是一堆问号。改动$OutputEncoding也是没有帮助。

下面是改动过Beta: UTF-8支持之后的PowerShell:
Image
by llinfeng
05 Apr 2020, 22:51
Forum: 请求帮助
Topic: 如何解决从PowerShell转化过的中文乱码问题?【Markdown转换到富文本格式】 Topic is solved
Replies: 6
Views: 30998

Re: 如何解决从PowerShell转化过的中文乱码问题?【Markdown转换到富文本格式】 Topic is solved

附上一个特别丑陋的解决办法:用sleep等WSL的emulator打开,再全部通过WSL转换 convert_MD_withWSL: ; Launch WSL emulator run, "C:\Users\llinfeng\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\WLinux Terminal", %USERPROFILE% ; Wait for it to launch sleep 500 ; Then, send the conversion script (added as an alias to WSL) ; ali...
by llinfeng
05 Apr 2020, 19:12
Forum: 脚本函数
Topic: AHK "driver" for Thinkpad Keyboards - 小红点按下中键,用指点杆上下左右滚动页面
Replies: 1
Views: 2044

AHK "driver" for Thinkpad Keyboards - 小红点按下中键,用指点杆上下左右滚动页面

使用:最保险的方法是删除ThinkPad键盘自己会装上去的驱动,名字大概叫“Thinkpad compact keyboard with bluetooth”,或是有“ThinkPad”字号的驱动。整段下面的代码,可以直接添加到日常运行在托盘的ahk程序中,不需要单独创建新文件并运行(单独创建新文件的话,该需要加 #InstallKeybdHook #UseHook,On #SingleInstance ; Allow only one instance of this script to be running. #Persistent ; To stop the script from ex...
by llinfeng
05 Apr 2020, 13:41
Forum: 请求帮助
Topic: 脚本指定窗口,但是窗口切换后就失效了
Replies: 1
Views: 7760

Re: 脚本指定窗口,但是窗口切换后就失效了

你可以试着在脚本最开始的地方加下面的一行,再瞅瞅托盘上的图标会不会中途自己消失。

Code: Select all

#Persistent ; To stop the script from exiting.
by llinfeng
05 Apr 2020, 13:38
Forum: 请求帮助
Topic: 如何解决热键冲突?
Replies: 4
Views: 8531

Re: 如何解决热键冲突?

微信可以用他自己的快捷键呀,基本是OP描述的动作——软件使用的问题,能拿来就用就直接用——过多的强调“自己的行为方式”其实挺浪费时间的

我其实也在磨刀,哎,叹气 :)l
by llinfeng
05 Apr 2020, 13:36
Forum: 请求帮助
Topic: AHK 在OneNote里不能正常工作了? Topic is solved
Replies: 1
Views: 32087

Re: AHK 在OneNote里不能正常工作了? Topic is solved

你的代码,Alt+W在我的OneNote2016里面还能用,但Alt+I和Alt+k确实不管用了。可以考虑用其他的hotkey。

关于高亮:OneNote2016有自己的shortcut,可以用下面的mapping制定给Alt+w:

Code: Select all

!w:: send ^!h
by llinfeng
05 Apr 2020, 12:53
Forum: 请求帮助
Topic: 如何解决从PowerShell转化过的中文乱码问题?【Markdown转换到富文本格式】 Topic is solved
Replies: 6
Views: 30998

Re: 如何解决从PowerShell转化过的中文乱码问题?【Markdown转换到富文本格式】 Topic is solved

问题部分解决:换个思路,在WSL内部完成转换。【Pending: PowerShell的解决思路可能是“适当配置它自己的encoding?”,或是 调换chcp ?(<==链接里的截图坏了)】 步骤: 准备WSL:安装xclip和本地的X Server。 在WSL里面执行下面的command(读取Clipboard,转化作HTML,再用text/html格式粘贴回Clipboard) paste.exe | pandoc -f markdown-smart --from=gfm -t HTML | xclip -t text/html -selection clipboard 然而,目前还不能...
by llinfeng
05 Apr 2020, 11:28
Forum: 请求帮助
Topic: 如何解决从PowerShell转化过的中文乱码问题?【Markdown转换到富文本格式】 Topic is solved
Replies: 6
Views: 30998

Re: 如何解决从PowerShell转化过的中文乱码问题?【Markdown转换到富文本格式】 Topic is solved

Debug Step 2: 用PowerShell转化,并cat文件内容 将Markdown原文保存到raw.md中,用 pandoc raw.md -o output.html 转化(在PowerShell里面转化),生成的output.html用其他方式浏览都是没问题的,只有在PowerShell里面,会被读作乱码(output.html的file-encoding也是UTF-8)。在接下来的截图里,我分别在PowerShell和WSL里面显示output.html的文件内容: https://i.imgur.com/pUXjGID.png (如果图床挂了, 原图见imgchr图床链接 )
by llinfeng
05 Apr 2020, 11:14
Forum: 请求帮助
Topic: 如何解决从PowerShell转化过的中文乱码问题?【Markdown转换到富文本格式】 Topic is solved
Replies: 6
Views: 30998

Re: 如何解决从PowerShell转化过的中文乱码问题?【Markdown转换到富文本格式】 Topic is solved

Debug Step 1: 先看pandoc转化这个步骤,PowerShell会出问题。对比PowerShell和WSL对下面这行指令的执行结果: paste.exe | pandoc.exe -f markdown-smart --from=gfm | clip.exe 注:WSL是Windows Subsystem for Linux,可以执行在Path里面的Windows的可执行程序。 先把指令粘贴到PowerShell里面,再把Markdown原文复制到剪切板,最后再执行指令——剪切板内容会更新作: <ul> <li>???<a href="https://www.autohotkey...
by llinfeng
05 Apr 2020, 10:42
Forum: 请求帮助
Topic: 如何解决从PowerShell转化过的中文乱码问题?【Markdown转换到富文本格式】 Topic is solved
Replies: 6
Views: 30998

如何解决从PowerShell转化过的中文乱码问题?【Markdown转换到富文本格式】 Topic is solved

描述:当剪切板里面有markdown格式的纯文本的时候,键入togo,会打开PowerShell来转换成“可粘贴的富文本”。 问题是:目前仅限于英文文本的转换,中文会变成乱码。希望对中文的Markdown文本也能被转换成富文本。 (注:没有"-smart"的时候,英文的单引号也会输出成?,对markdown的文本形式附上个-smart,可解决。) 简化问题是:如何把需要WSL执行的命令完完整整的用AHK激活? 。详见 这个新回复 (第一行有:“问题部分解决:换个思路,在WSL内部完成转换”) ::togo:: Run, PowerShell "paste.exe | pandoc -f mar...
by llinfeng
02 Mar 2020, 12:26
Forum: Ask For Help
Topic: Can I remap keys in the Windows "Win + X" menu? Topic is solved
Replies: 3
Views: 1196

Re: Can I remap keys in the Windows "Win + X" menu? Topic is solved

Follow up question: may I devise other keys other than f ? I am cross-posting the question on Reddit as well: https://www.reddit.com/r/AutoHotkey/comments/fcf9t1/how_to_define_conditional_keysequences_press_a/?utm_source=share&utm_medium=web2x I have tried to keep the functionality of #x witch is wh...
by llinfeng
04 Feb 2020, 21:09
Forum: Ask For Help
Topic: Sharemouse and AHK: how to repeat Ctrl+W keypresses?
Replies: 0
Views: 332

Sharemouse and AHK: how to repeat Ctrl+W keypresses?

Sharemouse is a very expensive piece of software that help people use "local" mouse + keyboard on "remote" computers. Across two Windows 10 machines running exactly the same AutoHotKey script, on the "remote" computer, I cannot repeat Ctrl+W mappings when repeatedly pressing "w" key while holding Ct...
by llinfeng
10 Sep 2019, 18:14
Forum: Ask For Help
Topic: Please help with regex for groupadd: watchout for how you end your auto-execute section Topic is solved
Replies: 8
Views: 1604

Re: Please help with regex for groupadd: watchout for how you end your auto-execute section Topic is solved

Thank you for clarifying! While it originally worked, tasking the second portion of the auto-execute section with SetTitleMatchMode RegEx
no longer works. I have reverted the mappings to use the vimMode function suggested in @swagfag's post.

Go to advanced search