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: Help with... just about everything and AHK  (Read 3794 times)

0 Members and 1 Guest are viewing this topic.

Narcissus04

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 13
  • Last login:September 05, 2013, 11:20:07 am
Help with... just about everything and AHK
« on: July 06, 2011, 07:52:29 pm »
Ok, I've tried to do it discreetly - I've set up my Mala Frontend with the usuals Mame, Genesis, Snes, Nes, Master System, Atari 2600 etc.
And after about two weeks of searching (most searches leading me back to this forum), I have to admit I'm completely stuck.

I can not get the hang of AHK scripts. If I may I'll tell you my two main problems:

1) Closing emulators such as Project Tempest which don't accept the Escape key. This is the script I use:

#IfWinActive ahk_class PT
[::Send !{F4}

and for a bit of a jolly I tried this:

#IfWinActive ahk_class PT
Esc::Send !{F4}

I save the text document as an Ahk file, I use the compiler to make it an exe and load it into presets. It basically doesn't work, pre-command just sits there for ages. Anything here I'm doing wrong or do you really need to wait for 30 minutes everytime I want to play a Jaguar game.

2) Daemon Tools is getting me down. I'm trying to set up the Saturn and Dreamcast, so far I've tried two scripts (both found on this site):

blockinput on
rom := %0%
run, cmd.exe
winwait, C:\WINDOWS\system32\cmd.exe
send cd \Program Files\DaemonTool\{enter}
send DtPro.exe -mount 0, "O:\Emulators\RomFiles\Sega Saturn\%rom%"{enter}
winwait, DAEMON
winwaitclose, DAEMON
run, O:\Emulators\Programs\SSF\SSF.exe
winkill, C:\WINDOWS\system32\cmd.exe
blockinput off
winwaitclose, SSF

or

Run, C:\Program Files\DaemonTool\DTPro.exe -unmount 0
Sleep 2000
Run, C:\Program Files\DaemonTool\DTPro.exe -mount 0, "%1%"
Sleep 2000
SetWorkingDir, O:\Emulators\Programs\SSF
Runwait, SSF.exe

Again both I'm pretty much having no luck with, they open Demon Tools - but it seems to then give up as far as mounting anything goes.

I'm sure both of these are probably very easy things to see - which is why there aren't a great deal of threads on them. So any help - vastly appreciated.


Celsius

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 81
  • Last login:May 10, 2015, 11:40:41 am
    • Rcade project
Re: Help with... just about everything and AHK
« Reply #1 on: July 07, 2011, 03:30:11 am »
1) I don't use tempest myself, so the only thing i can think of is that the Window Title is wrong (#IfWinActive WinTitle), since the rest looks fine to me. Did you use Ahk's Window Spy to get the title?
2) As for 2, it's easier to use mala's pre and post commands:
   mala options ->basic settings are standard (point to exe, roms, rom extensions)
   go to execution tab:
   -> Pre commands = "path to your deamon exe" -mount -0,"%path%\%rom%.%ext%" (for me that's: "C:\Program Files (x86)\DAEMON Tools Lite\DTLite.exe" -mount -0,"%path%\%rom%.%ext%")
   -> leave command line empty
   -> Post commands = "path to your deamon exe" -unmount -0 (so I got: "C:\Program Files (x86)\DAEMON Tools Lite\DTLite.exe" -unmount -0)
   -> Done

Narcissus04

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 13
  • Last login:September 05, 2013, 11:20:07 am
Re: Help with... just about everything and AHK
« Reply #2 on: July 07, 2011, 07:54:42 am »
This is where it gets frutsrating - the path makes total sense but as soon as it loads Daemon Tools it doesn't mount anything - is this perhaps a problem with using Daemon Tools pro?

My script is as follows:

Under Pre-Commands:
"C:\Program Files\DaemonTool\DTPro.exe" -mount -0, "%path%\%rom%.%ext%"

Command Line blank.

Under Post Commands:

"C:\Program Files\DaemonTool\DTPro.exe" -unmount -0

Still strugglin' away with PT. Unfortunately Virtual Jaguar seems to not care much for windows Vista.

Celsius

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 81
  • Last login:May 10, 2015, 11:40:41 am
    • Rcade project
Re: Help with... just about everything and AHK
« Reply #3 on: July 07, 2011, 12:08:47 pm »
Just downloaded tempest and your ahk script looks fine...did you try to switch a button that you would use ingame, to see if that works. For example if you would use d as A-Button and switch it to t or something similar
#IfWinActive ahk_class PT
d::t
t::d

As for DTpro, I don't really have experience with the pro version, but got this from their help section
Quote
-mount
Mounts a virtual drive with an image file:

Syntax: -mount <type>,<n>,<path>

<type>: "scsi" or "ide"
<n>:    device number
<path>: path to file

Example: DTAgent.exe -mount ide, 0, "f:\test.iso"

Note 1: If <type> is not specified type will be automatically set to "scsi". IDE adapter type is allowed only in Pro Advanced edition.
Note 2: Maximum device number <n> of allowed SCSI devices depends on license type, maximum number of IDE devices is 4 (Pro Advanced edition only).

-unmount
Unmounts a virtual drive.

Syntax: -unmount <type>,<n>

<type>: "scsi" or "ide"
<n>:    device number

Example: DTAgent.exe -unmount ide, 0

Try adjusting the commands I gave you with the info above ("C:\Program Files (x86)\DAEMON Tools Pro\DTAgent.exe" -mount ide, 0,"%path%\%rom%.%ext%")...if nothing works...why not use lite  >:D
« Last Edit: July 07, 2011, 12:15:38 pm by Celsius »

Narcissus04

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 13
  • Last login:September 05, 2013, 11:20:07 am
Re: Help with... just about everything and AHK
« Reply #4 on: July 08, 2011, 12:02:48 pm »
That's interesting ... I've been using DTPro.exe instead of DTAgent.exe.

That being said - I've managed to get a syntax error up now, which is new and gives me hope. I'm going to try this again tomorrow, for now I've ran out of time.

EDIT: I've finally had time to play and this is what worked:


Quote
"C:\Program Files\DaemonTool\DTAgent.exe" -mount dt,0,"%path%\%rom%.%ext%"
"C:\Program Files\DaemonTool\DTAgent.exe" -unmount dt,0

Unfortunately the key config for SSF doesn't let me use ANY of these keys I have set for every other emulator - but I'm pretty happy so might deal with that later.



EDIT 2: Ok, so still suffering with the AHK.

I can do
#IfWinActive ahk_class PT
a::b
b::a

and the b and a keys switch (not very useful but proves the script CAN work).

However

#IfWinActive ahk_class PT
Esc::Send !{F4}

Does absolutely nothing. Web searching has found me nothing.

Is it possible to use AHK to close a window with the Escape key? Because so far, as far as I can tell, it can't.


« Last Edit: July 13, 2011, 04:19:13 pm by Narcissus04 »