小白求教,autohotkey脚本运行不正常

Post a reply


In an effort to prevent automatic submissions, we require that you complete the following challenge.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :| :mrgreen: :geek: :ugeek: :arrow: :angel: :clap: :crazy: :eh: :lolno: :problem: :shh: :shifty: :sick: :silent: :think: :thumbup: :thumbdown: :salute: :wave: :wtf: :yawn: :facepalm: :bravo: :dance: :beard: :morebeard: :xmas: :HeHe: :trollface: :cookie: :rainbow: :monkeysee: :monkeysay: :happybday: :headwall: :offtopic: :superhappy: :terms: :beer:
View more smilies

BBCode is ON
[img] is OFF
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: 小白求教,autohotkey脚本运行不正常

Re: 小白求教,autohotkey脚本运行不正常

Post by Guest » 15 Oct 2019, 19:43

非常感谢大佬

Re: 小白求教,autohotkey脚本运行不正常

Post by tmplinshi » 15 Oct 2019, 07:16

因为默认情况下热字符串会删除热字符串自身,当发送 Backspace 键删除字符时又触发了资源管理器的后退功能,所以就出现了你说的这种情况。

可以使用 b0 关闭发送后退键。

Code: Select all

:*b0:ad::
	MsgBox, mypath
return
也可以单行:

Code: Select all

:X*b0:ad::MsgBox, mypath

小白求教,autohotkey脚本运行不正常

Post by zhizunbao84 » 15 Oct 2019, 05:27

请教各位高手,我的电脑是win7 64位,使用autohotkey 1.1.31.01

测试代码:

Code: Select all

:*:ad::
MsgBox, mypath

定义了个热字符串,弹出个对话框,上面显示mypath

但是运行很诡异,除了弹出mypath,还会导致我的目录跳来跳去
Attachments
33333333333.gif
33333333333.gif (1.67 MiB) Viewed 680 times

Top