Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing argument to applescript app: possible?

Status
Not open for further replies.

captsnappy

Programmer
Feb 19, 2009
107
US
My head hurts from Googling for an answer to my problem.

I wrote an app in AppleScript to open a network folder. It works when the folder name is hard coded. Here is the AppleScript
Code:
set mylocation to "smb://server.domain.com/network/afolder"
tell application "Finder"
[indent]open location mylocation[/indent]
[indent]activate[/indent]
end tell

I'm using the LotusScript Shell() command to call the app from a IBM Notes application. It works. Here is that LotusScript statement:
Code:
comstr = "open -a OpenMyFolder.app"
taskid% = Shell(comstr)
This works.

What I want to do is to pass the folder path as an argument to the app. As in:
Code:
comstr = "open -a OpenMyFolder.app smb://server.domain.com/network/afolder"
taskid% = Shell(comstr)

So far I have not found a way to pass an argument to an app.
(So simple on the Windows side using cscript.....)

Any ideas?

Thanks in advance
Trey

Trey Harris
hdb
Houston
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top