Tell me what you've been up to.
Announcement
Collapse
No announcement yet.
Multiple Instances of Iview from Command Line
Collapse
X
-
Tempest,
If you can't determine what went wrong, let's try my alternative.
Let's bring the batch file back, but instead link to it. Make a shortcut to Bottom.bat and name it Bottom.
Launch before line:
Code:"C:\Program Files (x86)\IrfanView2\Bottom.lnk" [ROM]
Code:cd C:\Program Files (x86)\IrfanView2 i_view32.lnk "C:\Emulators\Mame64.127\marquees\%1.png" /ini="C:\Program Files (x86)\IrfanView2\Bottom" /hide=15 /resize=(1670,470) /aspectratio /resample Exit
Code:@ECHO OFF "C:\PROGRAM FILES (X86)\IRFANVIEW2\Bottom.lnk" 88games C: CD "C:\Emulators\Mame64.127" vmame64.exe 88games -rompath "C:\Extras\CHD;C:\Extras\Mame 0.127 roms"
Comment
-
Oh Oh, I have a stalker... LOL
I have had major internet problem, I couldn't connect yesterday afternoon at all, and I don't know if they have it fixed permanently or not. I think it stops working while they try to make repairs, so If I don't respond, I'm not ignoring you.
I have it working (sort of) by writing a script in AHK. It really is no different than what we were doing, I guess Gameex likes AHK scripts better than batch files. I have to go to work, but when I get back (probably a short day), I will post the details, and let you know what issues I have.
I'll give you a hint... The open irfanview windows respond to keyboard commands while Mame is running.... I really haven't taken a look at it yet, Talk to you soon...
Comment
-
Hello Morpheus,
Originally posted by MorpheusAlright, I'm getting a little worried... you seem to be able to see what I'm doing! LOL
Originally posted by Morpheus View PostIf I don't respond, I'm not ignoring you.
I'll give you a hint... The open irfanview windows respond to keyboard commands while Mame is running.... I really haven't taken a look at it yet, Talk to you soon...
So, what happened with the alternative I gave you yesterday? Did you try it or skip it? Did it fail as well?
Comment
-
I'll try to bring you up to date (I tried earlier, hit "submit reply", and got a "explorer can't display the page" error.) AAARRRGG!
I have it working pretty well, but I'll give you some background...
When Mame is run, it opens a disclaimer window "Do you have the right to play this game, Type OK, or hit ESC" Then, depending on the game another window may open that says "This Game may not run perfectly, Type OK, or hit ESC". AS I mentioned before, I have built an arcade style cabinet, and do not want to have a keyboard visible, so I am running a custom compiled version of Mame. This custom version apparently gets around the "nag screens" by sending "O", "K", and "Enter" about ten times, "shotgunning" it to make sure that it gets the idea that yes, it is OK.
That is what was causing Iview to try to open a file. The "O" was opening the "open file" dialog, and "K" was being entered as the filename. (I mentioned that Iview was trying to open a file in a previous post.)
You gave me the idea, that of course Mame was going to be sending those keystrokes to Iview if the timing wasn't correct... So I wrote an AHK script to do everything.
This is the script:
Code:;#NoTrayIcon #SingleInstance ignore SetTitleMatchMode, 2 Run, C:\Marqueemaker\Bottom\i_view32.exe C:\Emulators\Mame64.127\marquees\%1%.png /hide=15 Run, C:\Marqueemaker\TopRight\i_view32.exe C:\Emulators\Mame64.127\flyers\%1%.png /hide=15 Run, C:\Marqueemaker\TopLeft\i_view32.exe C:\Emulators\Mame64.127\titles\%1%.png /hide=15 Run, vmame.exe %1% -rompath "C:\Extras\CHD;C:\Extras\Mame 0.127 roms", C:\Emulators\Mame64.127 WinWaitActive, MAME: ;Wait here until Mame opens WinWaitClose ;Wait here until Mame closes Run, taskkill.exe /IM i_view32.exe Exitapp
That's all I know for now, if you don't have any suggestions, I'll ask for help at the AHK forums, I use the name "Morpheus" there as well. (Matrix Fan)
Let me know what your thoughts are, and thanks again for the help!
Tempest
Comment
-
I don't know anything about AHK scripting. Haven't had time to ever try it before.
(I mentioned that Iview was trying to open a file in a previous post.)
I thought a bit about the focus issue and came up with a solution. It's not necessarily the most efficient, but it works pretty well. You'll have to figure out how to adapt it. It looks basically like this:
Code:@echo off cd C:\Program Files (x86)\IrfanView2 i_view32.lnk "C:\Emulators\Mame64.127\marquees\%1.png" /ini="C:\Program Files (x86)\IrfanView2\Bottom" /hide=15 /resize=(1670,470) /aspectratio /resample set x=0 goto timer :next C: CD "C:\Emulators\Mame64.127" vmame64.exe %1 -rompath "C:\Extras\CHD;C:\Extras\Mame 0.127 roms" exit :timer if "%x%"=="25" goto next set /a x=%x%+1 goto timer
Code:"C:\Program Files (x86)\IrfanView2\Bottom.lnk" [ROM]
Anyway, the code introduces a delay timer that forces Mame to start later, giving IrfanView time to load first. Thus, Mame ends up with focus. Depending on how things go, you might want to play with the timer to get the right amount of delay so it works right for you. Just modify "25".
... thanks again for the help!
Good luck Morpheus!Last edited by Skippybox; 24.10.2008, 11:12 PM.
Comment
-
Where are we on the project, Morpheus?
If you are still working with the timer setup you could do it like this:
Bottom.bat
Code:cd C:\Program Files (x86)\IrfanView2 i_view32.lnk "C:\Emulators\Mame64.127\marquees\%1.png" /ini="C:\Program Files (x86)\IrfanView2\Bottom" /hide=15 /resize=(1670,470) /aspectratio /resample Exit
Code:@echo off set x=0 goto timer :exit C: CD "C:\Emulators\Mame64.127" vmame64.exe %1 -rompath "C:\Extras\CHD;C:\Extras\Mame 0.127 roms" exit :timer if "%x%"=="25" goto exit set /a x=%x%+1 goto timer
Code:"C:\Program Files (x86)\IrfanView2\Bottom.lnk" [ROM]
Code:"C:\Emulators\Mame64.127\Mame.lnk" [ROM]
Code:@ECHO OFF "C:\PROGRAM FILES (X86)\IRFANVIEW2\Bottom.lnk" 88games "C:\Emulators\Mame64.127\Mame.lnk" 88games
Comment
-
I got it working...
Sorry I haven't posted, I haven't been able to connect since Saturday, I finally went to my mom's just to catch up on the forums... I wil be posting all of the details at the Gameex forum, I will provide you with a link when I get it done.
The problem was that Gameex was sending the "O" "K" "enter", not Mame, so I was putting the code in the wrong place in the script!
Thanks again for your help! I don't think I would have gotten it done without you!Last edited by Morpheus; 28.10.2008, 08:22 PM.
Comment
-
I went through the topic quickly, here are some Ideas that I may not have thought of:
Remember you can also have more than one IrfanView program installed at a time!
I remembered you turned off Remember the last window size/postion
You probably are displaying extensions. You don't rename the shortcut i_view32.exe or i_view32.lnk because that won't change the extension and you don't want to. Simply rename it i_view32; the extension is lnk and is hidden.
Obviously, you won't find anyone as devoted as me.
Because we eliminated the 'waiting till one program is finished capability', now we are at the will of whatever one starts first! Unfortunately, if IrfanView starts last it will get focus.
I think that's quite a bit, especially since you don't use GameEx, or Mame. You seem to have a good understanding of how things work, and I really don't. It's all the little things that trip me up. It's all in the details...
Comment
-
Nice summary, I appreciated that. It helped me understand what you found important. I always wonder though, if given enough time on their own, if people really could figure out how to do all the things I tell them. I guess you would certainly say otherwise?
Did you ever try the "timer" or that wouldn't have worked with Gameex issuing those keystrokes?Last edited by Skippybox; 28.10.2008, 09:35 PM.
Comment
-
I finished it without being able to read your last posts, because of the internet problems, so no I didn't try it. The script works better, because I can "Wait" for programs to open, or close, I tried "Sleep" at first, but I figured that would not be accurate to account for different system speeds...
I made my post at GameEx:
Another internet SNAFU, so the attachments are not displayed :-(
not much of a post... hopefully it will be fixed soon...
Comment
-
Can't see them. Apparently I'm not a member.
How come fullscreen uses a maximized window instead of true fullscreen mode?
Tempest has made it to the Stickies! Nice tribute.
Originally posted by MorpheusI think that's quite a bit, especially since you don't use GameEx, or Mame. You seem to have a good understanding of how things work, and I really don't. It's all the little things that trip me up. It's all in the details...
We should do a slideshow now!Last edited by Skippybox; 29.10.2008, 09:23 PM.
Comment
Comment