The Ottomans sieged Vienna when emperor Leopold was fighting Louis XIV. They attacked the Spanish african strongholds after the catalan and Portuguese revolts,before that the Spanish navy was raiding anatolia and had sound victories like the battle of Cape Caledonia. In the XVII century the Ottomans were a shell of what they were under Suleiman and Austria and Russia picked them appart with ease for the most part of the XVIII century and in the XIX century they could barely beat Serbia on their own.
And the Ottomans were attacked on at least three or four front during the Great Turkish War (Hungary, the Adriatic, Greece, the Crimean steppe) and could very plausibly have had a fifth front had the Shah of Persia been slightly more ambitious. In any case, Ottoman records make it clear that the Ottoman decision to annul the Treaty of Vasvar and declare war on Austria was mandated not by Austria fighting France, but primarily by Imre Thököly requesting Ottoman support against the Catholic Habsburgs.
The Ottomans were attacking Spanish positions in North Africa long before the seventeenth century and your “Catalan and Portuguese revolts.” Including sacking the Baleares several times and planning to send military support to the Morisco rebellion in the 1570s.
Anyways I don’t quite see your point, all empires exploit the weakness of their enemies.
The Ottomans were not a “shell” in the seventeenth century. They were a different sort of state from the sixteenth, sure, but still militarily capable both in Europe (they reached their greatest extent in Europe in the late seventeenth century) and the Two Iraqs (where they forced the Treaty of Zuhab on the Safavids. The state’s financial capacity survived the immense stresses put on it by the era and the Ottoman economy remained very healthy well into the eighteenth century. The thesis of “seventeenth-century Ottoman decline” is widely discredited in academia.
The Ottomans beat Peter’s Russia at Prut and reconquered much of the Balkans in 1739, after defeating the Habsburgs at Grocka (where they may have killed as much as half the Austrian cavalry deployed).