Advertisement
Guest User

Untitled

a guest
Oct 12th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
  2. SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
  3. SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
  4. Gui +LastFound +AlwaysOnTop +ToolWindow -Theme -Border
  5. test:="C:\Users\benne\Documents\scripts\config.ini"
  6. Gui, Margin, 5, 5   ; must have margin to be moveable
  7. Gui,Add,Button,w100 h20 x200 y1 gknapp1 vknapp1,Ladda
  8. Gui,Add,Button,w100 h20 x200 y20 gknapp2 vknapp2,Spara
  9. Gui,Add,Button,w100 h20 x400 y2 gknapp3 vknapp3,stäng
  10. Gui,Add,Edit,w200 h30 x10 y10 vedit ,enter hotkey
  11. Gui,Add,Edit,w200 h60 x10 y10 vedit2 ,enter hotkey
  12. #Include ListSections.ahk
  13. var6:=% sections "`n" ;
  14. msgbox ,"var6=".%var6%
  15. msgbox, % sections  "`n" ;
  16. gui,show, w500 h500
  17. OnMessage(0x201, "WM_LBUTTONDOWN")
  18. filepath:="C:\Users\benne\Documents\scripts\config.ini"
  19.  
  20. var5:="z"
  21. Hotkey,%var5%, MyLabel
  22. return
  23.  
  24. MyLabel:
  25. MsgBox You pressed %A_ThisHotkey%.
  26. return
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35. WM_LBUTTONDOWN() {
  36.    
  37.     PostMessage, 0xA1, 2
  38.    
  39. }
  40.  
  41. write(topic,vname,output,filepath)
  42. {
  43.     IniWrite,%output%,%filepath%,%topic%,%vname%
  44.     return
  45. }
  46. read(topic,vname,output,filepath)
  47. {
  48.     IniRead,%output%,%filepath%,%topic%,%vname%
  49.    
  50. }
  51.  
  52.  
  53.  
  54.  
  55. knapp3:
  56. ExitApp
  57. Exit
  58. return
  59. r::
  60. IniRead,output,C:\Users\benne\Documents\scripts\config.ini,slot1,test
  61. return
  62. knapp1:
  63. gui,Submit,nohide
  64. GuiControl,,edit,% output
  65.  
  66. return
  67. knapp2:
  68. gui,submit,nohide
  69. IniWrite,%edit%,C:\Users\benne\Documents\scripts\config.ini,slot3,test2
  70. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement