<?xml version="1.0" encoding="UTF-8"?><rss version="2.0">
<channel>
<title>scripting</title>
<link>http://www.computersight.com/tags/scripting</link>
<description>New posts about scripting</description>
<item>
<title>Guka's Commands</title>
<link>http://www.computersight.com/Programming/Gukas-Commands.123244</link>
<description>
<![CDATA[<p>IRC Bots are a rather fascinating thing. Many people want to make their own, but soon give up when they see how much work bots are. In fact, I almost gave up with GuKa, the bot that I made. The hard part is learning the language that bots speak. It may appear that bots speak English, but that is only half true. Bots that can be found in IRC (Internet Relay Chat) are scripted using a language called mIRC. If you are familiar with IRC, you should be familiar with mIRC, which is one of the many IRC clients. Although mIRC is not the best for inexperienced users, it is an amazing client for anyone who uses IRC a lot, and is also the only client that reads mIRC language (who would have guessed?). 
</p><h3>About Scripting</h3>
<p>
For those of you who want to go out there and make a bot, I won’t lie, you have a lot of work cut out for you. Firstly, you must download mIRC, which can be found here: http://www.mirc.com/get.html. Once you have that installed on your computer, your best bet is to pick at the help files, which can be located under the menu tab “Help” – “Help Files” – “mirc.chm”. There are a ton of pages full of instructions on how to write scripts using the mIRC language. If you stick at it for a month, working with scripts for around 30 minutes a day, you should have the hang of it, and be able to write the more simple scripts that get the bot to say something in reply to what others say.</p>
<h3>A Bot’s Capabilities</h3>
<p>
Bots are able to do more than anyone would think. Bots can have conversations with people. They can be scripted to reply to anything. They can reply to greetings, insults, anything you want them to. Bots can even reply to actions, if you “huggle” or “slap” a bot, it can be scripted to reply accordingly. For example, if you “slap” a bot in IRC, it can “run in a corner and cry” and say, “what was that for?” But this isn’t the limit of a bot, bots can play games with you, such as tic-tac-toe, truth or dare, hot potato, slot machines, death matches, scramble games, etc. And for those fans of RuneScape, I’m sure you’ve already seen this, but bots can be scripted to look up your characters statistics of the game. </p>
<h3>Customizability of Bots</h3>
<p>
One of my favourite things is that you can be creative with bots, and customize the script like you’d want it. I made a script that warns a user when they swear, and gives Op &amp; Half-Ops the choice to punish the violator. If they chose to, the script bans the person from the channel for 1 minute for each time they swore, and then unbans them. This is a very good example of a script that fits my desires. It helps warn users not to swear, and does not necessarily punish them; it leaves the choice up to the Ops and Half-Ops of the channel. Heck, you can get your bot to sing (well, say song lyrics) to anyone who joins that has “cat” anywhere in their name. Just to show you the endless possibilities of mIRC scripting.
</p>
<h3>About GuKa</h3><p>
GuKa is an IRC Bot that uses many scripts from various people. GuKa was created only a few months ago by an amateur scripter, Guble [who also goes by the nick |Mitch|]. </p><p>
Note: GuKa only joins approved channels. This is to prevent abuse. To get your channel approved, email Mitchell.Carrington@gmail.com
Another Note: When you see angle brackets around text, such as  or , this means you must fill in the proper name or time. Example, if you want to insult Bob, you would type  = insult Bob
</p>
<h3>Op &amp; H-Op Commands</h3>
<p>Note: For these commands, GuKa must be at least an Op on the channel</p>
<ul><li><strong>Voice   </strong>		Gives  the rank of Voice (+)
</li><li><strong>DeVoice  	</strong>		Removes ’s rank of Voice (+)
</li><li><strong>Hop  		</strong>	Gives  the rank of Half-Op (%)	[Ops Only]
</li><li><strong>DeHop  	</strong>		Removes ’s rank of Halkf-Op (%)	[Ops Only]
</li><li><strong>Kick  	</strong>		Kicks  from the channel
</li><li><strong>TB    	</strong>	Time-Bans  from the channel for the specified  in minutes
</li><li><strong>KB    	</strong>		Kick-Bans  from the channel
Note: If GuKa is an Admin Operator of the channel (AO), Ops can use these commands:
</li><li><strong>Add    3	</strong>		Adds  to the auto-Voice list for the channel
</li><li><strong>Add   4	</strong>		Adds  to the auto-Half-Op list for the channel
</li><li><strong>Add    5	</strong>		Adds  to the auto-Op list for the channel
</li><li><strong>Del  	</strong>		Removes  from the channel’s access list
</li></ul>
<h3>Misc. Commands</h3>
<ul><li><strong>RandFact </strong>			Displays a random fact
</li><li><strong>Quote	</strong>			Displays a random quote
</li><li><strong>ZdzQuote </strong>			Displays a funny quote from the Zdzira RuneScape Clan
</li><li><strong>Joke </strong> Displays a random joke
</li><li><strong>Seen   </strong>			If GuKa has seen  before, it displays where and when
</li><li><strong>Insult  		</strong>	Insults  using an advanced vocabulary
</li><li><strong>Kill  		</strong>	Attempts to kill . Various ways this can turn out
</li><li><strong>Teach  		</strong>	Teaches  an interesting fact
</li><li><strong>Page    	</strong>	Sends  your 
</li><li><strong>GL    	</strong>		Wishes  good luck on the specified 
</li><li><strong>Gratz     </strong>	Congratulates  on their 
</li><li><strong>Thx     </strong>	Thanks  on 
</li><li><strong>Find  	</strong>		Invites  to the channel you are on, on behalf of yourself
</li><li><strong>Resend	</strong>		Resends the last link that appeared in the channel
</li><li><strong>Protect	</strong>		Enables protection against offensive commands 
</li><li><strong>UnProtect		</strong>	Disables protection against offensive commands
</li><li><strong>Credits </strong> Displays a list of credits to who’s scripts mine were adapted from
</li></ul>
<h3>Custom Greet Commands</h3>
<p>Note: A Custom Greeting makes GuKa say a message every time you join a channel with GuKa</p>
<ul><li><strong>SetGreet  greeting	</strong>	Sets your greet to greeting
</li><li><strong>DelGreet	</strong>	Deletes your old greeting
</li><li><strong>TestGreet		</strong>	Tests out what your greet will look like
</li><li><strong>Greet			</strong>	Greets you with your set greet
</li></ul>
<h3>RuneScape Commands</h3>
<ul><li><strong>RSFact			</strong>	Displays a random RuneScape fact (Note: Some facts may be obsolete)
</li><li><strong>RSPic			</strong>	Displays a funny RuneScape picture
</li><li><strong>AddRSPic  link to picture </strong>	Adds your link to picture to the list of funny RuneScape pictures	
</li></ul>
<h3>Death-Match Commands</h3>
<ul><li><strong>DM			</strong>	Start / Join a Death-Match	[ 2 Players ]
</li><li><strong>Abort		</strong>		Ends the Death-Match
</li><li><strong>Score		</strong>		Displays your score
</li><li><strong>Turn		</strong>		Displays whose turn it is
</li><li><strong>Eat			</strong>	Heals your HP</li></ul>
<h3>Death-Match Attacks:</h3>
<ul><li><strong>Pipe		(Iron Pipe)	</strong>		Fairly strong weapon
</li><li><strong>DBS		(Double Barrel Shotgun)	</strong>	Very strong, uses a lot of ammo
</li><li><strong>Rifle		(Sniper Rifle)		</strong>	Fairly strong, usable when frozen	
</li><li><strong>Shotgun	(12 Gauge Shotgun)	</strong>	Strong, usable when frozen	
</li><li><strong>Freeze		(Liquid Nitrogen)	</strong>	Not very strong, but can freeze your oponent
</li><li><strong>DE		(Desert Eagle)		</strong>	Weak, but is the strongest weapon if your HP is low
</li></ul>
<h3>Slot Machine Game</h3>
<p>Note: This game is still under construction</p>
<ul><li><strong>Slot		</strong>		Pulls the slot lever 
</li><li><strong>Cash </strong> Displays how much Slot Credits you have
</li></ul>
<h3>Truth or Dare Game</h3>
<ul><li><strong>TOD		</strong>		Starts the Truth or Dare game
</li><li><strong>EndTOD </strong>	Ends the Truth or Dare game
</li><li><strong>Truth		</strong>		Gives you a Truth question
</li><li><strong>Dare		</strong>		Gives you a Dare
</li><li><strong>Turn  	</strong>		After you give your answer, this sets the game to ’s turn
</li><li><strong>AddTruth  </strong> Adds your  to a list that will be considered for use
</li><li><strong>AddDare  </strong> Adds your  to a list that will be considered for use
</li></ul>
<h3>Language Commands</h3>
<ul><li><strong>Spell  	</strong>		Checks to see if you spelled  correctly. Offers suggestions if you are incorrect.
</li><li><strong>Translate     </strong>	Translates  from lang1 to lang2. [Supported Languages: English (en) French (fr) Spanish (es) Italian (it) Portuguese (pt) German (de) Dutch (nl)]
</li><li><strong>Slang  		</strong>	Looks up slang definitions of your . Warning: Some may be offensive.
</li><li><strong>Define  	</strong>		Defines the . If the  is not defined, you may define it
</li><li><strong>SetDefine  	</strong>	Sets a definition for the 
</li></ul><a href="http://www.pheedo.com/click.phdo?x=&u=http%3A%2F%2Fwww.computersight.com%2FProgramming%2FGukas-Commands.123244"><img src="http://www.pheedo.com/img.phdo?x=&u=http%3A%2F%2Fwww.computersight.com%2FProgramming%2FGukas-Commands.123244" border="0"/></a>]]></description>
<pubDate>Mon, 12 May 2008 07:22:43 PST</pubDate></item>
<item>
<title>PHP Tutorial: Printing on the Screen</title>
<link>http://www.computersight.com/Programming/PHP/PHP-Tutorial-Printing-on-the-Screen.112786</link>
<description>
<![CDATA[<p>PHP is a script language commonly used by webmasters to design dynamic websites. Unlike HTML which has static content, PHP has dynamic content because of user interaction. Today, most of the qualified websites are designed by PHP or CGI.</p>
 
<p>PHP scripts embedded into the HTML codes. When someone checks the source code of the page, he doesn't get anything about PHP scripts. He only learns the HTML part of coding. This article is an introduction to PHP scripting language. One can find useful information and have enough knowledge after reading my PHP tutorial series. Without delay, I would like to start my script creation step by step.</p>
 
<p>Before starting, you should know that you have to set up PHP installations into your computer. Such installations are PHP itself, Phpmyadmin interface, Mysql database and Apache Server. Without these, your scripts are nothing since they are not compiled by your computer.</p>
 
<h3>Step 1:</h3>
 
<p>To write PHP scripts, we need a place. That place is a simple text editor. You are free to choose your text editor. I prefer  to use Notepad. There are other alternatives like Editplus or Elfima. If your operating system is not Windows but Linux, you can place your code into Vi editor or Pico. I have never tried but I think you can use Dreamveawer, Hotdog or Frontpage.</p>
 
<p>In your text editor, open an new file and save it as &amp;ldquo;myfirst.php&amp;rdquo; or &amp;ldquo;myfirst.html&amp;rdquo; . I choose the name of file as &amp;ldquo;myfirst&amp;rdquo; but you are free to choose anything.</p>
 
<h3>Step 2:</h3>
 
<p>I have told you before that PHP scripts are embedded into HTML codes. So, first of all we will write HTML codes. The basic codes are HTML, TITLE, HEAD and BODY. It can be written by lowercase letters as well. This part is not important.</p>
 
<p><img src="http://images.stanzapub.com/readers/computersight/2008/04/22/149028_0.jpg" alt="" /></p>
 
<p><strong>Step 3: </strong>All PHP scripts start with &amp;ldquo;  &amp;rdquo;. Only the part between two  is compiled by server and evaluated as output.To print characters on the screen, standart output functions of PHP are used. Those are &amp;ldquo; print &amp;rdquo; and &amp;ldquo; echo &amp;rdquo;. In some circumstances, &amp;rdquo; printf &amp;rdquo; is used too.</p>
 
<p>The format of printing:</p>
 <ol> 
<li> print  ( &amp;ldquo; your output &amp;rdquo; ) ;</li>
 
<li> print   &amp;ldquo; your output &amp;rdquo;  ;</li>
 
<li> echo &amp;ldquo; your output &amp;rdquo;  ;</li>
 
<li> echo ( &amp;ldquo; your outpu t&amp;rdquo; ) ; </li>
 </ol> 
<p>If you don't use any white space characters, the strings are written without any separation. For example if you write this code;</p>
 
<ul>
<li>Print ( &amp;ldquo; Word1 &amp;rdquo; ) ;</li>
 
<li>Print ( &amp;ldquo; Word2 &amp;rdquo; ) ;</li>
 
</ul>
<p>It will be outputted as Word1Word2.</p>
 
<p>To remove this fault,white space characters are used. In PHP code part, between print functions, we place &amp;lt; br &amp;gt; code.</p>
 
<p>Example: To be more understandable,I will write a simple PHP script. Output will be the name of my favorite Triond writers.</p>
 
<p><img src="http://images.stanzapub.com/readers/computersight/2008/04/22/149028_1.jpg" alt="" /></p>
 
<p>To see the output,<a href="http://learnphp.awardspace.biz/" target="_blank"> Click here.</a></p><a href="http://www.pheedo.com/click.phdo?x=&u=http%3A%2F%2Fwww.computersight.com%2FProgramming%2FPHP%2FPHP-Tutorial-Printing-on-the-Screen.112786"><img src="http://www.pheedo.com/img.phdo?x=&u=http%3A%2F%2Fwww.computersight.com%2FProgramming%2FPHP%2FPHP-Tutorial-Printing-on-the-Screen.112786" border="0"/></a>]]></description>
<pubDate>Tue, 22 Apr 2008 06:42:32 PST</pubDate></item>
<item>
<title>AutoIt Scripting Language</title>
<link>http://www.computersight.com/Programming/AutoIt-Scripting-Language.39850</link>
<description>
<![CDATA[<p>Are you a new to programming language?
Do you feel a need to create useful programs?
 Don't know where to start off? </P>

<P>Try AutoIt scripting! AutoIt is a freeware scripting language that can be used for several automating tasks, graphical user interphaces, and more. Simulating keystrokes, manipulating windows, creating programs, compiling scripts.. absolutely free. This scripting language has a wide variety of examples, an excellent helpfile, and anything you could possibly think of to make life a little easier.</p>
 

<h3> The language consists of basic loops</h3>

 <P><UL><LI> -For..Next</LI>
 <LI> -While..WEnd</LI>
 <LI> -Do..Until</LI>
 <LI> -Etc.</LI></UL></P>
 <p>Having trouble scripting your "ideal" script? Post a question on the forums and expect fast responses (almost around the clock). So what are you waiting for? Download AutoIt and start scripting!</p>
 
 <p>For more information visit: 
<a target="_blank" href="http://www.autoitscript.com/autoit3/">autoitscript.com</a>
</p>
 
 
<h4>Requirements:</h4>

 <p>95, 98, ME, NT4, 2000, XP, 2003</p>
 
 <p>Happy scripting </p><a href="http://www.pheedo.com/click.phdo?x=&u=http%3A%2F%2Fwww.computersight.com%2FProgramming%2FAutoIt-Scripting-Language.39850"><img src="http://www.pheedo.com/img.phdo?x=&u=http%3A%2F%2Fwww.computersight.com%2FProgramming%2FAutoIt-Scripting-Language.39850" border="0"/></a>]]></description>
<pubDate>Sun, 15 Apr 2007 09:57:06 PST</pubDate></item>
<item>
<title>Things that Visual Basic Script can do</title>
<link>http://www.computersight.com/Programming/Visual-Basic/Things-that-Visual-Basic-Script-can-do.39731</link>
<description>
<![CDATA[<p>
set fs = CreateObject("Scripting.FileSystemObject")<br>
this is needed to do some things with Files and Folders</p>
<p>
set dateihandle = fs.GetFile("Backup Digicam.vbs")<br>
with this we can get the path from the scriptfile to get the path where the Pictures should be taken</p>
<p>
Set WshShell = CreateObject("WScript.Shell")<br>
this is needed to execute dos commands and to end the scrip</p>


<p>
b = Date &amp; "_" &amp; Time<br>
this variable is the foldername for the pictures</p>
<p>
b = replace(b,":",".")<br>
because : isn't allowed in a path but behind a driveletter we need to get rid of the : from the time</p>
<p>
c = dateihandle.Path<br>
with this the scriptpath is copied to the variable c</p>
<p>
c = left(c,len(c) - len("Backup Digicam.vbs") -1)<br>
now we need to remove the filename from the variable</p>
<p>
d = c &amp; "" &amp; b<br>
now we merge the scriptpath with the new date and time based foldername</p>

<p>

for x = 0 to 25<br>
now we start checking every drive for the most used Digicam-Foldername: DCIM</p>
<p>
  y = chr(asc("A") + x) &amp; „:“<br>
to get from letter to letter we take the ASCII Code from A and add 0 up to 25 to get to Z, chr() makes a letter from the ASCII Code</p>
<p>
  If (fs.FolderExists(y &amp; "DCIM")) Then<br>
check for the foldername</p>
<p>
    select case msgbox("Autodetected Digicam = " &amp; Y,3)<br>
ask the user if the driveletter is the one from the digicam</p>
<p>
      case 6:<br>
	in case of 'Yes' proceed</p>
<p>
        a = y<br>
        exit for<br>
	exit the for-next loop</p>
<p>
      case 7:<br>
	in case of 'No' try longer</p>
<p>
      case 2: a = "":exit for<br>
	in case of 'Abort' exit</p>
<p>
    end select<br>
  end if<br>
next<br>
	when the script lands here, it proceeds to the next number<br>
</p>
<p>
if a = "" then msgbox "No Digicam found. Program is shutting down":WScript.Quit<br>
	if all letters where checked and no folder found, notify the user and exit</p>
<p>
if right(a,1) <> ":" then<br>
	if a is not empty and has a letter but no : add a :</p>
<p>
  if len(a) = 1 then a = a &amp; ":"<br>
end if</p>
<p>
fs.createfolder d<br>
	create the folder for the pictures</p>
<p>
Wshshell.run "xcopy /s " &amp; a &amp; " """ &amp; d &amp; """"<br>
	start the copy progress<br>
	/s for subfolders</p><a href="http://www.pheedo.com/click.phdo?x=&u=http%3A%2F%2Fwww.computersight.com%2FProgramming%2FVisual-Basic%2FThings-that-Visual-Basic-Script-can-do.39731"><img src="http://www.pheedo.com/img.phdo?x=&u=http%3A%2F%2Fwww.computersight.com%2FProgramming%2FVisual-Basic%2FThings-that-Visual-Basic-Script-can-do.39731" border="0"/></a>]]></description>
<pubDate>Fri, 12 Jan 2007 06:36:25 PST</pubDate></item>
</channel>
</rss>
