After analyzing the behavior of both XBMC and Nestopia, here's where I'm at:
When you launch something with Advanced Launcher it toggles screen size / state. If you launch XBMC when in "Windowed" mode it will change the state of XBMC to "Full" when my script takes you to Nestopia.. and vice versa "Full" to "Windowed" I'm not sure if that matters but I thought it was worth mentioning as it may or may have something to do with my issues. You can achieve this same thing anytime by hitting Command-F.
I changed the way my script hides XBMC:
Code:
on run argv
tell application "Nestopia"
activate
set rom to (item 1 of argv)
set rompath to "/Users/Mido/Media/Roms/Nintendo Entertainment System/Roms/" & rom
set gameon to POSIX path of rompath
do shell script "open " & quoted form of gameon
end tell
tell application "System Events"
tell process "XBMC"
click menu item "Hide XBMC" of menu "XBMC" of menu bar 1
end tell
end tell
end run
I determined for whatever reason when I tried...:
Code:
tell application "System Events"
set visible of process "XBMC" to false
end tell
it would put XMBC in full screen mode in the background.
As a test (without using Advanced Launcher) I opened XMBC and then Nestopia ran the aformentioned hide script and it works fast and hides XBMC like it should with Nestopia in the front.
Now my new launcher script up top works to a certain degree... but only when auto-full screen in Nestopia is disabled. For whatever reason when Auto Full Screen Mode is enabled in the preferences it seems like it conflicts either with Advanced Launcher or my script or XBMC or all of the above. I want to say auto full screen mode in Nestopia triggers full screen mode in XBMC but I'm not entirely sure what's going on there. Also, there is a big pause when I hide in applescript with the 'Click Menu Item' method. It works but doesnt seem like the most elegant solution... and I have to go the additional step to to select full screen manually in Nestopia.
Has anyone else been following along with this? Would love to hear if people (specifically on mac os x) are having similar results or know any workarounds.
Angelscry,
I did try to open Nestopia via your new method and based on my results it would open games and sometimes not open games. So I think I'm going to stick to my script for now but appreciate the alternate suggestion.