recca062

RO - Storage Add-On

Mar 19th, 2016
283
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; MADE BY RECCA
  2. ; INSPIRED BY RUFUS
  3. ; http://ragindex.blogspot.com/2016/03/ragnarok-online-storage-add-on.html
  4.  
  5. #NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
  6. SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
  7. SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
  8. #SingleInstance Force
  9. if not A_IsAdmin
  10. {
  11.    Run *RunAs "%A_ScriptFullPath%"  ; Requires v1.0.92.01+
  12.    ExitApp
  13. }
  14.  
  15. IniRead, Dahotkey, Storage.ini, Hotkey, hotkey
  16. IniRead, 1ListName, Storage.ini, Save, 1
  17. IniRead, 2ListName, Storage.ini, Save, 2
  18. IniRead, 3ListName, Storage.ini, Save, 3
  19. IniRead, 4ListName, Storage.ini, Save, 4
  20. IniRead, 5ListName, Storage.ini, Save, 5
  21.  
  22. Gui, Add, Text, x112 y34, Search Hotkey:
  23. Gui, Add, Hotkey, x190 y30 vDahotkey Disabled, %Dahotkey%
  24. Hotkey, %Dahotkey%, Hotkey
  25. Gui, Add, GroupBox, x2 y49 w930 h55 cBlue, Save Strings
  26. Gui, Add, Edit, x12 y9 w310 h20 vSearchString,
  27. Gui, Add, Button, x342 y9 w60 h30 gSearch , Load List
  28. Gui, Add, Button, x22 y69 w60 h30 gSave1, Save #1
  29. Gui, Add, Button, x102 y69 w60 h30 gSave2, Save #2
  30. Gui, Add, Button, x182 y69 w60 h30 gSave3, Save #3
  31. Gui, Add, Button, x262 y69 w60 h30 gSave4, Save #4
  32. Gui, Add, Button, x342 y69 w60 h30 gSave5, Save #5
  33.  
  34. Gui, Add, Button, x22 y129 w60 h30 gLoad1, Load #1
  35. Gui, Add, Button, xp+80 yp w60 h30 gLoad2, Load #2
  36. Gui, Add, Button, xp+80 yp w60 h30 gLoad3, Load #3
  37. Gui, Add, Button, xp+80 yp w60 h30 gLoad4, Load #4
  38. Gui, Add, Button, xp+80 yp w60 h30 gLoad5, Load #5
  39.  
  40. StringSplit, listName_, 1ListName, |
  41. Gui, Add, Text, cBlue vListName1 x15 y200 vPreview1 +Center w70, %listName_1%
  42. listName_1=
  43. StringSplit, listName_, 2ListName, |
  44. Gui, Add, Text, cBlue vListName2 xp+80 y200 vPreview2 +Center w70, %listName_1%
  45. listName_1=
  46. StringSplit, listName_, 3ListName, |
  47. Gui, Add, Text, cBlue vListName3 xp+80 y200 vPreview3 +Center w70, %listName_1%
  48. listName_1=
  49. StringSplit, listName_, 4ListName, |
  50. Gui, Add, Text, cBlue vListName4 xp+80 y200 vPreview4 +Center w70, %listName_1%
  51. listName_1=
  52. StringSplit, listName_, 5ListName, |
  53. Gui, Add, Text, cBlue vListName5 xp+80 y200 vPreview5 +Center w70, %listName_1%
  54. listName_1=
  55.  
  56. Gui, Add, GroupBox, x2 y109 w930 h55 cBlue, Load Strings
  57. Gui, Add, GroupBox, x2 y169 w930 h55 cBlue, String Preview
  58.  
  59. Gui, Show, w417 h232, Storage Manager
  60.  
  61. Gui, 2:Add, Text,, List Name ( try to limit to under 20 characters )
  62. Gui, 2:Add, Edit, xp yp+20 w250 h20 vListTitle
  63. Gui, 2:Add, Text, xp yp+22, List
  64. Gui, 2:Add, Edit, xp yp+20 w250 h20 vListList
  65. Gui, 2:Add, Button, xp yp+25 w250 h30 gSaveList, SAVE
  66. OnMessage(0x200, "Help") 
  67. return
  68.  
  69. GuiClose:
  70. ExitApp
  71. return
  72.  
  73. !d::
  74. WinGetActiveTitle, Title
  75. Gui, Show, w417 h112, Storage Manager
  76. return
  77.  
  78. Hotkey:
  79. count++
  80. if count > %content_0%
  81. {
  82.     count = 0
  83.     ToolTip, The list has restarted.
  84.     SetTimer, TurnoffTT, 500
  85.     return
  86. }
  87. toSend := content_%count%
  88. Send %toSend%
  89. Sleep 20
  90. Send {Enter}
  91. return
  92.  
  93. SaveList:
  94. Gui, 2:submit
  95. Gui, 1:Default
  96. if ListTitle =
  97.     ListTitle = List #%num%
  98. GuiControl,, Preview%num%, %ListTitle%
  99. IniWrite,%ListTitle%|%ListList%, Storage.ini,Save,%num%
  100. return
  101.  
  102. Search:
  103. Gui, 1:Default
  104. Gui, 1:submit, nohide
  105. ToolTip, List loaded.
  106. SetTimer, TurnoffTT, 500
  107. StringSplit, content_, SearchString, `,
  108. return
  109.  
  110. TurnoffTT:
  111. ToolTip
  112. return
  113.  
  114. Load1:
  115. Load2:
  116. Load3:
  117. Load4:
  118. Load5:
  119. Gui, submit, nohide
  120. StringRight, num, A_ThisLabel, 1
  121. IniRead, temp, Storage.ini, Save, %num%
  122. if temp =
  123.     return
  124. StringSplit, temp_, temp, |
  125. GuiControl,, SearchString, %temp_2%
  126. return
  127.  
  128. Save1:
  129. Save2:
  130. Save3:
  131. Save4:
  132. Save5:
  133. Gui, submit, nohide
  134. StringRight, num, A_ThisLabel, 1
  135. ;if num = 1
  136. ;{
  137.     GUi, 2:Default
  138.     GuiControl,, ListList, %SearchString%
  139.     GuiControl,, ListTitle,
  140.     Gui, 2:Show
  141.     GuiControl, Focus, ListTitle
  142. ;}
  143. return
  144.  
  145. Help(wParam, lParam, Msg)
  146. {
  147. ;---------------------------------------------------MOUSE
  148. MouseGetPos,MouseX,MouseY,, OutputVarControl
  149. ;-------------------------------------------------------------
  150. global ControlName := OutputVarControl
  151.  
  152. IfNotInString, ControlName, Static
  153.     ToolTip
  154.  
  155. if ControlName = Static2
  156. {
  157.     IniRead, data, Storage.ini, Save,1
  158.     if data !=
  159.     {
  160.         StringReplace, data, data,|,`n==========`n
  161.         StringReplace, data, data,`,,`n
  162.         ToolTip, %data%
  163.     }
  164. }
  165. if ControlName = Static3
  166. {
  167.     IniRead, data, Storage.ini, Save,2
  168.     if data !=
  169.     {
  170.         StringReplace, data, data,|,`n==========`n
  171.         StringReplace, data, data,`,,`n
  172.         ToolTip, %data%
  173.     }
  174. }
  175. if ControlName = Static4
  176. {
  177.     IniRead, data, Storage.ini, Save,3
  178.     if data !=
  179.     {
  180.         StringReplace, data, data,|,`n==========`n
  181.         StringReplace, data, data,`,,`n
  182.         ToolTip, %data%
  183.     }
  184. }
  185. if ControlName = Static5
  186. {
  187.     IniRead, data, Storage.ini, Save,4
  188.     if data !=
  189.     {
  190.         StringReplace, data, data,|,`n==========`n
  191.         StringReplace, data, data,`,,`n
  192.         ToolTip, %data%
  193.     }
  194. }
  195. if ControlName = Static6
  196. {
  197.     IniRead, data, Storage.ini, Save,1
  198.     if data !=
  199.     {
  200.         StringReplace, data, data,|,`n==========`n
  201.         StringReplace, data, data,`,,`n
  202.         ToolTip, %data%
  203.     }
  204. }
  205. }
Add Comment
Please, Sign In to add comment