Advertisement
FH3

Untitled

FH3
Aug 29th, 2024 (edited)
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.61 KB | Housing | 0 0
  1. ; This script was created using Pulover's Macro Creator
  2. ; www.macrocreator.com
  3. ; it is for autohotkey2
  4. ; FritzHugo3 create and edit frome me - Tutorial video: https://www.youtube.com/watch?v=vYSXKvY_Yuw
  5.  
  6. #NoEnv
  7. SetWorkingDir %A_ScriptDir%
  8. CoordMode, Mouse, Window
  9. SendMode Input
  10. #SingleInstance Force
  11. SetTitleMatchMode 2
  12. ;#WinActivateForce
  13. SetControlDelay 1
  14. SetWinDelay 0
  15. SetKeyDelay -1
  16. SetMouseDelay -1
  17. SetBatchLines -1
  18.  
  19. ; Initialize the counter
  20. counter := 1
  21.  
  22. Macro1:
  23. Sleep, 10000  ; Wait 10 seconds to allow time to switch to the Sweet Home 3D window
  24. Loop, 28  ; Number of objects to export (adjust this number according to your objects count)
  25. {
  26.    Sleep, 333
  27.    Send, {LControl Down}{e} ; open the object edit window to copy the name
  28.    Sleep, 333
  29.    Send, {LControl Up}
  30.    Sleep, 333
  31.    Send, {LControl Down}{c}  ; Copy the object name
  32.    Sleep, 333
  33.    Send, {LControl Up}{Escape}
  34.    Sleep, 333
  35.    Send, {LAlt Down}{LAlt Up}
  36.    Sleep, 333
  37.    Send, {a}
  38.    Sleep, 333
  39.    Send, {x}
  40.    Sleep, 333
  41.    Sleep, 333
  42.    ; Create a formatted number with leading zeros (e.g., 0001, 0010, ...)
  43.    formattedCounter := Format("{:04} ", counter)  ; 4-digit number with leading zeros and a space
  44.    Send, %formattedCounter%{LControl Down}{v}  ; Insert the formatted number and the copied name
  45.    Sleep, 333
  46.    Send, {LControl Up}{.}{o}{b}{j}{Enter}
  47.    Sleep, 333
  48.    Sleep, 333
  49.    Send, {Tab}
  50.    Sleep, 333
  51.    Send, {Space}
  52.    Sleep, 333
  53.    Sleep, 333
  54.    Send, {Down}
  55.  
  56.    ; Increment the counter for the next loop
  57.    counter++
  58. }
  59. Return
  60.  
  61. Backspace::ExitApp
  62. F12::Pause
Tags: SweetHome3D
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement