Jump to content

juliosecco

Member
  • Posts

    120
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by juliosecco

  1. Hi ruiguerreiro try setting up a web search with this Search URL: https://cse.google.com/cse?r=m&cx=016685344683901672096:56dgrtoymes&q={query} it seems to work... I didnt know about Custom Google Search Engine too... thanks for the tip Giulio
  2. Really useful, deanishe! thanks for taking the time to post this, now I've this stuff a lot clearer Giulio
  3. wonderful. thanks as usual, deanishe! Giulio
  4. Thanks Andrew, that I was missing... I have seen that in php I can get the variable value using $_ENV["variableName"] I'm looking around also for osascript/javascript, but I have the suspect that's not possible, since javascript, AFAIK, does not have any 'Environment variables' access OK, I'll follow your suggestion thank you! Giulio
  5. Effectively, even in other language like php I can't find the way to read a variable from code... if I setup a php script after an input such as: $query = "{query}"; echo $query; I can see the input argument, but if after setting a variable like {var:name} I put a php script script like $query = "{var:name}"; echo $query; what I see as output is not the content of the variable, but the effective string "{var:name}" same thing in javascript I'm confused at this point
  6. Solved (well, it seems to...) here you have the workflow: since a way to set multiple variables seems to be the 'JSON Config' object, I have simply setup a script that outputs a 'JSON config' object, after handling the input and splitting the query as desired... so my working workflow now has; 1) a keyword object for the input, so you launch it calling on alfred something like prova2 idproj^^projectName; 2) a script tha handles {query}, splits it with ^^ delimiter and then outputs the JSON to set the variables: sorry, it is php at the moment, it is the language I find more quick along with javascript, here the code: <?php $query = $argv[1]; $vars=explode('^^',$query); echo '{ "alfredworkflow" : { "arg" : "{query}", "config" : { }, "variables" : { "idp": "'.$vars[0].'", "name": "'.$vars[1].'" } } }' ?> the code simply sets $query to the input, then puts the splitted values on an array $vars then echo ( outputs ) the JSON setting the variables 3) the large type shows the variables, outputting {var:idp}-{var:name} I'm sure it can be easily rearranged in phyton obviously it should be refined, for example to correctly escape single quotes on project name, or other things that doesn't come in mind at this hour, but it works... now the question is: am I doing something that works for casuality, or is it a good and stable approach? regards, Giulio
  7. Hi agileadam, please don't take seriously my way to do it, that's of little use and purely 'academic', and a way to play a little with Alfred to learn new things, but I'm posting it anyway to ask me too if there's a better way... here the picture ( no code indeed! ) : 1) the keyword object accepts keyword and input ( something like 123^^progetto ) 2) Args and vars stores the input on variable 'project' 3) the replace perform a regex on input (.+)\^\^(.+) and returns $1 ( the first part ) 4) Args and vars stores the input on variable 'idp' 5) Args and vars simply outputs again {var:project} 6) the replace perform same regex on input (.+)\^\^(.+) but returns $2 ( the second part ) 7) Args and vars stores the input on variable 'name' 8) largetype outputs {var:idp} - {var:name} could this be optimized, or maybe could it be performed in parallel, ot there's a way to set variables from code that we are missing? ( I tryed to put two replace in parallel receiving the same string and outputting the two different strings to put on the two different variables but I have problems with this approach... ) Giulio
  8. Sorry too, quaritexa. I'm getting old and maybe a little strict (непреклонный) greetings from Rome, Giulio
  9. OK, please forgive me, but you know, I'm italian, and some kind of a respectful chatting is in my DNA, I'll shut up now
  10. well, at least a little sign of appreciation... In have seen Vero and Andrew answering you like two little Gandhi... please, try to be 'amazing' a little you too, just some little 'thanks' or 'regards' or 'cheers' or 'hi' or 'thanks' while you are posting your questions would be appreciated ( from me at least, but maybe I'm too much sentimental ) Giulio
  11. Hi HileoTech, here some thoughts that I hope could help you go deeper on solving the problem so your problem is that you should know if notifications are activated or not, since you have only the way to toggle it on/off and viceversa but in 'blind' mode... now, assuming that you have an all day time interval set, from 00:00 to 23:59, so you are sure that notifications are activated every time the checkbox will be checked: you can see from the notifications preferences files if notifications are activated or not, the file is here: /Users/userName/Library/Preferences/ByHost/com.apple.notificationcenterui.LONG_STRING.plist obviously UserName and LONG_STRING will be different on your computer the preferences file contains a variable called doNotDisturb that strangely does not seems to change value setting notifications on/off, and is always false. BUT if notifications are activated, the file will contain two variables, dndStart and dndEnd, containing the start and end time for notifications. so if dndStart or dndEnd are set you can check if notifications are active, and the interval set. you can use a tool called PlistBuddy ( it was just deanishe pointing me on it some days ago ) to read the plist directly from terminal and so from an Alfred script using this string: /usr/libexec/PlistBuddy -c 'Print dndStart' /Users/userName/Library/Preferences/ByHost/com.apple.notificationcenterui.LONG_STRING.plist this command reads the dndStart property... hope this can be of some kind of use as a starting point... Giulio
  12. NICE suggestion. I didnt know about PlistBuddy, and looking for it I have found it on my my mac, so it is even something that doesn't need to be installed it seems... I'll try this way, thank you! Giulio
  13. Hi deanishe, OK, got it. I was hoping to be able to change Environment Variables directly, but storing all in a file is fine anyway thanks
  14. Yes, I see now... you are right, I did try Typinator and effectively is able to do it. I believe that simple tabs in text does not work, but typinator is able to paste the first field and then simulate a tab key, and so on... you are right is feasible Giulio
  15. Hi, I'm looking how can I specify Workflow Environment Variables to store data to use on the workflow itself. what I have not still clear is how to change their values: In the documentation one of the examples is the need for a user to specify his own API key for a service, but how this will be done? OK, he can click on 'configure workflow and variables' and change the value, but is this possible to use the workflow itself to ask for the API Key and store the new value? if yes, how? in the docs is said: These variables can be overridden dynamically within a workflow with the JSON utility object, but overridden means temporarily or what? I did try to set an Environment Variable called 'foo' with value 'aaaa', the put in the workflow a simple 'Args and Vars' object setting 'foo' to 'bbb', and after that displaying {var:foo} shows 'bbbb', but the Environment Variable 'foo' is not changed, so the change seems temporarily. did try also a JSON object: { "alfredworkflow" : { "arg" : "{query}", "config" : { }, "variables" : { "foo" : "cccc" } } } and again the value of 'foo' is changed, but but the Environment Variable 'foo' is not changed ( did try also to change in the "config" section. I have not seen on the examples something that stores new values on Workflow Environment Variables, I'm sure I'm missing something. thank you, Giulio
  16. Hi Sasha, YES I'm convinced I can convince my customers to use Alfred, it depends simply and only if Alfred usage give them a benefit or not here the real world example I have in mind: my next job will be redesign an italian website (and backoffice) of production music libraries I did a lot of years ago; it contains more than 340.000 audio tracks to search for, used by TV and video professionals all around Italy to search music for their spots, commercials, documentaries, movies, etc. to have control of the trends we will focus more and more on statistics on the new website ( listenings, downloads, keyword searchs, purchases... ); for such statistics (and other functionalities) I'll prepare a nice web control panel, with all the nice graphs, exporting options and all the bells and whistles you can imagine; but what about if I show them that with a single hotkey or gesture can appear: An Alfred workflow that lists some kind of functionalities and statistics ( listening and downloads on the last week for example ), and offer my customers the quickest way imaginable to: 1) paste the data on an underneath spreadsheet 2) insert it on a text document 3) send the data by mail 4) all you can imagine and can be done using Alfred more: search the registered website users and mail them, or paste their data somewhere, or see their contact info in large type to call them, all you can do with the 'Contacts' function of Alfred but with users data living on a remote server... all in the quickest way possible and outside of the web control panel can you see? more, since all the database queries would already be ready on my remote php file ( since my web control panel needs them ), I think once setup the first workflow functionality, I could setup dozens of it on an afternoon, just changing the kind of request... yes, as I said it will be an experiment I want to do, but I'm quite sure I can arrange something they will love to use, and maybe after some time, they will learn and love to use Alfred also as a 'simple Launcher' I'll try, time will tell... Giulio
  17. Hi all, just two days playing with the new powerful workflows functionalities, and just by night, being busy with everyday job, but I'm so impressed by the possibilities, that I'll stop calling it a launcher, and I'll call it an IDE. A particular ( and fun! ) kind of IDE, focused on specific, faceless and quick kind of tasks, but that is. I have a lot of more internal little uses in mind for my little company, but I'm seriously considering on some projects in the future, along with desktop or web functionalities, to offer some customers when appropriate and obviously when they own a Mac ( but mostly do ), to perform some quick tasks or database queries using Alfred workflows. I'll begin experimenting the approach with a project is going to start now, so this big update was just in time. great job, Giulio
  18. I am afraid that nothing can be done on Alfred side, but it's more a problem about how forms work. You can already insert tabs in snippets but a form will not use them to change field, just like you can create in a text editor a string containing tabs and the forms will still not fill.
  19. I'm quite reluctant, after such a lot of beautiful and useful improvements with Alfred 3, to make suggestions at this early time, anyway the need to ask is given by the need to use at the best one of the new features. collections can be so much useful, apart from grouping related snippet, as sequences of operations ( remote server, sql queries, terminal commands ) here the request: the possibility to order the snippets in the collection; hitting the snippets hotkey, have Alfred opened listing the last collection; anyway if feasible not too urgent breathe freely for a while, the rest seems fantastic at the moment Giulio
  20. Welcome! I am also a quite recent user, but I couldn't imagine now my Mac without Alfred! Giulio
  21. Well, glad to help you on a 'quirky' way!
  22. Just guessing, but CMD space is the default combo for spotlight, did you try to uncheck or change it on Mac OS X preferences?
  23. I do the same with my trackpad. I have gestures to show Alfred Search / Clipboard and Snippets and gestures linked to key combinations that launch Alfred workflows. more, if in Bettertouchtool you have more than one action linked to the same button / gesture, they will appear as a contextual menu, allowing you to choose which one to launch
×
×
  • Create New...