我知道 f5 可以打开跳转到单元格对话框,它的问题在于,虽然它允许您执行一次,但下次按 f5 时,可以跳转到另一个特定单元格,即上一个文本未突出显示,因此您需要将手从键盘上移开并用鼠标选择它。
如果我能有一种方法让我的手不离开键盘,那将极大地加快我的工作流程。
有什么想法吗?
比如,我需要一个宏来弹出转到范围对话框并选择那里的任何文本,以便我可以输入新的单元格范围(例如:a391)
谢谢!
答案 0 :(得分:1)
有一种向表格添加自定义宏的简单方法。您只需要预先创建一个 bounded script,其中包含一个 function
和您想要的操作。然后您可以按照以下步骤操作:
Tools > Macros > Import
Add Function
并点击 X
关闭。Tools > Macros > Manage Macros
Update
Ctrl + Alt + Shift + {NUMBER}
按照这些步骤,您将轻松创建自定义宏,但如有任何疑问,请随时问我。
答案 1 :(得分:0)
Google 电子表格中的键盘快捷键相当糟糕。如果您使用的是 Windows,我建议您尝试 Autohotkey。它可以将光标移动到屏幕上的任何坐标(坐标可以设置为相对当前窗口)。例如,'Win+F5' 可以作为 F5 + 移动屏幕右上角的光标并执行左键单击。
答案 2 :(得分:0)
适用于 MacOS(High Sierra,可能也适用于较新的操作系统)
我从这里下载了文件 AppleScript Toolbox.osax
:https://astoolbox.wordpress.com/
将文件放入文件夹:/Users/me/Library/ScriptingAdditions
运行 Automator
并启动一个新服务:
粘贴此脚本
activate application "Firefox" -- or "Safari" or "Chrome", etc
set mousePointLocation1 to {1700, 250} -- coordinates depend on your screen size
AST click at mousePointLocation1 number of clicks 1
并保存:
转到 Preferences
> Keyboard
> Services
并为此服务添加快捷方式
之后,您将在此处看到新的快捷方式:
在 Google 电子表格中,我按 F5
以显示面板,然后按 ^F5
并且光标在此面板上跳转并单击。
我是 macOS 的菜鸟,我相信它可以做得更好。这就是我现在设法做到的。
脚本的另一个修改可能更方便:
activate application "Firefox"
tell application "System Events"
key code 96 -- this is F5 key
end tell
delay .5
AST click at {1700, 250} number of clicks 2 -- or 3 maybe
这样您就不需要按 F5
。只需按 ^F5
并继续。
有效
以防万一。如果你懂 Python。我已经设法按下 F5
移动并点击带有 Python 模块 pynput
的鼠标:
from pynput import mouse, keyboard
k = keyboard.Controller()
k.press(keyboard.Key.f5)
k.release(keyboard.Key.f5)
m = mouse.Controller()
m.position = (1700, 240)
m.press(mouse.Button.left)
m.release(mouse.Button.left)
m.click(mouse.Button.left, 2)
https://pynput.readthedocs.io/en/latest/
可以这样转换成macOS Service:
然后您可以通过 Keyboard
> Services
> Add Shortcut
答案 3 :(得分:0)