Sign in to follow this  
Followers 0
timbo

Need help skinning a cat

8 posts in this topic

Can anyone help me skin this cat? I've tried many ways (I've listetd three below), but I just can't seem to get it to work.

It seems to be failing on line 1, my attempt to 'get' the cat?

I'd be very interested in other peoples attempts at this, as I'm sure I can't be the first that's tried it...

;Exapmle 1
Local $item=ObjGet("cat")
skin($item)
If skinned($item)==True Then
    MsgBox (64, $item.Name&" has been skinned!", "Congratulations, your '"&$item.Name&"' has been skinned.")
EndIf


;Exapmle 2
Local $item=ObjGet("cat")
Do
    skin($item)
Until skinned($item)==True
MsgBox (64, $item.Name&" has been skinned!", "Congratulations, your '"&$item.Name&"' has been skinned.")


;Exapmle 3
Local $item=ObjGet("cat")
While skinned($item)==False
    skin($item)
WEnd
MsgBox (64, $item.Name&" has been skinned!", "Congratulations, your '"&$item.Name&"' has been skinned.")



;Functions
Func skin($item)
    If $item.Type="feline" AND $item.Pelt==True Then
        $item.Action("skin")
    EndIf
EndFunc

Func skinned($item)
    If $item.BloodyMess==True Then
        Return True
    Else
        Return False
    EndIf
EndFunc

Thanks in advance!

-Timbo

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

http://www.autoitscript.com/autoit3/docs/functions/ObjGet.htm

Read that, and im sure you'll understand where your mistake is.

Local $item=ObjGet("cat")

Parameters of ObjGet are not correct, considering "cat" is not "The full path and name to the file containing the object (See remarks)."

But if you are trying to pull $item from a GUI then you would want to use GUICtrlRead(), if that is infact what you are trying to do.

Edited by b3lorixx

Share this post


Link to post
Share on other sites

http://www.autoitscript.com/autoit3/docs/functions/ObjGet.htm

Read that, and im sure you'll understand where your mistake is.

Local $item=ObjGet("cat")

Parameters of ObjGet are not correct, considering "cat" is not "The full path and name to the file containing the object (See remarks)."

But if you are trying to pull $item from a GUI then you would want to use GUICtrlRead(), if that is infact what you are trying to do.

Well, I did post this in a support forum...

Thanks for your advice b3lorixx!

I tried:

Local $item=ObjGet("C:\Neighbours Backyard\Under Tree\Sleeping Cat.exe")

And that seems to be working now, thanks!

Ref:

http://en.wikipedia.org/wiki/User:MartinHarper/cat_skinning

Though I’ve made another script to compensate for my poor sense of humor:

Local $item=ObjGet("C:\My Desk\My Chair\Me.exe")
If $item.Funny==False Then
    While $item.Funny==False
        $item.Action("BangHeadOnDesk")
        If $item.Status="Unconscious" Then ExitLoop
    WEnd
EndIf

Share this post


Link to post
Share on other sites

timbo,

I object to your vulgar use of "skinning a cat". After all, they make excellent musky bait!

kylomas


Forum Rules         Procedure for posting code

"I like pigs.  Dogs look up to us.  Cats look down on us.  Pigs treat us as equals."

- Sir Winston Churchill

Share this post


Link to post
Share on other sites

Your welcome timbo

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

The self learning method

1. Create a robot arm with attached robot hand

2. Instruct it to "skin the cat"

3. The robot will download the skinning procedures from a central server

4. Once download is complete, robot will proceed to skin the cat.

And a .NET joke.

public void main()
{
    // Set up parameters
    CatFactory factory = CatFactory.GetInstance();
    Cat cat = null;
    
    // Ask CatFactory for any cat. Beware of concurrency issues.
    while (!factory.TryGetCat(0, out cat))
    {
        System.Threading.Thread.Sleep(100);
    }
    
    // Make sure that we're not skinning a living cat

    // TODO: I'm not sure if Alive returns true when cat is undead
    // If it does, this may cause infinite loops,
    // Unless kill somehow kills undead (???). Debug this.
    while (cat.Alive)
    {
        cat.Kill();
    }
    
    // Time for the work
    throw new NotImplementedException("Cat skinning method not implemented. Your cat is now dead but still has its skin. Goodbye.");
}
Edited by Manadar

Share this post


Link to post
Share on other sites

what is this i don't even...


I'm a compulsive poster. When I post something, come to read it at least 5 minutes later after the posting, because I will edit it. I edited even this signature a few minutes later after I wrote it.

Share this post


Link to post
Share on other sites

The AI Method

1 - What is "cat"

2 - What is skin

3 - What is "cat" without "skin"

4 - Why does "cat" not move when "skin" removed

5 - Fuck the "cat", I got the "skin"


Forum Rules         Procedure for posting code

"I like pigs.  Dogs look up to us.  Cats look down on us.  Pigs treat us as equals."

- Sir Winston Churchill

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0