Search found 21 matches

by AAHKUser
24 Jan 2022, 07:43
Forum: Ask for Help (v1)
Topic: Ask for Help: how to quick show a Gui that contains a lot of pictures?
Replies: 4
Views: 420

Re: Ask for Help: how to quick show a Gui that contains a lot of pictures?

Gui New, +HwndhRed Gui Color, Red Gui Show, w200 h200 Hide Gui New, +HwndhGreen Gui Color, Green Gui Show, w200 h200 Hide Gui New, +HwndhBlue Gui Color, Blue Gui Show, w200 h200 Hide 1:: Gui %hRed%: Show Gui %hGreen%: Hide Gui %hBlue%: Hide return 2:: Gui %hRed%: Hide Gui %hGreen%: Show Gui %hBlue%...
by AAHKUser
24 Jan 2022, 05:47
Forum: Ask for Help (v1)
Topic: Ask for Help: how to quick show a Gui that contains a lot of pictures?
Replies: 4
Views: 420

Re: Ask for Help: how to quick show a Gui that contains a lot of pictures?

ure constantly creating new guis. create the 3 guis upfront, then only show/hide them accordingly. dont create new guis thank you for your quick response, may you tell me any clue or code about the show/hide gosub? I have tried to gosub in the begining before, but i dont know how to make them show ...
by AAHKUser
24 Jan 2022, 03:47
Forum: Ask for Help (v1)
Topic: Ask for Help: how to quick show a Gui that contains a lot of pictures?
Replies: 4
Views: 420

Ask for Help: how to quick show a Gui that contains a lot of pictures?

hi, everyone, Im making a gui that show different button in different app, it requires quick sponse, but mine is slow and i have no idea, so Im here ask for help, thank you! some code from quickquick https://www.reddit.com/r/powerpoint/comments/nlcdjq/quickquick_powerpoint_super_tools_office_hotkeys...
by AAHKUser
17 Jan 2022, 07:56
Forum: Ask for Help (v1)
Topic: how to change the wordwrap of the selected shape in powerpoint by comobj Topic is solved
Replies: 2
Views: 407

Re: how to change the wordwrap of the selected shape in powerpoint by comobj Topic is solved

This works for me: +F3:: oPPT := ComObjectActive("PowerPoint.Application") oPPT.ActiveWindow.Selection.ShapeRange(1).TextFrame.MarginBottom := 0 oPPT.ActiveWindow.Selection.ShapeRange(1).TextFrame.MarginLeft := 0 oPPT.ActiveWindow.Selection.ShapeRange(1).TextFrame.MarginRight := 0 oPPT.ActiveWindow...
by AAHKUser
17 Jan 2022, 03:03
Forum: Ask for Help (v1)
Topic: how to change the wordwrap of the selected shape in powerpoint by comobj Topic is solved
Replies: 2
Views: 407

how to change the wordwrap of the selected shape in powerpoint by comobj Topic is solved

hi everyone, i am new about ComObjectActive, and i have some problem when i try to change the wordwrap and margin of the selected shape in powerpoint. it is a high frequency but no shortcut, cant use alt+jd... there is my current code, i cant find the selected shape: +F3:: oPPT := ComObjectActive("P...
by AAHKUser
10 Jan 2022, 07:46
Forum: 请求帮助
Topic: 【 已解决】我在写在PS和AI内无视中文输入的方法 Topic is solved
Replies: 3
Views: 2634

Re: 我在写在PS和AI内无视中文输入的方法,想大家求助:如何禁止一系列热键,并用另外一个热键恢复其他热键? Topic is solved

最后感觉最完美无感的方法:用图片识别左上角的图片,正在编辑文字的时候的图标是不同的 #if (WinActive("ahk_class Photoshop")) and (not A_CaretX) SetTimer, isT, 150 return isT: ImageSearch, FoundX, FoundY, 0, 0, 150, 150, %A_ScriptDir%\PSt.png if (ErrorLevel = 2) { ; 没找到 MsgBox 2.出错了 Return } else if (ErrorLevel = 1){ ; 没找到,在快捷键模式下 is_typing :=...
by AAHKUser
09 Jan 2022, 01:47
Forum: 请求帮助
Topic: 【 已解决】我在写在PS和AI内无视中文输入的方法 Topic is solved
Replies: 3
Views: 2634

Re: 我在写在PS和AI内无视中文输入的方法,想大家求助:如何禁止一系列热键,并用另外一个热键恢复其他热键? Topic is solved

还有一种是通过切换中英键盘实现,这样的好处是可以看到目前的状态。 #NoTrayIcon #NoEnv #SingleInstance Force ;SwitchIME(04090409) ; 英语(美国) 美式键盘 ;SwitchIME(00000804) ; 中文(中国) 简体中文-美式键盘 SwitchIME(dwLayout){ HKL:=DllCall("LoadKeyboardLayout", Str, dwLayout, UInt, 1) ControlGetFocus,ctl,A SendMessage,0x50,0,HKL,%ctl%,A } #if (WinActive("...
by AAHKUser
09 Jan 2022, 01:35
Forum: 请求帮助
Topic: 【 已解决】我在写在PS和AI内无视中文输入的方法 Topic is solved
Replies: 3
Views: 2634

Re: 我在写在PS和AI内无视中文输入的方法,想大家求助:如何禁止一系列热键,并用另外一个热键恢复其他热键? Topic is solved

目前是这样写的: #NoTrayIcon #NoEnv #SingleInstance Force #if (WinActive("ahk_class Photoshop")) and (not A_CaretX) ~t:: if (!is_typing) { is_typing := true sendinput, {text}t sendinput, {Backspace} tooltip("可以打字了,退出按Esc") } return ~Esc:: if (is_typing) { is_typing := false tooltip("可以用快捷键了") } return #if #...
by AAHKUser
03 Jan 2022, 10:08
Forum: 请求帮助
Topic: 请教大家:menu能否在不同软件显示不同的内容呢? Topic is solved
Replies: 0
Views: 1593

请教大家:menu能否在不同软件显示不同的内容呢? Topic is solved

大家好,我又有问题了,我在写一个类似于定制化右键菜单的小脚本,目前想实现的一个功能是能够根据当前所在的软件不同而显示不同的菜单,尝试了几种方式都没能成功,也没有查到相关的信息,似乎是一个非常小众的用法?所有又来求助于各位,非常感谢! if WinActive("ahk_exe chrome.exe") { Selection1 = 🎩Home Func1 = HomeKey } else{ Selection1 = end Func1 = endkey } Menu, MyMenu, Add, %Selection1%, %Func1% ;Menu, MyMenu, Add, 🎩Home, H...
by AAHKUser
03 Jan 2022, 04:27
Forum: 请求帮助
Topic: 【 已解决】我在写在PS和AI内无视中文输入的方法 Topic is solved
Replies: 3
Views: 2634

【 已解决】我在写在PS和AI内无视中文输入的方法 Topic is solved

在Windows下使用Ps 和Ai 有一个很困扰的问题,就是在中文输入法下按笔刷B,吸管i等快捷键会被输入法挡住,非常影响状态。我目前想到的办法是,在需要输入快捷键的时候自动切换到英文键盘,输入完成后,再自动切换回来,实现无感无影响操作。在修改图层名字、另存文件等地方,可以借助A_Caret来获取状态,实现中英文自动切换,但是在按T激活文字工具,A_Caret无法识别输入状态,所以需要用曲线救国的方式来实现,我想到了实现的逻辑,但是代码能力有限,被如何启动和禁用其他热键给难住了,写不出来,希望能得到各位的帮助,谢谢! 以下的代码中 fwejifjjwk2 提供了很多帮助,非常感谢。 #If W...
by AAHKUser
01 Jan 2022, 21:26
Forum: 请求帮助
Topic: 请教大家一个函数的写法 Topic is solved
Replies: 2
Views: 2141

Re: 请教大家一个函数的写法 Topic is solved

fwejifjjwk2 wrote:
01 Jan 2022, 16:21
我這裡寫 ahk v2 的代碼,給你參考。
我把你另外一篇「模仿mac系统的回车重命名」的需求也合併進來了,創建上下文相關的熱鍵和熱字串很適合用在這裡。

Code: Select all

#HotIf (WinActive("ahk_exe Explorer.EXE")) and (not CaretGetPos(&x, &y))
; 新資料夾
:*:n::
{
	Send "^+n"
}

; 重新命名
$enter::
{
	Send "{F2}"
}
#HotIf
非常感谢!真的从您这里学到了非常多技巧!
by AAHKUser
30 Dec 2021, 07:05
Forum: 请求帮助
Topic: 请教大家一个函数的写法 Topic is solved
Replies: 2
Views: 2141

请教大家一个函数的写法 Topic is solved

各位高手,大家好〜 想请教大家下面的这段代码如何用函数的方式实现,因为涉及到许多按键的同样方式的替换,所以我想用函数的方式来重写这段代码,但我自己尝试总不成功。 :*:n:: If (A_CaretX > 0){ if GetKeyState("Shift"){ sendinput, N } else{ sendinput, n } } else{ sendinput, ^+n } return 我自己写的函数如下,不知为何失败,希望能得到各位指点,谢谢! :*:n:: ; 一键N新建文件夹 GetTheKey(n, ^+n) return GetTheKey(TheKey, TheFunc)...
by AAHKUser
30 Dec 2021, 06:59
Forum: 请求帮助
Topic: 模仿mac系统的回车重命名,遇到了一个问题 Topic is solved
Replies: 5
Views: 70326

Re: 模仿mac系统的回车重命名,遇到了一个问题 Topic is solved

fwejifjjwk2 wrote:
30 Dec 2021, 05:02
@AAHKUser :thumbup:

感謝分享用文本插入點坐標(Typing Cursor Position)來判斷輸入模式的方法。

ahk v2 也可以用

Code: Select all

if CaretGetPos(&x, &y)
厉害!
by AAHKUser
26 Dec 2021, 11:19
Forum: 请求帮助
Topic: 模仿mac系统的回车重命名,遇到了一个问题 Topic is solved
Replies: 5
Views: 70326

Re: 模仿mac系统的回车重命名,遇到了一个问题 Topic is solved

我现在找到最佳的方式了:

Code: Select all

#IfWinActive ahk_exe Explorer.EXE
$enter::
	If (A_CaretX  > 0)
		{
		SendInput, {Enter}
		}
	else
		{
		SendInput, {F2}
		}

	return

#IfWinActive
by AAHKUser
07 Jul 2020, 04:06
Forum: 请求帮助
Topic: 求助:在PhotoShop 和Illustrator中A_Cursor似乎无法获取鼠标状态?
Replies: 2
Views: 5905

Re: 求助:在PhotoShop 和Illustrator中A_Cursor似乎无法获取鼠标状态?

我又实验了一下,因为PS和AI也经常要用到Ctrl和Shift键,所以用主楼的方法经常会出发一些不想要的操作,改了改改改成了用大小写控制中英文状态。但是问题仍然存在,用PS的文字工具,这个脚本就不生效,但在重命名图层、另存为、改变透明度百分比的时候,都是生效的。 ;如果光标不在输入状态,就开大写 ~LButton:: If (A_Cursor = "IBeam") ;当前显示的鼠标光标类型,IBeam(工字光标, 文本选择--输入) SetCapsLockState, Off Else SetCapsLockState, On Return
by AAHKUser
07 Jul 2020, 03:39
Forum: 请求帮助
Topic: 求助:在PhotoShop 和Illustrator中A_Cursor似乎无法获取鼠标状态?
Replies: 2
Views: 5905

求助:在PhotoShop 和Illustrator中A_Cursor似乎无法获取鼠标状态?

大家好,因为在PS和AI中很多快捷键都是单个按键的, 所以需要关闭中文输入法,但有时又需要输入中文,基本每次用久了都会发生在按快捷键的时候,却打开了输入框的情况,很让人恼火。我打算通过A_Cursor来获取鼠标状态,使只有在要输入文字的时候才打开中文输入法,在其他情况下都保持英文输入法。我写的代码如下: GroupAdd, DesignerGroup, ahk_class illustrator ;把需要这个功能的软件编组 GroupAdd, DesignerGroup, ahk_class Photoshop GroupAdd, DesignerGroup, ahk_class GHOST_...
by AAHKUser
28 Jun 2020, 16:43
Forum: 请求帮助
Topic: 请教如何实现Ctrl+C与Ctrl+C+C功能不同 Topic is solved
Replies: 3
Views: 71723

Re: 请教如何实现Ctrl+C与Ctrl+C+C功能不同 Topic is solved

tmplinshi 发现现在空格也会算为字数,我做了一点点点修改,加了一行 ~^c:: Clip:=StrReplace(Clipboard, A_Space, "") ;去掉空格 if IsDoubleClick() ToolTip(StrLen(Clip)" 个字",,,, 2000) Return IsDoubleClick() { static doubleClickTime := DllCall("GetDoubleClickTime") KeyWait, % LTrim(A_ThisHotkey, "~") return (A_ThisHotKey = A_PriorHotKey...
by AAHKUser
28 Jun 2020, 08:17
Forum: 请求帮助
Topic: 请教如何实现Ctrl+C与Ctrl+C+C功能不同 Topic is solved
Replies: 3
Views: 71723

Re: 请教如何实现Ctrl+C与Ctrl+C+C功能不同 Topic is solved

@tmplinshi
非常感谢您的分享!功能很完美,设计的好简洁,我有些地方还看不太懂,正在对这资料看:)
by AAHKUser
26 Jun 2020, 01:18
Forum: 请求帮助
Topic: 请教如何实现Ctrl+C与Ctrl+C+C功能不同 Topic is solved
Replies: 3
Views: 71723

请教如何实现Ctrl+C与Ctrl+C+C功能不同 Topic is solved

我目前参考1Hour实现了按Ctrl+C统计复制的字数的功能,但我现在想实现Ctrl+C复制(单击C),只有按Ctrl+C+C才复制并显示字数(快速双击C) 目前只查到似乎可以用KeyWait或者TimeSet实现,但我写出来时灵时不灵,请教大家该如何修改,谢谢。 $^c:: if (CtrlC_presses > 0) ; SetTimer 已经启动, 所以我们记录键击. { CtrlC_presses += 1 return } ; 否则, 这是新开始系列中的首次按下. 把次数设为 1 并启动 ; 计时器: CtrlC_presses := 1 SetTimer, KeyCtrlC, -4...
by AAHKUser
22 Jun 2020, 22:25
Forum: 请求帮助
Topic: 模仿mac系统的回车重命名,遇到了一个问题 Topic is solved
Replies: 5
Views: 70326

Re: 模仿mac系统的回车重命名,遇到了一个问题 Topic is solved

@fwejifjjwk2
非常感谢!,这个脚本很好用,另外还要感谢您提供的原始网址,以后再写新脚本,知道怎么搜索了。

关于打开文件的话,可能和个人习惯有关,因为我只习惯用双击打开,正好不会用到Enter :)

Go to advanced search