Sign in to follow this  
Followers 0
James

Stupid script that doesn't do what it's author tries to claim

22 posts in this topic

Howdy,

I came up with this when I had a "friend" of mine steal my program that I used all the time. It hid a window when a hotkey was pressed. So I went home that night and thought to myself what a cheeky **** he was and that there should be away I could stop him from using it.

I knew that the IsAdmin wouldnt work because he has his own laptop, so I kept thinking. Then I came up with:

; An IsAdmin Replacement 
; Just something small
; Secure_ICT

While 1
    User() ;; Call the function
WEnd

Func User()
        If @UserName = "Administrator" Then
        MsgBox(0, "User Accepted", "Your username matches the " & @UserName & " selection.")
        ;; Now do some stuff or call a function
        Exit ;; Remove if you use this
    Else
        MsgBox(16, "User Error", "There was an error with the username. It does not match the result.")
        Exit ;; This exits the program, but you could replace with something else
    EndIf
EndFunc

Like I said, its nothing special but it works.

Notes

Replace the "Administrator" with your username.

Secure

Share this post


Link to post
Share on other sites



Howdy,

I came up with this when I had a "friend" of mine steal my program that I used all the time. It hid a window when a hotkey was pressed. So I went home that night and thought to myself what a cheeky **** he was and that there should be away I could stop him from using it.

I knew that the IsAdmin wouldnt work because he has his own laptop, so I kept thinking. Then I came up with:

; An IsAdmin Replacement 
; Just something small
; Secure_ICT

While 1
    User() ;; Call the function
WEnd

Func User()
        If @UserName = "Administrator" Then
        MsgBox(0, "User Accepted", "Your username matches the " & @UserName & " selection.")
        ;; Now do some stuff or call a function
        Exit ;; Remove if you use this
    Else
        MsgBox(16, "User Error", "There was an error with the username. It does not match the result.")
        Exit ;; This exits the program, but you could replace with something else
    EndIf
EndFunc

Like I said, its nothing special but it works.

Notes

Replace the "Administrator" with your username.

Secure

What stops him now from changing his username?

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

This is absurd. How is this a replacement for IsAdmin()? Do you even know what the point of IsAdmin() is? Come up with a better name for this thread or I'll change the thread title to "Stupid script that doesn't do what it's author tries to claim".

Share this post


Link to post
Share on other sites

LOL this is crap.

Joe Bob is an admin on his computer.

Joe Bob's username is JoeBob.

According to your script, JoeBob is not equal to Administrator, therefore JoeBob is not an admin.

You're stupid.

Share this post


Link to post
Share on other sites

@DarthVega

The idea is you change "Administrator" to the Administrators username.


My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop.

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

@DarthVega

The idea is you change "Administrator" to the Administrators username.

Or you have to be logged on as 'Administrator' before the program will continue? Maybe that way the person has to be logged on as Administrator not just be in the admin group.

EDIT or maybe he is only allowing the Administrator to turn off the program?

Edited by nitekram

All by me:

"Sometimes you have to go back to where you started, to get to where you want to go." 

"Everybody catches up with everyone, eventually" 

"As you teach others, you are really teaching yourself."

From my dad

"Do not worry about yesterday, as the only thing that you can control is tomorrow."

 

WindowsError.gif

WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF

AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send

StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2

AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit  Docs

SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF

Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language

Programming Tips

Excel Changes

ControlHover.UDF

GDI_Plus

Draw_On_Screen

GDI Basics

GDI_More_Basics

GDI Rotate

GDI Graph

GDI  CheckExistingItems

GDI Trajectory

Replace $ghGDIPDll with $__g_hGDIPDll

DLL 101?

Array via Object

GDI Swimlane

GDI Plus French 101 Site

GDI Examples UEZ

GDI Basic Clock

GDI Detection

Ternary operator

Share this post


Link to post
Share on other sites

As promised, since you haven't given me a better title for this thread, and the original title is completely mis-leading, you get a thread with the title "Stupid script that doesn't do what it's author tries to claim".

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

As promised, since you haven't given me a better title for this thread, and the original title is completely mis-leading, you get a thread with the title "Stupid script that doesn't do what it's author tries to claim".

well... I wonder if we'll be seeing him again. Seriously, I know you can be a bit... shall we say.... blunt, sometimes, but was that really necessary? I guess I just feel bad for him.

You might as well tag a "Don't let the door hit you on your way out" to the end of your post...

Just my opinion :)

edit: wanted to follow-up. Valik, I'm sure you know I mean no disrespect to you, I was just wondering out loud if it was a bit harsh. In hindsight, I think I should have just PM'ed you this directly.... no need to post questions like this in the forum.

Hope everyone has a good weekend!

Edited by fisofo

Share this post


Link to post
Share on other sites

Valik?, Harsh? Nooooo.. He`s such a fluffy and cuddly type of person... :)


2015 - Still no flying cars, instead blankets with sleeves.

Share this post


Link to post
Share on other sites

Erm Valik, I couldn't change the title because the Time Zones means I am a sleep.

I did say you need to change the username.

And it does work..

Secure

Edit: Also Valik, I cannot change the title. Only you mods and admins can.

i'm gonna beat Valik to this one... Secure, be sure to read more carefully what Valik said. The point is not whether your script works, but whether it is a "replacement" for IsAdmin(). Also, he told you to tell him what the topic name should be.

Don't make me regret the comments i made in your behalf... :)

Share this post


Link to post
Share on other sites

Ooopss I really gotta sleep more. Valik I am very sorry for mis-reading your post. I do know what the IsAdmin does and I would like you to change the title, if your still willing to, to something else to what it is.

Secure

Share this post


Link to post
Share on other sites

Ooopss I really gotta sleep more. Valik I am very sorry for mis-reading your post. I do know what the IsAdmin does and I would like you to change the title, if your still willing to, to something else to what it is.

Secure

Title: How to check username

All by me:

"Sometimes you have to go back to where you started, to get to where you want to go." 

"Everybody catches up with everyone, eventually" 

"As you teach others, you are really teaching yourself."

From my dad

"Do not worry about yesterday, as the only thing that you can control is tomorrow."

 

WindowsError.gif

WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF

AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send

StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2

AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit  Docs

SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF

Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language

Programming Tips

Excel Changes

ControlHover.UDF

GDI_Plus

Draw_On_Screen

GDI Basics

GDI_More_Basics

GDI Rotate

GDI Graph

GDI  CheckExistingItems

GDI Trajectory

Replace $ghGDIPDll with $__g_hGDIPDll

DLL 101?

Array via Object

GDI Swimlane

GDI Plus French 101 Site

GDI Examples UEZ

GDI Basic Clock

GDI Detection

Ternary operator

Share this post


Link to post
Share on other sites

Title: How to check username

Your just being nice. Sharing is good but waste belongs in the recycle bin.

Share this post


Link to post
Share on other sites

I would leave the title "as is" as a lesson to others.



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

I'm inclined to agree with BigDod, and here's why. First, the script doesn't do what is claimed. Second, the script is horrid. Even for whatever it's intended purpose is, it could be improved quite a bit with very simple changes. Third, this isn't the first time Secure_ICT has created a thread with the wrong title. This thread also has the wrong title. The claim of that thread is "Vista type transparency" which is quite wrong. Vista transparency is characterized by the glass effect which is a non-trivial effect to implement on non-Vista versions of Windows. In fact, the last I checked, while it was possible to get glass on XP via WindowBlinds, it really wasn't the same as on Vista.

So to surmise, the OP has a habit of creating threads with incorrect titles claiming things that simply aren't true about the code. This is to be a lesson to the OP as well as anybody else making bogus claims about their scripts.

Secure_ICT, if you wish to clean the function up and post it in a new thread with an acceptable title, that's fine. But I've decided not to change the title of this thread anymore. You had about a 12-hour window to get a new title to me and I did check to see that you were indeed online after I made my earlier statement.

Share this post


Link to post
Share on other sites

Stupid script that doesn't do what it's author tries to claim

I'm agree with this up there.

Why are you post it if is it SSTDDWIATTC?

i542


I can do signature me.

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