Launching Applescripts with CS

Hello,
I have discovered that you can have Coldstone call Applications and files. You do so by using the launch url command in Coldstone. you just need to type in file:/// then the path to the file or applications (you need to put .app at the end for applications) where you would put in the url. For example file:/// then type in the path to the file. for example file:///Users/grahamvh/Desktop/spells.cwk would open up Appleworks and have it open the file spells.cwk

------------------
Thanks,
GrahamVH
graham@vhpublications.com (url="http://"http://www.warcraftcentral.net/CGD/home.html")http://www.warcraftc...t/CGD/home.html(/url)

(This message has been edited by GrahamVH (edited 07-24-2004).)

I will keep this in mind.

Alwasy nice to find out something new.

------------------
Magnum gloriam Efeionae est!
The forest is calling,how
will you answer?
(url="http://"http://www.angelfire.com/biz7/pppgames/index.html")P.P.P. Games Online(/url)

The only problem of using that method is that the URL is location specific - it's attuned entirely to the developer's computer. Thus, unless you can guarantee that they are going to install the game in the appropriate place...

Also, technically, the path to anywhere is actually /Volumes/HardDriveName/Applications(or whatever) so you need their hard drive name as well... well, you can get around it, but still. Unless you could force the game to install in a particular location - which would probably be impossible - this method might be more useful as a fun tool rather than an in-game artifact.

Still cool though. Have some karma. 🙂

-Andiyar

------------------
"Any good that I may do here, let me do now, for I may not pass this way again"

Quote

Originally posted by Tarnćlion Andiyarus:
**The only problem of using that method is that the URL is location specific - it's attuned entirely to the developer's computer. Thus, unless you can guarantee that they are going to install the game in the appropriate place...

Also, technically, the path to anywhere is actually /Volumes/HardDriveName/Applications(or whatever) so you need their hard drive name as well... well, you can get around it, but still. Unless you could force the game to install in a particular location - which would probably be impossible - this method might be more useful as a fun tool rather than an in-game artifact.

Still cool though. Have some karma. 🙂

-Andiyar

**

Actually, it will work on any computer. you can actually start the path with file:///Applications/ or file:///Library/ and it will assume the disk is the startup disk. I have tested this on multiple computers. I use the path file:///Library/Legends/test1.app as the path the first time I tested this. Since everyone who uses OS X has a Library folder I would use an installer to place the applescript in the library. I am not sure it would work on OS 9 though...

------------------
Thanks,
GrahamVH
graham@vhpublications.com (url="http://"http://www.warcraftcentral.net/CGD/home.html")http://www.warcraftc...t/CGD/home.html(/url)

(This message has been edited by GrahamVH (edited 07-24-2004).)

Quote

Originally posted by GrahamVH:
**Actually, it will work on any computer. you can actually start the path with file:///Applications/ or file:///Library/

**

Do this mean you could start it with file:///Coldstonegame/ or does only apps and lib work? >.<

------------------
I want to die on a rainy day...

Quote

Originally posted by Ledorax:
**Do this mean you could start it with file:///Coldstonegame/ or does only apps and lib work? >.<

**

Yes, as long as that folder is not inside any other folders.

------------------
Thanks,
GrahamVH
graham@vhpublications.com
http://www.warcraftc...t/CGD/home.html

Quote

Originally posted by GrahamVH:
**Actually, it will work on any computer. you can actually start the path with file:///Applications/ or file:///Library/ and it will assume the disk is the startup disk. I have tested this on multiple computers. I use the path file:///Library/Legends/test1.app as the path the first time I tested this. Since everyone who uses OS X has a Library folder I would use an installer to place the applescript in the library. I am not sure it would work on OS 9 though...

**

Ahh... I see now. But still, you run into the brick wall of user-chooses-installation-folder. Unless you could create an AppleScript that would open up the data file, and replace the appropriate link with the correct one based on the folder's location...

... wait a sec. I wonder if you can actually do that... Hrm. Been a while since I AppleScripted last. Something to consider, I guess....

/introspective.

-Andiyar

------------------
"Any good that I may do here, let me do now, for I may not pass this way again"

Hello,
I created a Demonstration of a Coldstone Application that uses an AppleScript. The Sourcecode for an installer applescript may also be found in this Demonstration. You can also find the source for the Coldstone Applications giving the demonstration. Currently it is OS X only. Get it at (url="http://"http://www.warcraftcentral.net/AppleScript demo.dmg")http://www.warcraftc...ript%20demo.dmg(/url)

------------------
Thanks,
GrahamVH
graham@vhpublications.com (url="http://"http://www.warcraftcentral.net/CGD/home.html")http://www.warcraftc...t/CGD/home.html(/url)

(This message has been edited by GrahamVH (edited 07-25-2004).)

That is the best test ever!!! Nothing happens when I click start test though... What's it supposed to do?

------------------
I want to die on a rainy day...

Quote

Originally posted by Ledorax:
**That is the best test ever!!! Nothing happens when I click start test though... What's it supposed to do?

**

Did you run the installer Script? What OS are you running? It's suppose to play a speech script.

------------------
Thanks,
GrahamVH
graham@vhpublications.com (url="http://"http://www.warcraftcentral.net/CGD/home.html")http://www.warcraftc...t/CGD/home.html(/url)

(This message has been edited by GrahamVH (edited 07-26-2004).)

Thats great!

Thanks for this info.

------------------

Quote

Originally posted by GrahamVH:
**Actually, it will work on any computer. you can actually start the path with file:///Applications/ or file:///Library/ and it will assume the disk is the startup disk. I have tested this on multiple computers. I use the path file:///Library/Legends/test1.app as the path the first time I tested this. Since everyone who uses OS X has a Library folder I would use an installer to place the applescript in the library. I am not sure it would work on OS 9 though...

**

Hrm. I've just reread this and thought: That's not cool, that's bloody genius. However, you're right about OS9 - I think that kind of trick would only work in OSX, as OS9 uses different paths to files, if I remember correctly. I think the file:///Library et al. shortcut only works due to the way OSX reads the drive. In OS9, the directory would be /HardDrive/Library/ - or something similar. I think this is due to the way OSX is built - *nix as opposed to OS9 - and can't be got around... I could be wrong, of course, but I have a gut feeling that the way you've done it here would only be adaptable to an OS9 computer.

Also, as to the AppleScript installer - I think applications such as VISE etc. can install in default directories that the user can't modify - they can place the game, but you could link the actual scripts you want to run in any folder on the hard drive. Or, with an AppleScript installer, you could create a folder in home/Library/Application Support/ with all the files you need. Of course, this makes the game user specific, so you could tell AppleScript to create a new folder in Library - say Library/CGESupport/ and dump whatever files you specifiy in it....

Nice. Very nice. I applaud you. 🙂

-Andiyar

------------------
"Any good that I may do here, let me do now, for I may not pass this way again"

Quote

Originally posted by Tarnćlion Andiyarus:
**Hrm. I've just reread this and thought: That's not cool, that's bloody genius. However, you're right about OS9 - I think that kind of trick would only work in OSX, as OS9 uses different paths to files, if I remember correctly. I think the file:///Library et al. shortcut only works due to the way OSX reads the drive. In OS9, the directory would be /HardDrive/Library/ - or something similar. I think this is due to the way OSX is built - *nix as opposed to OS9 - and can't be got around... I could be wrong, of course, but I have a gut feeling that the way you've done it here would only be adaptable to an OS9 computer.

Also, as to the AppleScript installer - I think applications such as VISE etc. can install in default directories that the user can't modify - they can place the game, but you could link the actual scripts you want to run in any folder on the hard drive. Or, with an AppleScript installer, you could create a folder in home/Library/Application Support/ with all the files you need. Of course, this makes the game user specific, so you could tell AppleScript to create a new folder in Library - say Library/CGESupport/ and dump whatever files you specifiy in it....

Nice. Very nice. I applaud you. 🙂

-Andiyar

**

After extensive testing, I have concluded that this trick will not work in OS 9. However, It will work in Classic mode in OS 10.0-10.2. It will not work in Classic mode in 10.3 for unknown reasons.

If anyone thinks that they can write a better applescript for an installer than what I wrote. Feel free to let me know. I know that my ability to write AppleScripts is crude at best.

------------------
Thanks,
GrahamVH
graham@vhpublications.com
http://www.warcraftc...t/CGD/home.html

Just a note: Do to the fact that CS is in C++, you can pretty much rule out this working on a PC. "Working on PC? Whatever do you mean?"

Well, Java apps are cross platform and I had the thought of using them, but of course the file path wouldn't work...

While we're talking about Java apps... *points to new thread

------------------
Cha0s
(url="http://"http://www.world-of-cha0s.hostrocket.com")The Homepage of Cha0s(/url)

Quote

Originally posted by CI-Ia0s:
**While we're talking about Java apps... *points to new thread

**

*looks left and right, up and down, four hours after post - - doesn't see new thread. ? - ? - ?

------------------
My Doctor said I was having too much wine, women, and song - so I gave up singing because 2 out of 3 is not so bad.
The (url="http://"http://www.evula.org/rduck/")Kingdom of Garendall(/url) sectional map is easily printed from gif format pages.
(url="http://"http://www.ambrosiasw.com/cgi-bin/vftp/dl-redirect.pl/damsels.sit?path=pog/addons&file;=damselsV1.1.sit")Damsels in Distress(/url) - A plugin for PoG. (url="http://"http://www.evula.org/rduck/RD-DEL.jpg")RD-DEL(/url)

*looks around.
*Grumbles about the ASW forums and goes to repost it.

(It was long too... :frown: ).

------------------
Cha0s
(url="http://"http://www.world-of-cha0s.hostrocket.com")The Homepage of Cha0s(/url)

Instead of worrying about making the files go in a particular place so that you can call them, how about putting files on the web and pointing to them? It would require broadband to be effective, but hey, it would work.

------------------
-C#

Quote

Originally posted by C Sharp:
**Instead of worrying about making the files go in a particular place so that you can call them, how about putting files on the web and pointing to them? It would require broadband to be effective, but hey, it would work.

**

That would work for most files, however, applescripts can not be called over the web.

------------------
Thanks,
GrahamVH
graham@vhpublications.com
http://www.warcraftc...t/CGD/home.html