Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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.
- [CODE]
- #SingleInstance, Force
- #Persistent
- SetKeyDelay, 0
- SetBatchLines, -1
- SetTimer, UF, 1000
- UF:
- MouseGetPos, UX, UY, UW, UC
- ;/*
- WinGetActiveTitle, UFW ;Remove ; at top and bottom to disable this fuction.
- If(UFW = "Save As")
- {
- ControlGetText, SVT,
- ControlGetText, SVTXT, Edit1, Save As ahk_class #32770
- Random, SVR, 100, 10000000
- StringReplace, NXT, SVTXT, .png, -%SVR%.png
- ControlGetPos, sX, sY, sW, sH, Edit1, Save As ahk_class #32770
- MouseMove, sX+100, SY+15, 0
- Send, {LButton}
- Sleep, 100
- Send, {LButton}
- Sleep, 200
- Send, %NXT%
- Sleep, 200
- ControlGetPos, bX, bY, bW, bH, Button2, Save As ahk_class #32770
- MouseMove, bX+50, bY+50, 0
- Sleep, 100
- WinWaitClose, Save As
- Return
- }
- ;/*
- If(UC = "FFX::CustomDrawControl4")
- {
- Hotkey, RButton, On
- Return
- }
- Hotkey, RButton, Off
- Return
- RButton::
- SetKeyDelay, 0
- SetMouseDelay, 0
- BlockInput, MouseMove
- Random, RANDM, 200000, 100000000 ;Seed
- Random, RANDMG, 4, 10 ;Guidance - You can increase 10 for more range. I use 5 - 15 guidance.
- Random, RANDMS, 20, 50 ;Steps - You can lower both to speed up render time. I use 250 - 500 steps.
- MouseGetPos, xc, yc
- WinGetActiveTitle, AWT
- ControlGetPos, eX, eY, eW, eH, Edit8, %AWT% ahk_class FFX::Form ;Seed
- MouseMove, eX+50, eY+15, 0 ;4K 3539, 1918, 0
- Sleep, 100
- Send, {LButton}
- Sleep, 150
- Send, {LButton}
- Sleep, 150
- Send, %RANDM%
- Sleep, 150
- ;/* ;Remove ; Here And Bottom To Disable Guidance Randomize
- ControlGetPos, eX, eY, eW, eH, Edit7, %AWT% ahk_class FFX::Form ;Guidance
- MouseMove, eX+50, eY+15, 0 ;4K 3539, 1918, 0
- Sleep, 100
- Send, {LButton}
- Sleep, 150
- Send, {LButton}
- Sleep, 150
- Send, %RANDMG%
- Sleep, 150
- ;*/ ;Remove ; Here And Top To Disable Guidance Randomize
- ;/* ;Remove ; Here And Top To Disable Guidance Steps
- ControlGetPos, eX, eY, eW, eH, Edit6, %AWT% ahk_class FFX::Form ;Steps
- MouseMove, eX+50, eY+15, 0 ;4K 3539, 1918, 0
- Sleep, 100
- Send, {LButton}
- Sleep, 150
- Send, {LButton}
- Sleep, 150
- Send, %RANDMS%
- ;*/ ;Remove ; Here And Top To Disable Guidance Steps - Note Edit 5 - 4 are for size.
- Sleep, 500
- MouseMove, xc, yc, 0
- Sleep, 100
- Send, {LButton}
- BlockInput, MouseMoveOff
- BlockInput, Off
- Return
- [/CODE]
- [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]
Advertisement
Add Comment
Please, Sign In to add comment