Jump to content

goodkarma

Member
  • Content Count

    5
  • Joined

  • Last visited

Everything posted by goodkarma

  1. Sorry for not including enough info. I know what you mean about that possibly being the error message, but I'm not so sure. Here's an example of what happens when I use the hotkey in TextEdit. 2 . 2 . 2 . myemail@something.com Other times it never gets to the email address and just prints more 2's and periods. Other times it outputs the email address multiple times: 2. 2. 2. 2. 2. 2. myemail@test.commyemail@test.commyemail@test.commyemail@test.commyemail@test.commyemail@test.commyemail@test.com Today it is 2's and periods, but it's often a different letter or number or punctuation mark. But just one or two characters and lots of new lines. Is there any other information I could submit that would be useful?
  2. Thanks! This was super helpful. I've been trying to set this up for a while and I'm having a really weird problem. The workflow works maybe every third time. The rest of the time is dumps tons of gibberish. So, the details of my workflow. For the Hotkey I's tried many options: CTRL-OPTION-<various letters> CTRL-COMMAND-<various letters> OPTION-COMMAND-<various letters> CTRL-OPTION-COMMAND-<various letters> And the script I've been using is just like yours, tried it with Run Script /usr/bin/osascript (AS): tell application "System Events" keystroke "myemail@something.com" end tell And tried it with Run NSAppleScript: on alfred_script(q) tell application "System Events" to keystroke "myemail@whatever.com" end flared_script If anybody has any ideas it would be really helpful. I have been testing with ALL applications closed down. For example: not even google drive or smcFanControl is running in the background. I tried to eliminate anything that might do anything with hotkeys.
  3. Yah, I can see how it might look like an XY problem, but here is more context/examples to maybe make sense of it. I guess the bottom line is that I want to output some text, probably from a file, without losing the current clipboard contents. There are probably ways to do this that don't involve the clipboard at all. I'm just new to Mac in general, so I am probably unaware of them. On Windows I used AutoHotKey which was amaze-balls! I'm trying to figure out some AppleScript and see if that will solve this. So far I have the following... set SavedClipVar to (the clipboard as text) set the clipboard to "Some sample text" tell application "System Events" to keystroke "v" using {command down} set the clipboard to SavedClipVar I don't yet know how to bring in the contents of a text file, which is actually what I'll be doing on line #2. I'm just using sample text to see if the logic works. When I bind that to a hotkey, I just get a -ding- sound as if I pressed an invalid key or something. What am I missing? Any AppleScript wizards out there? I also tried using shell commands: do shell script "pbpaste > ~/temp-clipboard-file.txt" do shell script "cat ~/texts/commonly-used.txt | pbcopy" tell application "System Events" to keystroke "v" using {command down} do shell script "cat ~/temp-clipboard-file.txt | pbcopy" That doesn't work either. Gives the same -DING- sound as if I hit an invalid key. I'll keep playing. If I figure it out, I'll share the solution. Any help appreciated.
  4. After a little more playing, maybe the better way to do it would be with AppleScript -- unfortunately it's one language I don't know, at all. Any chance somebody can translate the following ideas into AppleScript syntax for me? $myVar = $CLIPBOARD; $CLIPBOARD = "Some new text"; // or better yet the contents of a file. Paste // maybe this requires sending a Cmd-V somehow? $CLIPBOARD = $myVar; Thanks again.
  5. Hey Alfred community, I have been DuckDuckGo'ing (and Googling) and reading posts on this forum for hours looking for an answer before posting what feels like a very noob question, but I couldn't find what I needed, so here goes... Is there a way to save the current clipboard to a variable in memory and then at the end of the workflow restore that variable to the current clipboard? I'm used to the logic of a programming languages where you would so something like this: $myVar = $CLIPBOARD; // save clipboard /* Do stuff that uses the clipboard */ $CLIPBOARD = $myVar; // restore clipboard OR.. Is there a way to swap clipboard history item #2 back to item #1 ? That might solve the problem as well. I know I can just use the clipboard history to get to the previous item and I know I could use a shell/script command to save the clipboard to a file and then bring that back. I'm just hoping there is a way to make it quick and easy and keeping the clipboard in memory is probably way faster and smarter if there is a way to do it. Thanks!
×
×
  • Create New...