psychohampster Posted February 11, 2016 Share Posted February 11, 2016 So I'm trying to make a bat file to place 100's of objects (ammo containers) onto a massive amount of shelves I've placed. I've calculated the position of all of them, and created a bat file to make them, select them, and then move/rotate them properly. However when running a bat file I can't seem to select the item I just created appropriately. Ie...If you manually type in the following commands everything works. Player.placeatme 60cb4 (ammo box)plr (pick last created ref)gsr (get selected ref)OUTPUT : {newly created ref} However if you batch themPlayer.placeatme 60cb4 (ammo box)plr (pick last created ref)gsr (get selected ref)OUTPUT : {00000000} (nothing selected)even though the RefID in the middle of the console is correct it will not manipulate the new item at all. Any other ideas? Link to comment Share on other sites More sharing options...
PoliteRaider Posted February 12, 2016 Share Posted February 12, 2016 I've run some experiments using your batch there and I think I've figured out the problem. When executing a batch file the console doesn't wait for one command to complete before commencing the second. When you're running the batch file, it executes the command plr and starts searching for the last created reference before the object has finished being created, which means that it is unable to find a reference. If you're entering the commands naturally your typing speed slows it down enough that each command has a chance to finish before the next one is run. Unfortunately I don't know a solution to the problem. Link to comment Share on other sites More sharing options...
ad3d0 Posted February 12, 2016 Share Posted February 12, 2016 I've run some experiments using your batch there and I think I've figured out the problem. When executing a batch file the console doesn't wait for one command to complete before commencing the second. When you're running the batch file, it executes the command plr and starts searching for the last created reference before the object has finished being created, which means that it is unable to find a reference. If you're entering the commands naturally your typing speed slows it down enough that each command has a chance to finish before the next one is run. Unfortunately I don't know a solution to the problem. Make an AutoHotkey script ;) You can set delays there. Link to comment Share on other sites More sharing options...
psychohampster Posted February 12, 2016 Author Share Posted February 12, 2016 I've run some experiments using your batch there and I think I've figured out the problem. When executing a batch file the console doesn't wait for one command to complete before commencing the second. When you're running the batch file, it executes the command plr and starts searching for the last created reference before the object has finished being created, which means that it is unable to find a reference. If you're entering the commands naturally your typing speed slows it down enough that each command has a chance to finish before the next one is run. Unfortunately I don't know a solution to the problem. Make an AutoHotkey script :wink: You can set delays there. Good idea. I'll try that. Only problem I'm having is slow down with AHK not properly registering send methods in FO4. (Or any direct x game) Link to comment Share on other sites More sharing options...
dark47 Posted February 13, 2016 Share Posted February 13, 2016 Try using this command in your bat file - timeout /t 10 This should pause your bat file for 10 seconds ( /t 5 for 5 seconds, ,etc) Link to comment Share on other sites More sharing options...
SoulesFury Posted October 7, 2022 Share Posted October 7, 2022 any news on this topic currently trying to figure this out my self tried the delay /t thing no such lucj*-* Link to comment Share on other sites More sharing options...
Recommended Posts