Halo Demo Dedicated Server Tool

Halo modding and gaming related applications.
User avatar
spida
SEAL
Posts: 500
Joined: Tue Aug 29, 2006 5:40 pm
Location: Sacramento, California

Post by spida » Sun Dec 17, 2006 7:34 pm

hey jus wondering cause it might be kind of cool. would anyone want to direct me to a site besides google or something of how to write basic applescript programs or share with me just quickly how to do that? if not thats cool I just thought it would be fun to do

Yummy
Ranger
Posts: 684
Joined: Wed Jun 14, 2006 5:42 pm
Location: Near Pittsburgh, PA

Post by Yummy » Sun Dec 17, 2006 8:43 pm

All right. google is the answer. Seriously, they have everything, that's where i get all my info.

for a start, try this

go to applescript and type:

display dialog "Open Halo?" buttons {"Open","Don't Open"} default button 1

if the button returned of the result is "Open" then tell application "Halo Demo" to activate
Image

User avatar
Syperium
Ranger
Posts: 1632
Joined: Sun Apr 23, 2006 3:59 pm
Location: An old fart who still remembers his password...
Contact:

Post by Syperium » Mon Dec 18, 2006 11:37 am

I like Apple..... Script! Yummy seems to like it too. Apples are Yummy. *Laughs*.

Yummy
Ranger
Posts: 684
Joined: Wed Jun 14, 2006 5:42 pm
Location: Near Pittsburgh, PA

Post by Yummy » Mon Dec 18, 2006 12:15 pm

Lol very funny Syp....that's as corny as my dad's jokes. :D
Image

User avatar
Syperium
Ranger
Posts: 1632
Joined: Sun Apr 23, 2006 3:59 pm
Location: An old fart who still remembers his password...
Contact:

Post by Syperium » Mon Dec 18, 2006 12:39 pm

... They must be very corny then. *Laughs Very Hard*

Yummy
Ranger
Posts: 684
Joined: Wed Jun 14, 2006 5:42 pm
Location: Near Pittsburgh, PA

Post by Yummy » Mon Dec 18, 2006 12:52 pm

hahaha yeah they are as a matter of fact.
Image

User avatar
Syperium
Ranger
Posts: 1632
Joined: Sun Apr 23, 2006 3:59 pm
Location: An old fart who still remembers his password...
Contact:

Post by Syperium » Mon Dec 18, 2006 12:57 pm

Lol.

User avatar
spida
SEAL
Posts: 500
Joined: Tue Aug 29, 2006 5:40 pm
Location: Sacramento, California

Post by spida » Mon Dec 18, 2006 4:23 pm

sorry yummy i am pretty new to this programming stuff i know html for the most part but this is confusing me ffor some reason. if its not to much to ask could u explain what you meant by your last post of what i write?

>Shadow<
Halo Moderator
Halo Moderator
Posts: 2734
Joined: Sun Apr 02, 2006 9:15 pm

Post by >Shadow< » Mon Dec 18, 2006 4:45 pm

Give us an example of one of your dad's jokes. XD
Image

Yummy
Ranger
Posts: 684
Joined: Wed Jun 14, 2006 5:42 pm
Location: Near Pittsburgh, PA

Post by Yummy » Mon Dec 18, 2006 5:33 pm

Ahh i'm good shadow hahahah.

Alright
Myself wrote:display dialog "Open Halo?" buttons {"Open","Don't Open"} default button 1

if the button returned of the result is "Open" then tell application "Halo Demo" to activate
The first line, display dialog shows just some text asking if you want to open halo (no meaning as of now). Then the buttons line creates a list of the buttons that will be on this dialog, which in this case would be Open and Don't Open. So, whichever button you click will be the "button returned of the result"

If the button returned of the result is
...that means if i click "Open" then the button of the result would be "Open", if i click don't open, then it's no open.

So, i ask the computer, did i click open? or did i click don't open? if i clicked open, THEN, it says open halo demo (tell application "Halo Demo" to activate.) It's really not hard once you get used to it.

Then, here's some sample code from mod replacement script:

Code: Select all

on «event coVScliI» theObject
	if the name of theObject is "update mods" then
		update_mods(true)
	else if the name of theObject is "Switch" then
		if (replacement as string) is oldmod then
			set old_replacement to (item 1 of the_mods)
			«event panSdisA» "You are attempting to replace mod" & return & return & (ASCII character 34) & oldmod & (ASCII character 34) & " with itself. You can't do this."
			tell window "Mod Switcher" to set the «class titl» of «class popB» "the mods" to old_replacement
			tell window "Mod Switcher" to set the contents of «class texF» "switch in text" to old_replacement
		else
			tell application "Finder"
				move file (mapspath & ":bloodgulch.map") to folder (modspath & ":" & oldmod)
				delay 0.5
				move file (modspath & ":" & (replacement as string) & ":bloodgulch.map") to folder mapspath
			end tell
			«event panSdlog» "The mod " & oldmod & " has been taken out, and the mod " & replacement & " has been put in as active." given «class btns»:{"OK"}, «class dflt»:1, «class givu»:3
			update_mods(true)
		end if
	else if the name of theObject is "Choose" then
		update_mods(false)
	end if
end «event coVScliI»

on «event menSchMI» theObject
	tell window "Mod Switcher" to set replacement to the «class titl» of «class popB» "the mods"
	if (replacement as string) is oldmod then
		«event panSdisA» "You are attempting to replace mod" & return & return & (ASCII character 34) & oldmod & (ASCII character 34) & " with itself. You can't do this."
		tell window "Mod Switcher" to set the «class titl» of «class popB» "the mods" to old_replacement
		tell window "Mod Switcher" to set the contents of «class texF» "switch in text" to old_replacement
		update_mods(true)
	else
		tell window "Mod Switcher" to set the contents of «class texF» "switch in text" to replacement
	end if
	
end «event menSchMI»
Most of that is for xcode, so the class things are confusing. And for most programmers, that is very simple.
Image

User avatar
spida
SEAL
Posts: 500
Joined: Tue Aug 29, 2006 5:40 pm
Location: Sacramento, California

Post by spida » Mon Dec 18, 2006 5:59 pm

ok well while waiting I just started to mess around with apple script and i wrote an easy one that lets you just plain and simple open halo demo or whatever application you want. I have also gotten it to open up a web browser and go to a website. i tried but havent been able to get a pop-up that will actually take me to the application and have it open. so yea. I am currently on google searching for ideas but thanks for the help yummy. It is still confusing but if you have any sites that are good or any knowledge or anything you want to share that would be deeply appreciated. Thank you

Kraken
SEAL
Posts: 550
Joined: Mon May 22, 2006 1:32 pm
Location: Michigan, USA
Contact:

Post by Kraken » Mon Dec 18, 2006 6:42 pm

You know what would be fun to do with this program? Just go into Adium and hold down the space bar when you're IMing somebody. You would get time banned from AIM so fast. XD
Image
Image

Monoman
Site Admin
Site Admin
Posts: 2662
Joined: Sat Aug 16, 2003 11:26 pm
Location: Planet Bob
Contact:

Post by Monoman » Mon Dec 18, 2006 7:10 pm

spidathemodder, look at the examples that are already installed on your computer. You can find them in Library/Scripts. Also look through this pdf from Apple.

AppleScript Language Guide
Kansas....Like Paris Hilton: White, Flat, and Easy to Enter. -- Conan O'Brien

Masturbation is like procrastination, they're both great until you realize your screwing yourself.

MGM Discord | MGM Chat
MGM Sig

Yummy
Ranger
Posts: 684
Joined: Wed Jun 14, 2006 5:42 pm
Location: Near Pittsburgh, PA

Post by Yummy » Mon Dec 18, 2006 7:11 pm

Is that all you can think of? :P

Try this.

Make applescript create a random name, then have it IM the person with a bunch of random letters...and make sure to pound the return key with the script every like 2 seconds :D

Why don't I go create that?!

And yes the applescript language guide is so useful when google doesn't solve your problems.
Image

Kraken
SEAL
Posts: 550
Joined: Mon May 22, 2006 1:32 pm
Location: Michigan, USA
Contact:

Post by Kraken » Mon Dec 18, 2006 7:21 pm

I would so download that script.
Image
Image

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests