How do i add a whitelist to my script

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Jzzy420
Posts: 1
Joined: 02 Dec 2021, 01:37

How do i add a whitelist to my script

Post by Jzzy420 » 02 Dec 2021, 01:39

Im making a script for only me and my friends. i dont want anyone to use it. Im new to ahk so idk how to make a whitelist or anything advanced like that.

99leeroi99
Posts: 18
Joined: 28 Oct 2021, 03:50

Re: How do i add a whitelist to my script

Post by 99leeroi99 » 02 Dec 2021, 02:06

here I made this one for my script that I was selling

first you need to get your friend serialnumber you can get it by doing this

wmic baseboard get serialnumber > C:\Users\%USERNAME%\x.txt

then go to desktop and copy the second line below the serialnumber

Code: Select all

f1::
    FileDelete, C:\Users\%USERNAME%\x.txt
    sleep,3000
    RunWait %comspec% /c wmic baseboard get serialnumber > C:\Users\%USERNAME%\x.txt
    sleep, 2000
    FileReadLine, line, C:\Users\%USERNAME%\x.txt, 2
        sleep,1000
        If InStr(line, "(SERIAL)"){ 	; place your friends serial number here at "(SERIAL)"
        access:=access+1
       }

        if(access = 1){
        msgbox,0,ACCESS,You have access to this script. Access Level = %access%,1
        gosub,RunScripts
        }
        else{
        msgbox,0,ACCESS,You don't have access to this script. Access Level = %access%,1
        ExitApp
        }
        
        RunScripts:
        ;add your script below this one and then your done

Post Reply

Return to “Ask for Help (v1)”