Translation request, and how to do something simple

Hello Scripters, I won’t even class myself as a Noobie to scripting as I don’t really use scripts daily. However, I work for a European software company and we have a product (Odystar) that is a Mac based PDF workflow solution. One of the nice aspects of the product is that it can incorporate any applescripts to perform automated tasks. We don’t have anyone (any longer) who is competant in scripting and have no intention of supplying the service on a commercial level to our clients. This is all sounding a bit like a plug or scam to get something for nothing, but please believe me when I say this is for my own personal curiosity. I am looking for a description/interpretation of some applescript code. This code is what is used by our software so that it can pass a file to applescript and get back the result (I think). I’m hoping someone can tell me what “result” is generated by the code.

Here it is:

[code]on SetupOdyStarScript()
activate
return “Success”
end SetupOdyStarScript

on FinalizeOdyStarScript()
activate
return “Success”
end FinalizeOdyStarScript

on DoOdyStarAction(inInputFile, inOutputFile, inParameter)

-- Actual script activity goes in here

end DoOdyStarAction[/code]
Once I understand this I want to include the script that will create a new folder to a static path with the same name as the file passed to the script, which I’m assuming I can find as it is one of the variables of DoOdystarAction!?

It sounds so simple and yet I am at a loss. I hope as an introductory post this is not to presumptive or verbose. I look forward to any response. Thanks.

Model: G5 Dual 2.7GHz 4GB RAM
AppleScript: 1.9.3
Browser: Firefox 1.0.4
Operating System: Mac OS X (10.4)

This is what I have, but I get an error from the Finder. Does the syntax make sense? Setting t to inInputFile as string, is this the correct way to assign the filename to a vaiable? This seems so easy can’t somebody help me?


on SetupOdyStarScript()
	activate
	return "Success"
end SetupOdyStarScript

on FinalizeOdyStarScript()
	activate
	return "Success"
end FinalizeOdyStarScript

on DoOdyStarAction(inInputFile, inOutputFile, inParameter)
	activate
	
	set t to inInputFile as string
	
	tell application "Finder"
		activate
		make new folder at folder "Temp" of disk "Macintosh HD" with properties {name:t}
		open folder ("Macintosh HD:Temp:" & t)
	end tell
	
	return "Success"
end DoOdyStarAction

Model: G5
AppleScript: 1.10.3
Browser: Safari 417.8
Operating System: Mac OS X (10.4)

set t to inInputFile as string

tell application "Finder"
	activate
	make new folder in folder "Temp" of disk "Macintosh HD" with properties {name:t}
	open folder t of folder "Temp" of disk "Macintosh HD"
end tell