Why does my Ford Ranger start rough idle when engine is hot?

I have a 2002 Ford Ranger XLT 4X4 with 4.0 litre SOHC engine, it starts good when cold, but I get a rough idle start when the truck was already used and heated up. Engine diagnostics show nothing, I changed the air filter a month ago, changed platinum plugs and plug wires last year, regular oil and filter changes been done. I'm running out of ideas on the cause of this rough idle. Any suggestions, please answer.

You might want to clean the idle air control sensor and throttle body! It even might be the coil breaking down once it gets hot!

Have you tried contacting a ford repair center?
Maybe that they have a solution for your issue.
---------------------------------------
www.scialfanatic.com

I was just wondering if you all can come up with some more things that i could possibly check when i work on my truck this coming weekend.
When truck is warmed up to normal operating temp it seems to want to mess with the rpms. It will jump back and forth from 500 too 800 when at idle. I'm also not sure if all my power it there or not.
I have ran some injector cleaner through it and changed plugs and wires.
This weekend i was planning on checking the fuel pressure, running some sea foam threw the break booster vacuum line, and cleaning my IAC.
I'm thinking the injectors might be gunked up as they have never been cleaned or removed in its 150k miles and also my number 5 cylinder seams to always be wet. However i just don't want to remove the injectors or pay for some new ones if i can eliminate some other possible problems first.
I would do a compression test but not really a point since the engine block was rebuilt maybe 10k ago.
thanks for your time and ideas
I also will get an engine light if the truck idles for long periods of time however when i give it gas the engine light will leave. KOER test gets me a code 41. I think it deals with engine running rich and o2 sensor but i changed the o2 sensor recently