danrim

pc user check | ini file | show full name

Oct 7th, 2021
1,909
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; show pc user full name
  2.  
  3. #SingleInstance, Force
  4.  
  5. f2::
  6. checkcount=0
  7. loop{
  8. checkcount++
  9.  
  10. IniRead, usercheck, C:\Users\UserName\Desktop\ahk_stuff\ini_files\users.ini, approvedusers, user%checkcount%
  11. IniRead, usercheck1, C:\Users\UserName\Desktop\ahk_stuff\ini_files\users.ini, fullName, user%checkcount%
  12. ;MsgBox, %usercheck%
  13. ;MsgBox, %usercheck1%
  14. If usercheck =
  15.  {
  16.  Msgbox, User Not Approved
  17.  Return
  18.  }
  19. If a_username contains %usercheck%
  20.  
  21. {
  22. break
  23. }
  24. }
  25.  
  26. Gui, Destroy
  27. Gui, Add, Text, x22 y19 w100 h20 , Color
  28. Gui, Add, Text, x22 y79 w220 h150 , IG - danrim. Welcome approved user.`nHope you having a good day`n`n%usercheck1%
  29. Gui, Sho
  30.  
  31. ; ini file must be created
  32. /*
  33. [approvedusers]
  34. user1=jack
  35. user2=joe
  36.  
  37.  
  38. [fullName]
  39. user1=Jack Jacksman
  40. user2=Joe Johnson
  41. */
Advertisement
Add Comment
Please, Sign In to add comment