Guide for beginner mac scripters interested in learning how to use Xcode! menu

User Tag List

Results 1 to 14 of 14
  1. #1
    Domminust's Avatar Active Member
    Reputation
    40
    Join Date
    Sep 2006
    Posts
    128
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Guide for beginner mac scripters interested in learning how to use Xcode!

    Hey guys, well im a bit bored and, i know theres alot of anxious people waiting for more mac scripters to come out and make new stuff. So i decided i would make a small guide on how to link applescripts with Xcode for the new people to start developing their own programs!

    so, here we go!


    we're gonna be making a VERY simple spam bot for wow. This is gonna be in its simplist form and note, its not gonna be the best spam bot out there, this is for learning uses

    so, first we need to start with making a Xcode project. and to do that, you need Xcode which can be downloaded here:
    http://connect.apple.com/cgi-bin/Web...wKQ5DG1oLisk5p

    after that, boot up Xcode and go up to file, and then New Project then go down to Application and Choose Applescript Application

    lets name it Project1 and save it on the desktop.
    now, time to make our spambot applescript.

    the main script we're gonna use for this project is
    Code:
    repeat 5 times
    	tell application "System Events"
    		tell application "world of warcraft" to activate
    		key code 36
    		keystroke "spppaaammmm"
    		key code 36
    		delay 30
    	end tell
    end repeat
    now, for some explaining on what it means.
    1.its pretty easy to understand, first things first,you of course have the repeat at the time showing how many times you want your program to repeat you need to put system events in there because thats what we're workin with, and it also opens up so you can compile the whole script better. ( cant think of a better way to explain this part xD)

    2nd.
    Code:
    Tell application "world of warcraft" to activate
    says exactly what it does...: activates world of warcraft, and links it to the following part of the script
    Code:
    key code 36
    .
    this will make wow enter key code 36 which is defined as "enter", which allows the bot to enter the spam you want.

    3rd. we say
    Code:
    keystroke "sppaaamm"
    this defines what you want to say in game,
    and then again:
    Code:
    key code 36
    to enter the text in game.

    last: you then can enter a delay on how many seconds till the app is spammed again.
    and then
    Code:
    end tell
    at the end to end the script, and
    Code:
    end repeat
    to fully end it.

    --- so thats our main script, now to link it into your Xcode program and create your interface!---

    in the main screen of your Xcode project, look under goup and files collum, and choose the top tab, in this case Project1
    at the bottom of this tab you should see Project1.applescript this is where we are going to input the script we made above, as well as another part to define it to a button to execute into WoW.

    so go ahead and open that up and your going to input the script we made with the following changes:
    Code:
    
    oon clicked theobject
    	repeat 5 times
    		tell application "System Events"
    			tell application "world of warcraft" to activate
    			key code 36
    			keystroke "spppaaammmm"
    			key code 36
    			delay 30
    		end tell
    	end repeat
    end clicked
    so, you can see the changes.
    1. Onclicked the object. means activated by button.
    so we say,
    Code:
     if theobject is "enter" then
    right before the rest of the script, doing this defines this script to the button that we will create in the interface and name it "enter"

    at the end of the script we then have to do end if to end the the
    Code:
     if theobject is "enter"
    part of the script.
    after you do all this, hit build and if it builds without any errors you can close this window.

    NEXT STEP! CREATING INTERFACE!
    again in your main Xcode project where you found Project1.applescript
    you should see a file called Mainmenu.nib.
    this is where you build your interface
    so click this and it should bring up a couple windows including: "window, Mainmenu.nib control panel, another control panel for putting interface objects in, and a header option.

    first, click the window with all the interface objects, click the cocoa-controls tab, and then click and drag one of the buttons that say "button" over to the main window.

    after you do that, double click your new button in the main window, and rename it to "enter". ( no quotations of course)
    after that, make sure ur still clicked on the button "enter"
    and head up to the top applebar where you will find Tools. after you see that, go to "Show Inspector"

    this is how your going to link your button with your applescript! click the arrow, its default should be on Attributes, and go down to Applescript.
    name it enter and make sure to click : Action, clicked. and at the very bottom Under script click Project1.applescript.

    save your Mainmenu.nib and exit.

    after that head back to your main Xcode project. and click build at the top of the Xcode window. after it builds search for "project1.app" and open it.

    or you can choose build and go, which will build and then run your app.

    and after you do that! your done!
    click the button on your app "enter" and it should display spaaamm in game.

    again, this is just a tutorial on how to link applescripts with Xcode, not for a good spambot :P this program we have made is kind of pointless as a spambot, but it could be used if you wanted, you can always go into project1.applescript and change your scripts.

    one last note: if you want to have one or more applescripts in your program with buttons, you will need to define every button as following:
    lets say if you want a simple display dialog script. you would do the following:
    Code:
     
    on clicked theobject
    	if theobject is "display dialog 1" then
    		display dialog "this is a test 1"
    	else if theobject is "display dialog 2" then
    		display dialog "this is a test 2"
    	end if
    end clicked
    and so on and so on use " else if" defining new buttons as you go along.


    if you have any questions please ask and hope this was some help on getting you started off
    and forgive me for typo's etc. Kinda late here
    Last edited by Domminust; 05-19-2007 at 04:57 AM.

    https://newfound.cf

    Guide for beginner mac scripters interested in learning how to use Xcode!
  2. #2
    Flying Piggy's Avatar Banned
    Reputation
    1169
    Join Date
    Jan 2007
    Posts
    2,286
    Thanks G/R
    0/5
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Guide for beginner mac scripters interested in learning how to use Xcode!

    Very nice , i hope this guide will encourage more people to create Mac apps .
    +rep

  3. #3
    pyrobladeiac's Avatar Active Member
    Reputation
    16
    Join Date
    Jan 2007
    Posts
    208
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Guide for beginner mac scripters interested in learning how to use Xcode!

    yeah thnaks a lot, brilliant guide +rep
    :wave:

  4. #4
    Nugma's Avatar Field Marshal
    Reputation
    122
    Join Date
    Aug 2006
    Posts
    1,290
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Guide for beginner mac scripters interested in learning how to use Xcode!

    Originally Posted by Flying Piggy
    Very nice , i hope this guide will encourage more people to create Mac apps .
    +rep
    I agree. I don't use Mac but we could use more apps.
    I will return later and rep you, Dom.

  5. #5
    wiredguy8333's Avatar Member
    Reputation
    2
    Join Date
    Nov 2006
    Posts
    45
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Guide for beginner mac scripters interested in learning how to use Xcode!

    Nice can't wait to get started have to wait a few hours thugh to download :P +rep
    Edit: I was looking through my software cds and I came upon my osx tiger instaltion cd I noticed on the cd that it said xcode 2.0 included. So i popped it in the drive and installed it. This saves a lot of hassle of downloading it from the website.
    Last edited by wiredguy8333; 05-17-2007 at 06:38 PM.

  6. #6
    Valmilu's Avatar Active Member
    Reputation
    176
    Join Date
    Oct 2006
    Posts
    167
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Guide for beginner mac scripters interested in learning how to use Xcode!

    Not bad kid you got some spunk


  7. #7
    Domminust's Avatar Active Member
    Reputation
    40
    Join Date
    Sep 2006
    Posts
    128
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Guide for beginner mac scripters interested in learning how to use Xcode!

    Originally Posted by Valmilu
    Not bad kid you got some spunk

    Thanks!

    https://newfound.cf

  8. #8
    gothicemo's Avatar Member
    Reputation
    4
    Join Date
    Apr 2007
    Posts
    33
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Guide for beginner mac scripters interested in learning how to use Xcode!

    nice guide.
    Now all i need is no parrents and lots of time to read this and learn how to use it. +rep mayb some day ill get around to this

  9. #9
    King_yoshi's Avatar Member
    Reputation
    17
    Join Date
    Feb 2007
    Posts
    61
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Guide for beginner mac scripters interested in learning how to use Xcode!

    I have a question. How does warden work on mac? Does it even work for macs or is Blizzard just another idiot company that underestimates macs?

  10. #10
    shadowbladex's Avatar Member
    Reputation
    145
    Join Date
    Apr 2007
    Posts
    948
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Guide for beginner mac scripters interested in learning how to use Xcode!

    Once again very nice Domminust


  11. #11
    Sheavi's Avatar Member
    Reputation
    1
    Join Date
    Jan 2007
    Posts
    20
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Guide for beginner mac scripters interested in learning how to use Xcode!

    Even if I knew almost everything in this tutorial it is good for anyone that wanna start coding their own mac applications. Good job dude!

  12. #12
    rroobboo's Avatar Member
    Reputation
    1
    Join Date
    May 2007
    Posts
    7
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Guide for beginner mac scripters interested in learning how to use Xcode!

    if u wanna become an ADC member its free right??

  13. #13
    Captain Bunny Killer's Avatar Active Member
    Reputation
    15
    Join Date
    May 2007
    Posts
    118
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Guide for beginner mac scripters interested in learning how to use Xcode!

    hey i was wondering so if i wanted to create a farm bot how would i tell it to turn to face the enemy or to move in the direction of it? if i could figure this out it would help alot for making a bot. and also how would i tell it to eat/drink when low on mana or health.

  14. #14
    Stabuindabak's Avatar Member
    Reputation
    21
    Join Date
    Apr 2007
    Posts
    73
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Guide for beginner mac scripters interested in learning how to use Xcode!

    nice. very informative. i really have to try this. and i will.

Similar Threads

  1. Hunters Guide(for beginners or without much experience)
    By jmng93 in forum World of Warcraft Guides
    Replies: 15
    Last Post: 02-02-2010, 07:55 AM
  2. [Warrior] Arena guide for beginners.
    By eloivanelst in forum World of Warcraft Guides
    Replies: 12
    Last Post: 11-04-2009, 04:38 PM
  3. End Gaming Guide For Beginners
    By [Lucky] in forum World of Warcraft Guides
    Replies: 18
    Last Post: 08-04-2008, 11:43 AM
  4. guide for beginners
    By soulbleed in forum World of Warcraft Guides
    Replies: 7
    Last Post: 01-07-2008, 12:33 PM
All times are GMT -5. The time now is 12:08 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search