open a Finder's window with applescript a set focus on the spotlight search box -


i want open finder's window folder , set focus search box, can start typing right away. script have far (ok, open new finder's tab, not window, totalfinder), , have not been able find focus be.

any hint?

thank you.

property the_path : "/users/solignani/google drive/c-avv19/doc di lavoro/pratiche/"  set the_folder (posix file the_path) alias  delay 0.5 -- necessario per evitare che tasti vengano premuti assieme  tell application "finder"  activate  if window 1 exists      tell application "system events"         keystroke "t" using {command down} -- apre un nuovo pannello     end tell      set target of window 1 the_folder  else      open the_folder  end if  end tell 

you can add tell application "system events" keystroke "f" using {command down} after setting target of window. select search bar , enable start searching immediately.

if not search in current folder (or target selected window) go finder preferences, click 'advanced' tab , change 'when performing search:' drop-down menu 'search current folder'

enter image description here


Comments

Popular posts from this blog

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

Android Gson.fromJson error -