Advertisement
Guest User

Dynamische Memberliste

a guest
Mar 29th, 2015
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include UrlDownloadToVar.ahk
  2.  
  3. #UseHook
  4. #Persistent
  5. #SingleInstance force
  6. #InstallKeybdHook
  7.  
  8. wnTitle = Memberliste Example
  9. backgroundY := 10
  10. nameY := 20
  11. windowWidth := 479
  12. windowHeight := 0
  13.  
  14. url =
  15.  
  16. URLDownloadToVar(url, result)
  17. if(result != ""){
  18.     Loop, Parse, result, ~
  19.     {
  20.         Gui, Add, Picture, x22 y%backgroundY% w430 h40 , %A_ScriptDir%/res/bar.png
  21.         Gui, Font, cWhite
  22.         Gui, Add, Text, x32 y%nameY% w410 h20 vText%A_LoopField%, %A_LoopField%
  23.         GuiControl +BackgroundTrans, Text%A_LoopField%
  24.        
  25.         backgroundY += 45
  26.         nameY += 45
  27.         windowHeight += 45
  28.     }
  29. }else{
  30.     Gui, Add, Picture, x22 y%backgroundY% w430 h40 , %A_ScriptDir%/res/bar.png
  31.     Gui, Font, cWhite
  32.     Gui, Add, Text, x32 y%nameY% w410 h20 vText%A_LoopField%, Aktuell ist keiner in der Fraktion
  33.     GuiControl +BackgroundTrans, Text%A_LoopField%
  34.    
  35.     windowHeight += 45
  36. }
  37.  
  38. windowHeight += 15
  39.  
  40. Gui, Show, w%windowWidth% h%windowHeight%, %winTitle%
  41. return
  42.  
  43. GuiClose:
  44. ExitApp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement