VaIhalla

Untitled

Nov 7th, 2023
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.31 KB | None | 0 0
  1. Added full randomization to steps, guidance and seed. Also added auto random number inserted when saving. Example: Kitty.png Forest.png will automatically turn into Kitty-238443.png Forest-1595.png then the cursor will automatically move to the save button. All functions can be disabled by removing the ; from the top and bottom. Will turn into functions to clean up the code and add a gui/frontend that overlays in UFs blank space (only while UF is active) with text and checkboxes to disable functions and number inputs to change code randomness range soon. There are some images under the code the were made and saved in three clicks. 😁 Request are encouraged, any ideas on helping with UF automation until said functions are added is appreciated.
  2.  
  3. [CODE]
  4. #SingleInstance, Force
  5. #Persistent
  6.  
  7. SetKeyDelay, 0
  8. SetBatchLines, -1
  9.  
  10. SetTimer, UF, 1000
  11.  
  12. UF:
  13. MouseGetPos, UX, UY, UW, UC
  14. ;/*
  15. WinGetActiveTitle, UFW ;Remove ; at top and bottom to disable this fuction.
  16. If(UFW = "Save As")
  17. {
  18. ControlGetText, SVT,
  19. ControlGetText, SVTXT, Edit1, Save As ahk_class #32770
  20. Random, SVR, 100, 10000000
  21. StringReplace, NXT, SVTXT, .png, -%SVR%.png
  22. ControlGetPos, sX, sY, sW, sH, Edit1, Save As ahk_class #32770
  23. MouseMove, sX+100, SY+15, 0
  24. Send, {LButton}
  25. Sleep, 100
  26. Send, {LButton}
  27. Sleep, 200
  28. Send, %NXT%
  29. Sleep, 200
  30. ControlGetPos, bX, bY, bW, bH, Button2, Save As ahk_class #32770
  31. MouseMove, bX+50, bY+50, 0
  32. Sleep, 100
  33. WinWaitClose, Save As
  34. Return
  35. }
  36. ;/*
  37. If(UC = "FFX::CustomDrawControl4")
  38. {
  39. Hotkey, RButton, On
  40. Return
  41. }
  42. Hotkey, RButton, Off
  43. Return
  44.  
  45. RButton::
  46. SetKeyDelay, 0
  47. SetMouseDelay, 0
  48. BlockInput, MouseMove
  49. Random, RANDM, 200000, 100000000 ;Seed
  50. Random, RANDMG, 4, 10 ;Guidance - You can increase 10 for more range. I use 5 - 15 guidance.
  51. Random, RANDMS, 20, 50 ;Steps - You can lower both to speed up render time. I use 250 - 500 steps.
  52. MouseGetPos, xc, yc
  53. WinGetActiveTitle, AWT
  54. ControlGetPos, eX, eY, eW, eH, Edit8, %AWT% ahk_class FFX::Form ;Seed
  55. MouseMove, eX+50, eY+15, 0 ;4K 3539, 1918, 0
  56. Sleep, 100
  57. Send, {LButton}
  58. Sleep, 150
  59. Send, {LButton}
  60. Sleep, 150
  61. Send, %RANDM%
  62. Sleep, 150
  63. ;/* ;Remove ; Here And Bottom To Disable Guidance Randomize
  64. ControlGetPos, eX, eY, eW, eH, Edit7, %AWT% ahk_class FFX::Form ;Guidance
  65. MouseMove, eX+50, eY+15, 0 ;4K 3539, 1918, 0
  66. Sleep, 100
  67. Send, {LButton}
  68. Sleep, 150
  69. Send, {LButton}
  70. Sleep, 150
  71. Send, %RANDMG%
  72. Sleep, 150
  73. ;*/ ;Remove ; Here And Top To Disable Guidance Randomize
  74. ;/* ;Remove ; Here And Top To Disable Guidance Steps
  75. ControlGetPos, eX, eY, eW, eH, Edit6, %AWT% ahk_class FFX::Form ;Steps
  76. MouseMove, eX+50, eY+15, 0 ;4K 3539, 1918, 0
  77. Sleep, 100
  78. Send, {LButton}
  79. Sleep, 150
  80. Send, {LButton}
  81. Sleep, 150
  82. Send, %RANDMS%
  83. ;*/ ;Remove ; Here And Top To Disable Guidance Steps - Note Edit 5 - 4 are for size.
  84. Sleep, 500
  85. MouseMove, xc, yc, 0
  86. Sleep, 100
  87. Send, {LButton}
  88. BlockInput, MouseMoveOff
  89. BlockInput, Off
  90. Return
  91. [/CODE]
  92.  
  93. [IMG]https://i.imgur.com/7Xify2G.png[/IMG][IMG]https://i.imgur.com/eWOMKJN.png[/IMG][IMG]https://i.imgur.com/nelT0xw.png[/IMG][IMG]https://i.imgur.com/cDamIsJ.png[/IMG][IMG]https://i.imgur.com/0vWFXiN.png[/IMG][IMG]https://i.imgur.com/RBbaWRE.png[/IMG][IMG]https://i.imgur.com/RTaZdo5.png[/IMG][IMG]https://i.imgur.com/XU2Vt4I.png[/IMG][IMG]https://i.imgur.com/fWowQlX.png[/IMG][IMG]https://i.imgur.com/8LT4hXz.png[/IMG]
Tags: UF
Advertisement
Add Comment
Please, Sign In to add comment