Closed SwimmingTiger closed 5 years ago
Someone may want to run the test build directly:
testing-build.zip
This testing build compatible with SkyrimSE 1.5.53.0 (build from YihaoPeng:master):
testing-build-without-known-issues.zip
Sorry I'm just now getting to this. But this is awesome!
I'd like to include some useful examples of usage in the bundled sample ini file. Do you have any particular examples in mind?
I'll merge the changes in and do some manual testing before releasing a new build.
Here are some interesting example in my testing-build-without-known-issues.zip/DragonbornSpeaksNaturally.SAMPLE.ini
Sneak and cancel=switchwindow; press ctrl; sleep 5000; press ctrl
Fire in the hole=switchwindow; player.cast 0003f9ed player voice; sleep 3000; player.cast 00013f3a player voice
Casting with two hands=switchwindow; holdkey leftmousebutton; sleep 1000; holdkey rightmousebutton; sleep 5000; releasekey leftmousebutton; sleep 3000; releasekey rightmousebutton
switchwindow
is used to switch to the Skyrim window before any key simulation.
And some useless typing demo:
Console Typing Test=switchwindow; sleep 50; tapkey ~; sleep 50; tapkey s a v e; tapkey blank 1; sleep 300; tapkey enter; sleep 3000; tapkey ~
Upper Typing=switchwindow; tapkey ~; sleep 100; holdkey shift; tapkey t e; tapkey s t; releasekey shift; sleep 100; tapkey t e; tapkey s t
Regular key simulation:
Release Dragon Shout=press z 1000
Open Map=press m
Close Map=press m
Open taskbar=press esc
Left Hand Magic=press leftmousebutton 5000
Right Hand Magic=press rightmousebutton 5000
Useful and simple key simulation:
Open Map=press m
Close Map=press m
What should I do=press j
I don't want any more=press esc
Hello, man=press e
Hello, brother=press e
I want this=press e
Add some new commands to DSN
Command press
Description
Simulate pressing the specified key the specified milliseconds. Used to cast skills or dragon shouts or do other actions. If time is omitted, the time will be set as 50 milliseconds.
Tips
0x01
is esc, but1
is the number key 1.However, the cursor must be inside the Skyrim window when simulating a mouse click, otherwise the other window will receive the click event instead of Skyrim.
Reference
Example
Command tapkey
Description:
It's a shortcut to the press command (All pressing time are set to 50 milliseconds).
Example
Command holdkey and releasekey
Description:
Manual control the press and release of keys.
Example:
Command sleep
Description:
Delays the subsequent commands the specified milliseconds. Used to form an automatic action script with the press command. Both custom commands and Skyrim commands can be delayed.
Example:
Command switchwindow
Description:
Activate the specified window. Used to switch to the correct window before running the press command. Omitting the parameters will activate the current Skyrim window.
TODO:
Move the mouse cursor to the center of the active window.
Example: