Hello again,
Would someone know how I can commandeer Unix’ “Go to” command & use it to open files & applications through typing a few characters, tab, autofill, etc. just like it does with opening folders now. I’m running OS/X.2.8. Any assistance/advice would be greatlly appreciated.
TIA
Sincerely,
Variable as the shade
You’d need a AppleScript Studio application, but how and where are you planning integrate such a tool?
Hi jj
Thanks for responding. I find that the easiest and fastest way for me to input commands is with the keyboard. Typing the first few letters of a path or command in a Master Controller script would permit me to run scripts, open folders, files much more efficiently because I wouldn’t have to remember, for example, that pressing F11 is for one command that I’ve preset in Youpi, whereas pressing F12 is for something else–which I have trouble doing. That’s just how I’m wired, I guess.
TIA
Sincerely,
Variable as the shade
Then, you would need something as this pseudo-code (thinking in a simple text field, and buttons “OK” and “Cancel”):
script goto --> first "command"
--> whatever
end script
script opengoogle --> second "command"
--> whatever
end script
property listOfCommands : {"goto", "opengoogle"}
property commands : {goto, opengoogle}
on changed theObject --> rough autocomplete feature
set x to contents of theObject
--> create sub-list of items in "listOfCommands" starting with "x"
--> autocomplete using first occurrence of sub-list
end changedTheObject
on clicked theObject
set x to name of theObject
if x is "OK" then
set x to contents of theObject
--> get offset of "x" in "listOfCommands"
--> if it is not 0 (not found)
tell item n of commands to run
end if
close window of theObject
end clickedTheObject
jj,
Thanks for your suggestion. I think it’s a ball of fire, and intend to make it my first project when I learn 'Studio. I thought, in the meantime, I might try scripting something like this:
(pseudo code)
set temp to display dialog “TYPE TO OPEN:” & return & " (Use Acronym or First 2-6 Characters)" & return & “ptatr,zmwin,” & return & “myfs” default answer “zmwin”
set itemTyped to text returned of the result
–As you can see, if an acronym or the first 2 to say, 6 letters are set as the command, as auto-fill is unavailable for Applescript sans Studio, this may enable me to type fewer characters for the commands and achieve similar results.
tell application “Finder”
activate
if itemTyped is “myfs” then
set MyFnSrch to load script (alias “Drive C:Applications:Internet Connect.app:”)
run script MyFnSrch
else
if itemTyped is “ptatr” then
set AaPpTt to load script (alias “Drive C:Users:Library: Scripts:ApProTemp”)
run script AaPpTt
else
if itemTyped is “zmwin” then
open folder (alias “Drive C:Users:”)
else
more code
end etc
end etc
end etc
Again, this is pseudo code, and as such,
the commands, obviously, are neither
acronymns nor even REMOTELY related to
actual files, folders or apps…
TIA
Sincerely,
Variable as the shade