Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by oposx

  1. Hey @giovanni and @deanishe! First off thanks a lot for the help, I knew I was doing something very wrong lol. Thanks, I'll keep this in mind for the future, but in this specific case I want to use Safari, been trying to avoid Chrome :). This much simpler and to the point though, than what I had made with Applescript, thanks either way! Also, interesting that Run NSApplescript doesn't work with variables, good to know for future workflows. If isn't asking too much, why though? Is there any specific situation where it'd be better to use Run NSApplescript over "Run Script Action with Language"? Welp, I did not know this lol. Thanks for clearing this up, I was very confused as to where I should create the query variable and in the end I didn't even need it. Again, thank you both for the help!
  2. Hello all. So I've been trying to set up a workflow (since I couldn't find any online) that lets me search the web using a new private window in Safari. If it could work exactly like the default web search, but in a private window, that would be great, but I am having some trouble. First off I am not a programmer, and all the related answers I found online were using Applescript, so that's what I've been trying to use. Yeah I realize it isn't the best of languages, but I had nothing else to go on unfortunately. What I did was basically take a similar script I found online and try to modify it to search the web after opening the private window. I was able to do so, but now my next challenge has been trying to use Alfred's variables inside my Applescript, and I am totally lost. This is the script below: on alfred_script(q) tell application "Safari" activate tell application "System Events" tell process "Safari" keystroke "N" using {shift down, command down} delay 0.5 tell application "Safari" to search the web for (system attribute "search") end tell end tell end tell end alfred_script Where I have "(system attribute "search")", is where to search using the terms I input into Alfred. I configured my keyword to be "gp", so ideally I'd just type "gp hello" and it'd search for "hello" in a new, private window in Safari. What is happening, though, is that it is just opening a new private window without any input at all. I assume I am doing something wrong with the variable in Alfred and/or Applescript, but I haven't been able to find any help online and everything I've tried hasn't worked. Right now I have the connector between the Keyword and the Applescript being an Arg and Vars, with only 1 new variable created in it (name: search, value: {query}). I've also tried configuring this variable using the Workflow Environment Variables and still, nothing. Please help. Here's the link to the workflow, as well. Thanks.
  • Create New...