Simzdk Posted February 4, 2013 Share Posted February 4, 2013 Hi Just wondering if it will be possible to extend the use of "Copy to Clipboard" (Paste to front most app) to feature special keys like Return, Tab and such, and thereby making Alfred an awesome Text Expander? I have seem some workflows with scripts doing this, but would be nice build in. http://d.pr/i/vPrW Link to comment Share on other sites More sharing options...
CarlosNZ Posted February 4, 2013 Share Posted February 4, 2013 Hi Simzdk, Any line breaks and tabs will be preserved just by entering the text "as is". ^^^ That works fine when pasting. Link to comment Share on other sites More sharing options...
Vero Posted February 4, 2013 Share Posted February 4, 2013 I'm not quite sure what you're trying to achieve? Why not simply use returns and tabs in there? Link to comment Share on other sites More sharing options...
Simzdk Posted February 4, 2013 Author Share Posted February 4, 2013 Im looking for simple Text Expander functionality. Say I want to quickly fill out a address form on a webpage. I would focus the cursor in the first field, active Alfred, and Alfred would paste my name first, Tab to get to another field, paste test into that and so on. Tab works in Textmate but doesn't jump between html fields in a webpage. Link to comment Share on other sites More sharing options...
Vero Posted February 4, 2013 Share Posted February 4, 2013 At this point, this is fairly unlikely as this would get to depths comparable to Text Expander and would be complex enough to be its own app. You could have a play around with scripts but for now, I'll say unlikely. Link to comment Share on other sites More sharing options...
jdfwarrior Posted February 5, 2013 Share Posted February 5, 2013 Simzdk, check out my article here: http://jdfwarrior.tumblr.com/post/40355737734/a-little-secret-in-alfred-2-youll-like I removed DashExpander and TextExpander from my machine and use Alfred as my only text expansion app now. Link to comment Share on other sites More sharing options...
Simzdk Posted February 5, 2013 Author Share Posted February 5, 2013 David, That is what I tried, but still dont work in websites. Link to comment Share on other sites More sharing options...
jdfwarrior Posted February 5, 2013 Share Posted February 5, 2013 I use it daily. There must be some step that you are missing. My use case: 1. Create the keyword. For this example, we'll say I'm creating one for my name. So I would set the keyword to be ',df'. 2. Create the Copy to Clipboard output item. Set the data to be copied to be 'David Ferguson'. Set the option to paste to front app. 3. Connect the keyword to the copy to clipboard output. 4. Go to web, apps, etc 5. Cmd+Space to pop up Alfred 6. Type ',df' and press Enter. I used this exact method to expand ',df' into 'David Ferguson' above, and right here. So it works in browsers/in forms. Link to comment Share on other sites More sharing options...
Simzdk Posted February 5, 2013 Author Share Posted February 5, 2013 And by using the tab key in the paste field, you can get Alfred to jump between two input text field in a html page? I cant seem to get that working. If I use the workflow in a pure text field like this, I can see the tab in the text, but it doesnt read as a tab (special key) so it wont jump fields. Link to comment Share on other sites More sharing options...
Simzdk Posted February 13, 2013 Author Share Posted February 13, 2013 Let me try to create an example. Here you have 2 html fields. I want to create a workflow that input value in both. Here is a test-workflow, with a "tab" between "Field 1" and "Field 2" http://d.pr/i/U3mB However it looks like this when used. http://d.pr/i/B172 Hope this makes sense. Link to comment Share on other sites More sharing options...
jdfwarrior Posted February 13, 2013 Share Posted February 13, 2013 What you're looking at doing is using Alfred as a form filler and not a text expansion. These are completely different. Also, something like that is going to be something that is a little more difficult to do because of the fact that web forms are so different. Some have name and email only, some have name, email, address (with 1, 2, or 3 lines), city, state, etc. You CAN do this, but it has the potentially to be wildly inaccurate because of changing forms. To do it would require the use of AppleScript and not using the clipboard. You would have to simulate keystrokes with AppleScript, telling it to keystroke "text", keystroke "Tab", keystroke "text", etc. Link to comment Share on other sites More sharing options...
pgseye Posted March 22, 2013 Share Posted March 22, 2013 I use it daily. There must be some step that you are missing. My use case: 1. Create the keyword. For this example, we'll say I'm creating one for my name. So I would set the keyword to be ',df'. 2. Create the Copy to Clipboard output item. Set the data to be copied to be 'David Ferguson'. Set the option to paste to front app. 3. Connect the keyword to the copy to clipboard output. 4. Go to web, apps, etc 5. Cmd+Space to pop up Alfred 6. Type ',df' and press Enter. I used this exact method to expand ',df' into 'David Ferguson' above, and right here. So it works in browsers/in forms. Thanks for this David - it works great and I now think I'll give Typeit4Me the flick and have one less app to load and take space in the menubar. Regarding your comment about not being a solution as a form filler - I suppose there's also no way to auto insert the date or time (e.g. dt, tm) as with the purpose built text expanders? Thanks Link to comment Share on other sites More sharing options...
CarlosNZ Posted March 22, 2013 Share Posted March 22, 2013 I suppose there's also no way to auto insert the date or time (e.g. dt, tm) as with the purpose built text expanders? This workflow of mine might help you with that. pgseye 1 Link to comment Share on other sites More sharing options...
thiagoaraujos Posted March 24, 2013 Share Posted March 24, 2013 (edited) Hi David Ferguson, Isn't it too much work setting up text expansions inside workflows? I prefer to use the clipboard snippets built-in feature: It works the same way, it's faster to create a snippet, it lets you set a keyword to do the expansion, and it has a separate keyboard shortcut - so your keywords don't conflict with the rest of the stuff, and you don't even need to set a prefix, like "," before the expansion. I only see the need for a workflow if there is some kind of processing involved, like settings arguments or so Edited March 24, 2013 by thiagoaraujos Link to comment Share on other sites More sharing options...
jdfwarrior Posted March 25, 2013 Share Posted March 25, 2013 Hi David Ferguson, Isn't it too much work setting up text expansions inside workflows? I prefer to use the clipboard snippets built-in feature: It works the same way, it's faster to create a snippet, it lets you set a keyword to do the expansion, and it has a separate keyboard shortcut - so your keywords don't conflict with the rest of the stuff, and you don't even need to set a prefix, like "," before the expansion. I only see the need for a workflow if there is some kind of processing involved, like settings arguments or so Snippets do indeed work just as well. The only reason that I personally chose Workflows over snippets was because of the additional space required to use a snippet. For example, with snippets the usage to expand my name would be (by default) '; df'. Notice the space between. I moved from DashExpander and TextExpander and was used to something more like ',df', without the space. Workflows allowed me to do that. So yeah, snippets do it and are probably better suited for it, it was all just a personal preference. And I think at the time I started setting that up and playing with it, I'm wanting to say that snippets and the clipboard history for Alfred 2 had not been finished yet Link to comment Share on other sites More sharing options...
Yoyontzin Posted March 11, 2014 Share Posted March 11, 2014 (edited) I have a file with abbreviation and desired expansions, for example for may LaTeX documents. I have it in Textmate and In there I can expand using this list. Do you think it is possible to make alfrd to read a list like this: ;a \alpha ;b \beta ;thm \begin{theorem} %| \end{theorem} ... ? and not to have to do every single abbreviation by hand? For example I can export my TextExpander snippets in to a single document (a list). It would be perfect If I can just make Alfred to use the list to expand my snippets. Edited March 11, 2014 by Yoyontzin mklement0 1 Link to comment Share on other sites More sharing options...
vitor Posted March 17, 2014 Share Posted March 17, 2014 Going back to the original point of inserting ⇥, ↩, and others, it is fairly easy with applescript. Take into account, however, this will be like pressing the keys without any checking, so it can lead to undesirable results.As an example, if you want to fill your first name, press ⇥ to go to the next field, and fill in your last name, you could have a Run Script node using /usr/bin/osascript as the language, and write something like tell application "System Events" keystroke "<your_first_name>" key code 48 keystroke "<your_last_name>" end tell key code 48 is ⇥, naturally. Something like Key Codes will help you find other codes you might need. mklement0 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now