Jump to content

jhncbrwn

Member
  • Posts

    19
  • Joined

  • Last visited

jhncbrwn's Achievements

Helping Hand

Helping Hand (3/5)

2

Reputation

  1. @dfay and @deanishe Thank you for the explanations. Searching for "documents" does what I need, it makes the top level "folders" show up. Thanks again for the prompt replies.
  2. Something that has been bugging me for a long time is that when I try to search for top level folders like pages or numbers in ~/Library/Mobile Documents they don't show up. I have added ~/Library/Mobile to the default results and it shows files within the folders but not the folders themselves. Can anybody give me any advice on how to make them show up in my search results?'
  3. I have a workflow based on an AppleScript that I hacked together and it uses xml, I would like to change this to Json but I don't have enough knowledge to do so myself. I am aware that Applescript is not a great language, and that it is not very popular here, but it is the only language that I know a little bit of. If you can help me to "translate" the script below to use Json instead of xmI I would appreciate it. set MyList to {¬ {Country:"Country 1", Ofset:1}, ¬ {Country:"Country 2", Ofset:2}} set MyItems to "" repeat with j from 1 to (count MyList) set MyCountry to Country of item j of MyList set MyOffset to Ofset of item j of MyList set DatePlusOffset to (current date) + MyOffset * hours set DateFormatted to weekday of DatePlusOffset & " " & (text 1 thru -4 of time string of DatePlusOffset) as text set MyItems to "<items>¬ <item uid='" & MyCountry & "' arg='" & MyCountry & "' valid='yes'>¬ <title>" & MyCountry & " " & DateFormatted & "</title>¬ <subtitle></subtitle>¬ <icon>icon.png</icon>¬ </item>" & return & MyItems end repeat return "<?xml version='1.0'?>" & MyItems & "</items>"
  4. Is this helpful? tell application "Music" set MySearchtext to (get name of current track) & (" ") & (get artist of current track) end tell set MyURL to "https://example.com/s=" & MySearchtext --If you want to open it in safari tell application "Safari" open location MyURL end tell --If you want to pass it on to a open url Alfred action return MyURL
  5. Hi, I'm trying to flip an image horizontally using AppleScript. I found some examples online but I can't seem to make them work. Any suggestions would be appreciated. Thanks in advance for any help. Jhn. --- set this_file to choose file without invisibles tell application "Image Events" launch set this_image to open this_file flip this_image with horizontal save this_image with icon -- purge the open image data close this_image end tell
  6. Deanishe thanks for your answer. I have figured out that the variables don't work that way ? The problem is I don't understand what I need to do to make it work. Could you show me what I need to change in the workflow to make it work?
  7. I'm trying to insert a second variable into an AppleScript based workflow but I can't get it to work. This is the AppleScript part set MyDocument to "{query}" set MyText to "{var:text}" tell application "Pages" open MyDocument tell front document set body text to body text & return & MyText end tell close front document end tell The MyTask variable consistently gets appended as {var:text} rather than the actual text passed. Please see the workflow below Append to Pages.alfredworkflow Any advice would be appreciated
  8. If I understand you correctly this is already build into Safari. Press Command + 1 to go to tab 1, Command + 2 to go to tab 2 etc. I hope this helps.
  9. Hi Vero, Thanks for your quick reply. I have the script and I have the workflow, I'm trying to find out how to add the result of the workflow to the default results. At the moment I have to type OmniFocus: Forecast What I want to achieve is that I can start typing "For" and "Forecast" will show up in Alfreds default Results. In other words, can the result of a filter be included in the default results? I hope that this makes it clearer.
  10. I have a workflow to search and open OmniFocus perspectives. Instead of typing a keyword and then the perspective name I would like to just type the perspective name and have them show up in the default results. Is this currently possible?
  11. Hi Deanishe, Thanks for checking, any idea why it doesn't behave the way it should on my machine?
  12. If I run the script below in Applescript Editor when VLC is not running, nothing happens, this is the result that I expect. However when I run the same script as part of a workflow in Alfred, VLC Launches. Any suggestions as to why the result is different in the two applications and what I need to do to get the desired result in Alfred? --set q to "{query}" set q to 300 set vlcrunning to "" tell application "System Events" if (get name of processes) contains "VLC" then set vlcrunning to true end if end tell if vlcrunning is true then tell application "VLC" --set audio volume to 512 set audio volume to q end tell end if Thanks in advance for your help. Jhn
  13. Hi talibusorabat, Thanks for your workflow. You can also do this by setting up a hotkey under Alfred preferences > Features > File Search > Actions > File selection. It addition it would give you all the other file actions like "Copy to...", "Reveal in finder" etc. Regards, Jhn
×
×
  • Create New...