English Amiga Board Amiga Lore


Go Back   English Amiga Board > Support > New to Emulation or Amiga scene

 
 
Thread Tools
Old 18 September 2015, 03:45   #1
MrSnrub
 
Posts: n/a
Automatic mouseclick and screenshot every minute.

I am playing Sim City on WinUAE. At the start of the game you choose your initial city layout from an infinite set of possible maps. The game loads a random city map layout at startup and it gives you the options to either "Use This Map" or "Generate New Map." I want to continuously click on "Generate New Map" and take a screenshot of the generated map. So I will hover my mouse cursor over the "Generate New Map" button, then the emulator will simulate a mouse click to generate a new map, I will wait ten seconds for the map to be generated, then a screenshot/PrintScreen will be taken. Then the process will repeat: mouse-click, wait, screenshot, mouse click, wait, screenshot on to infinity. How can I do this?
 
AdSense AdSense  
Old 18 September 2015, 17:43   #2
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,017
Go to the WinUAE input panel and bind F11 or something to WinUAE's screenshot function, and use one of the many macro/automation programs out there to record and replay clicking the mouse and pressing F11.
Leffmann is offline  
Old 23 September 2015, 01:59   #3
MrSnrub
 
Posts: n/a
Arrrgh, I am so close! I mapped the SEMICOLON key to "Screenshot (file)" and the LBRACKET key to "Joy1 Fire / Left Mouse Button." I start the game up and I type ;[;[ onmy keyboard and it generates the new map and saves the screenshot and everything works great. The problem comes when I launch my special little C# program that I wrote that uses the SendKeys command to type nothing but ;[;[;[;[ every 30 seconds. The program works great when Notepad is activated, and types ;[;[;[ correctly, but when I activate the WinUAE window it doesn't work! WinUAE must be recognizing that an external program is trying to interfere with the program. Anybody have any ideas?
 
Old 23 September 2015, 12:59   #4
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,017
If you want to do it programmatically then SendInput() works fine, WinUAE will see those input events.
Leffmann is offline  
Old 23 September 2015, 13:55   #5
jbl007
Registered User
 
Join Date: Mar 2013
Location: Leipzig/Germany
Posts: 342
Simple example with AutoHotkey (untested!):
Code:
F11::ExitApp  ; F11 to quit
Sleep, 5000  
Loop
{
        SendInput, {LButton}
        Sleep, 10000  
        SendInput, {;}
        Sleep, 60000
}
jbl007 is offline  
Old 23 September 2015, 16:56   #6
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,682
Did you try mapping events using "WinUAE null keyboard" instead of normal keyboard device? (In input panel device list)

It is default fallback virtual keyboard used when WinUAE receives keyboard event without keyboard identifier (which usually means it was injected event).
Toni Wilen is offline  
Old 24 September 2015, 01:58   #7
MrSnrub
 
Posts: n/a
Mapping using "WinUAE null Keyboard" with my special C# program did not work. I have never used SendInput or AutoHotKey before, so I will look into them next.
 
Old 24 September 2015, 14:01   #8
Anubis
Maj. Voodoo

Anubis's Avatar
 
Join Date: Jan 2005
Location: Vega Sector
Age: 45
Posts: 2,285
Just use MiniMouseMacro, to setup what you want to do on screen and hotkeys.

http://sourceforge.net/projects/minimousemacro/

It is easy to program and to edit...
Anubis is offline  
Old 26 September 2015, 13:28   #9
MrSnrub
 
Posts: n/a
None of these are working, I've tried Mini Mouse Macro and AutoHotKeys, they're all running into the same problem: they won't run when the focus is on the WinUAE window, and I've selected "WinUAE null keyboard." They work when Notepad is focused though. What am I missing?
 
Old 26 September 2015, 13:30   #10
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,682
Do you see any log messages if you run winuae with -log -inputlog 1 command line parameters? 1 = log PC keyboard events. ("winuae.exe -log -inputlog 1")
Toni Wilen is offline  
Old 26 September 2015, 19:12   #11
MrSnrub
 
Posts: n/a
I was able to run the WinUAE program with logging in the cmd window. I see the log messages when I type out the ; [ ; [ keys, as expected. But I do not see any log messages when running Mini Mouse Macro. So, no, I think WinUAE is still not "seeing" the input.
 
AdSense AdSense  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Amiexpress Sysop in a Minute or More. Black Beard support.Apps 4 03 July 2014 14:31
Last minute advice on my a4000 VermillioN support.Hardware 14 06 November 2007 10:33
15 minute Amiga 500 commercial gimbal Nostalgia & memories 7 23 October 2006 20:23
Minor request (1 minute change). Jim project.EAB 1 11 December 2004 23:43
REQ: Automatic resolution change ; automatic resolution detection Borg_Number_One request.UAE Wishlist 3 21 August 2004 14:16

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 04:25.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Page generated in 0.26019 seconds with 11 queries