Support fo scripting fuse?

Struggling with Fuse or trying to find an emulator with a specific feature. Ask your questions here.
Post Reply
mariano_dm
Drutt
Posts: 14
Joined: Fri Sep 02, 2022 11:28 pm

Support fo scripting fuse?

Post by mariano_dm »

Hello.
I want to be able to load a program after I boot a tape.

for example, autorun a logo program, after autoload the language itself, be able to send commands to the running emulator.

I saw phantom typing sends commands to the emulator, but cannot find a way to send custom keystrokes.
is there a way to interact with a running fuse without UI

thanks
M
firelord
Manic Miner
Posts: 582
Joined: Wed Nov 03, 2021 10:57 am
Location: Greece - Thessaloniki

Re: Support fo scripting fuse?

Post by firelord »

In linux this is easy with xdotool -a command line program. This sends key or mouse inputs to any window.
There should be something similar in windows
User avatar
PeterJ
Site Admin
Posts: 6938
Joined: Thu Nov 09, 2017 7:19 pm
Location: Surrey, UK

Re: Support fo scripting fuse?

Post by PeterJ »

Good find @firelord,

There is a Windows version in development:

https://github.com/ebranlard/xdotool-for-windows
mariano_dm
Drutt
Posts: 14
Joined: Fri Sep 02, 2022 11:28 pm

Re: Support fo scripting fuse?

Post by mariano_dm »

oh ! thanks, you're right !
for some reason I thought this was atari800-emulator specific

https://github.com/marianodominguez/Ata ... #L201-L204
User avatar
Luzie
Manic Miner
Posts: 913
Joined: Fri May 01, 2020 2:07 pm

Re: Support fo scripting fuse?

Post by Luzie »

For Windows, I can recommend AutHotkey https://www.autohotkey.com/ for Scripting / Sending timed Keystrokes.
mariano_dm
Drutt
Posts: 14
Joined: Fri Sep 02, 2022 11:28 pm

Re: Support fo scripting fuse?

Post by mariano_dm »

After finishing a couple of side projects on atari, decided to give it a try

I managed to add my logo program to tape and make fuse to load it, not pretty as you can see

Code: Select all

#!/bin/bash
cp ../lib/LOGO.TAP tape.tap
tr '\n' '\15' < AUTORUN.LOG > AUTO.LOG
./taput add -n "auto   LOG" AUTO.LOG tape.tap
fuse --graphics-filter 2x --no-confirm-actions --no-autosave-settings --auto-load tape.tap &
sleep 5
xdotool search --class fuse windowactivate --sync sleep 3 type --delay 400 'load\ '
xdotool search --class fuse windowactivate --sync sleep 1 key ctrl+p
xdotool search --class fuse windowactivate --sync sleep 1 type --delay 400 'auto\ '
xdotool search --class fuse windowactivate --sync sleep 1 key Return

The problem is that fuse is incredibly unreliable, it sometimes repeats the keys and others just ignores them, also, I'm having problem with EOF, it seems it tries to load a "W" past the file

Image
Post Reply