Jump to content

sandarius

New Member
  • Posts

    6
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

sandarius's Achievements

Helping Hand

Helping Hand (3/5)

0

Reputation

  1. Hmm, this seems to conflict with MacOS's design. So I'll need a hack, like shelling out to the unix "ps" command or similar...
  2. Thanks! But unfortunately two applications can have the same process name -- even if they have a different path. For example, if I make two copies of a web browser, or text editor. Even if I rename them to Firefox1.app & Firefox2.app, they'll still both have the process name "firefox" Unless there is a convenient way to change an application's process name (chatgpt's answers don't give me great confidence), this is the only obvious way to satisfy my use-case. (Otherwise, the wrong instance of an app may get hidden)
  3. btw, I realize that this is odd: procFilePosixPath contains appPath I don't understand AppleScript well enough to know why I must use the "contains" predicate rather than "is equal to". Perhaps procFilePosixPath is a list, rather than a string? I just used massive trial & error, because it's not demystified when printing to logfile or dialog box
  4. Hi! I have a tiny workflow that doesn't work. It's supposed to hide an application, given the path to its executable. Here's a link to the workflow It executes AppleScript, which I just learned for this purpose. It works in Script Editor, but doesn't work when called as an Alfred workflow. Any critiques/ideas? on hideProcess(appPath) set allProcesses to missing value tell application "System Events" set allProcesses to every process end tell repeat with proc in allProcesses try set procFile to path of file of proc set procFilePosixPath to POSIX path of procFile if procFilePosixPath contains appPath then tell application "System Events" set visible of proc to false end tell exit repeat end if end try end repeat return false end hideProcess on run(argv) set appPath to item 1 of argv hideProcess(appPath) end run Platform: MacOS: 14.7 Alfred: 5.5.1 Debugger: Hide Current App[Hotkey] Processing complete Hide Current App[Hotkey] Passing output '' to Automation Task Hide Current App[Automation Task] Running task 'Identify Front App' with no arguments Hide Current App[Automation Task] Processing complete Hide Current App[Automation Task] Passing output '/Applications/Alfred 5.app/Contents/Preferences/Alfred Preferences.app' to Run Script
  5. Hi! I just got Alfred. All the Window Management tasks seem to ignore input. So apparently I can't use "Screen Bounds" → transform the dimensions → "Set Custom Window Bounds" So I guess I need to drop down to AppleScript? Especially if I'd like to also move the window to the centermost display?
×
×
  • Create New...