victordong
-
Posts
7 -
Joined
-
Last visited
Content Type
Blogs
Gallery
Downloads
Events
Profiles
Forums
Articles
Media Demo
Posts posted by victordong
-
-
-
On 9/9/2022 at 12:50 AM, vitor said:
Alfred, by design, needs to be explicitly called. What you can do is have a Workflow which will open/focus the app and run your executable to change the input.
I wrote a script. It's running in the background and run my executable to change the input when i open/focus the app.
Anyway,Thank you for your advice! -
I have different input methods.
Is there a way to automatically switch the input method when i focus on different app?
For example, when i open iTerm2, the input method should be "com.apple.keylayout.ABC (ABC)", and when i open chrome, the input method should be "com.sogou.inputmethod.sogou.pinyin (搜狗拼音)"
I already have a tool to change the input method, It's a binary executable file.
The problem is that i need to execute the binary tool at the right time.
Can alfred help me to trigger a workflow to execute this tool?
None of the triggers seemed to meet my needs.
macOS Monterey 12.5.1
Alfred 5.0.2
-
14 hours ago, vitor said:
Welcome @victordong,
Because you’re directly passing in the text, your argument becomes longer than what macOS can handle. TextEdit can’t even navigate the file on an M1 without hanging.
The solution is to first save the text to a temporary file then read the file in the Run Script.Thanks!
The solution works!
-
-
I made a simple workflow to parse a json text.
It has only three steps, like this
Everything is ok when the selected text is not that large.
But when the selected text is about 16M (a big json text), the workflow does not work and post an error notice.
At the beginning, i thought it was because of the script.
But it will still throw the same error when i delete most of the logic of the script.
Now the run script is below,
query="{query}"
The screenshots of the run script is the fourth picture above.
Alfred version is:
Alfred 5.0.1
Build 2067, Wednesday 27th July 2022
MacOS version is:
I put the example json text on github, https://github.com/ernest-dzf/playground/blob/master/json.tar.gz
can alfred-work-flow do concurrent task?
in Discussion & Help
Posted
The top one executes first, and the bottom one will not wait for the completion of the top one.
That is to say, they are not serial.
Supposed we have another task, called task-c.
The execution of task-c must wait until the completion of other tasks. Is there a way to do that?