Hi! Welcome to my website. In short, this site is my personal toybox. I use it to experiment with web development technologies, explore new ideas, and to organize my life - or at least the electronically organizable portions of it. Feel free to have a look around, if you like. Also, I have a Yackpack widget in the sidebar below, in case you'd like to talk to me directly!



True News #4 - War Lies

Comments

True News #3 - The Supercharged Stock Market

I'm quite enjoying these "news" shorts from Freedomain radio. It's analysis of current events that you're not going to see anywhere else.

Comments

True News #2 - Government Bailouts

Comments

True News #1 - The Price of Patriotism

Comments

AppleScript - It looks like chinese to me

Ok,

As an ex-automation guy, and an ex-solaris guy, I've written lots of scripts in lots of languages. bash, perl, Perl, PHP, Javascript, VBScript, console C, CLIST, REXX, BASIC, and I've even written in PROLOG. You name it, I've probably touched it at some point.

But AppleScript?? What the hell is THAT about?

When I bought my iBook G4 two and a half years ago, I figured everything I'd ever need to do, I could do with bash (OS X is really just a heavily customized a fork of FreeBSD Unix). So, I never bothered to even look at AppleScript.

But lately, I've felt a desire to experiment again. So, it's time to add AppleScript to my repertoire. I guess I must be getting really bored.

For those of you with Macs (Tiger or better), I found this nifty little sample script that prompts you for your name, and then speaks the name game back to you. I'm posting it to give you a taste of what AppleScript looks like:

display dialog
"Enter your name"
default answer
""

set
myUser
to
text returned
of
the
result

set
userEnd
to
text
2
thru
(
count
characters
of
myUser
)
of
myUser


set
nameGame
to
"AAA AAA, bo bXXX!
Banana-fana fo-fXXX!
Fee-fi-mo-mXXX.
AAA!"

set
nameGame
to
swapText
(
nameGame
,
"AAA",
myUser
)

set
nameGame
to
swapText
(
nameGame
,
"XXX",
userEnd
)

say
nameGame


to
swapText
(
theText
,
swapOut
,
swapIn
)

(*
This bit comes from Apple's own "Replace Text in Item Names" script
with some of the variables changed to make it a call-able handler
*)

if
the
theText
contains
the
swapOut
then

--
replace target string using delimiters

set
AppleScript
's
text item delimiters
to
the
swapOut

set
the
text_item_list
to
every
text item
of
theText

set
AppleScript
's
text item delimiters
to
the
swapIn

set
the
theText
to
the
text_item_list
as
string

set
AppleScript
's
text item delimiters
to
""

end
if

return
theText

end
swapText


What's nice about this script, is that it demonstrates the desktop integrations, as well as gives good examples of how AppleScript handles variable declarations, iterative loops, and input handling.

I'm going to try porting some of my old VB code and Perl scripts to AppleScript, just to get a feel for how it works, and I'll be posting those here. So, stay tuned.s
Comments

Fun with DIV

For those of you viewing this blog from my actual, real website (and not the blogger mirror), the above blog header was constructed as such:

< div style="background:#CCCCCC;margin-left:20px;height:178px;width:93%;overflow:auto" > < div style="float:left;align:top;margin-left:18px;margin-right:14px;margin-top:18px;width:160px;height:140px" >< img src="http://www.gauthierweb.com/images/Avatar1.jpg" style="width:160px;height:140px" / > < /div >< div style="width:65%;text-align:justify;vertical-align:middle;float:left;margin-left:20px;margin-right:20px;margin-top:18px;font-size:9pt" >Hi! Welcome to my website. In short, this site is my personal toybox. I use it to experiment with web development technologies, explore new ideas, and to organize my life - or at least the electronically organizable portions of it. Feel free to have a look around, if you like. Also, I have a Yackpack widget in the sidebar below, in case you'd like to talk to me directly!< br / >< br / >< / div > < / div >
< hr >


If anyone has any suggestions for how to clean up this kludge, I'd appreciate it. Particularly, how do I get the text to flow continuously (including the scrolling overflow) on a browser horizontal resize, without the entire text DIV dropping below the picture?

Freaky.

Comments

Opening Post

This website serves no other purpose than to give me a central location to store bits of information, useful tools, helpful hints, and other nuggets of knowledge that I don't want to forget. Expect plenty of widgets, plugins, snippets, links, embedded videos, and other things to be found in this blog.
Comments (1)