Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: How do you hide windows whilst autohotkey sets up an emulator? EDIT SELF FIXED!  (Read 1624 times)

0 Members and 1 Guest are viewing this topic.

Max Headroom

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 2
  • Last login:February 25, 2007, 05:26:55 pm
Hello everybody,
                           Over the last year I've been building up what could loosely be described as a Ms. Pacman replica cabinet from MDF, and setting up a multi-emulator PC \ Minipac \ Old Television to use in it.
  I've managed to get the PC side of things almost perfectly set out due to the MASSIVE amount of information on this forum, leaving me only Two loose ends to tie up.

 The Main problem I've got is with WinUAE, the not at all cab friendly Amiga emulator! I'm not sure that I can adequately explain this but here goes nothing, I have it set up in the following convoluted way:

*Each game has an auto hotkey script written for it, which mamewah lists as my ROMs.
* When any given script is launched, it will first run Winuae, then select which configuration to use, then select a save point of the game at it's Opening screen, Then open Uae in Fullscreen. It will then wait for the escape key to be pressed & when it is it will first kill WinUAE & then kill its self!

I've cut down the 'Sleep' times as much as my computer can cope with in each script but sadly you still see the windows pop up like in the accurately timed example below:



Does anybody have any idea how to hide this?
Is their a way I can briefly cut off the output from my graphics card for four seconds and then re-instate it, Or display some sort of splash screen above it all briefly that doesn't affect which window is considered active? Or is the entire thing simply to stupid?
« Last Edit: December 18, 2006, 08:55:26 am by Max Headroom »

Max Headroom

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 2
  • Last login:February 25, 2007, 05:26:55 pm
Re: How do you hide windows whilst autohotkey sets up an emulator?
« Reply #1 on: December 18, 2006, 07:23:43 am »
I found a solution in the autohotkey documentation :banghead: not long after posting the above, despite having grappled with it for absolutely ages before hand. Typical! I got a script working on my main PC, but I'll doubtless have to slow it down a hell of a lot for my Arcade Cab PC.
 If anyone else wishes to "Hide" a window whilst auto hotkey sends mouse and keystrokes to it, here's an example script that opens notepad in a semi transparent window. As far as I know this will only work with xp though.

#Persistent    ; keeps script running until exit app is encountered
Process, Priority, , High    ; makes the script run at high priority
SetWinDelay, 7   ; sets speed for script to run at - even minus figures are allowed
Run, C:\WINDOWS\Notepad.exe    ; opens notepad
WinWait, Untitled - Notepad    ; waits for the notepad window to appear
IfWinExist, Untitled - Notepad   
WinSet, Transparent, 150    ; sets transparency level of the window if it exists
KeyWait, F3, D    ; waits for the f3 key to be pressed down before executing the following lines
SendEvent {LAlt Down}
SendEvent {F4 Down}    ; holds down alt & f4 to close the last opened window
SendEvent {LAlt Up}
SendEvent {F4 Up}    ; releases alt & f4
ExitApp    ; this terminates the script
 
 Note that setting transparency to zero will prevent keystrokes being sent to a window, as the window can't be 'found'. Setting it to 1 will make it invisible to the human eye but good enough for the system to see. You can enter any figure between 0 & 255 - play around and see!


The other cool things I found that I never knew before were these:

Process, Priority, , High
(To make the script run at high priority)
SetWinDelay, -10
(To set the speed the script executes at. The lower the faster!)

This now only leaves me one problem in the shape of Outrun 2006 Coast to coast ...... but that should probably go in a different topic.

 
« Last Edit: December 18, 2006, 09:00:24 am by Max Headroom »