Compare commits

...

4 Commits

Author SHA1 Message Date
Elizabeth Cray 7d3dba469d Auto-Send Feature 2024-05-16 18:34:48 -04:00
Elizabeth Cray ee392d5213 Update Readme 2023-08-28 18:15:31 -04:00
Elizabeth Cray 9de21282f1 more todo 2023-08-04 20:45:24 -04:00
Elizabeth Cray fdce798e47 Added more future additions 2023-07-24 22:03:19 +00:00
4 changed files with 58 additions and 23 deletions

View File

@ -1,19 +1,29 @@
# Drone Input Tool
Allen Wrench is a desktop tool to aid [Hexcorp](https://hexcorp.net) Drones in their digital interactions.
## WIP Features
* [ ] Customize shortcut keys used on linux platforms
* [ ] Add support for BSD
* [ ] Keyboard control of the program
* [ ] Improve UI design (Input Requested)
* [ ] Better sorting of subjects
* [ ] Built-in system shortcut
* [ ] Auto-send `return` on paste completion for pre-determined phrases
* [ ] Ability to add custom types / phrases
* [ ] [Unicode "font" options](https://lingojam.com/DiscordFonts)
### Misc notes
[Use this as a guide for building for MacOS](https://thinkgo.io/post/2023/02/publish_tauri_to_apples_app_store/)
# Drone Input Tool
Allen Wrench is a desktop tool to aid [Hexcorp](https://hexcorp.net) Drones in their digital interactions.
## WIP Features
### Crucial Updates
* [ ] Ensure window appears within bounds of screen(s) when moved to cursor location
* [ ] Keyboard control of the program
* [X] Auto-send `return` on paste completion for pre-determined phrases
* [ ] Prevent showing window until on correct location
### Nice to Haves
* [ ] Customize shortcut keys used on linux platforms
* [ ] Add support for BSD 😬
* [ ] Improve UI design (Input Requested)
* [ ] Better sorting of subjects
* [ ] Built-in system shortcut
* [ ] Ability to add custom types/phrases
* [ ] [Unicode "font" options](https://lingojam.com/DiscordFonts)
* [ ] Drone Speech Optimizations
* [ ] Improve Launch Times
* [ ] Add Version Display in Config
### Misc notes
[Use this as a guide for building for MacOS](https://thinkgo.io/post/2023/02/publish_tauri_to_apples_app_store/)

View File

@ -1,7 +1,7 @@
{
"name": "allenwrench-app",
"private": true,
"version": "0.1.1",
"version": "0.2.0",
"type": "module",
"scripts": {
"dev": "vite",

View File

@ -15,7 +15,7 @@ fn get_mouse_pos() -> String {
}
#[tauri::command]
fn type_str(input: String) {
fn type_str(input: String, autoSend: bool) {
#[cfg(dev)]
println!(">: {}", input);
@ -64,6 +64,12 @@ fn type_str(input: String) {
enigo.key_up(Key::Control);
}
thread::sleep(Duration::from_millis(200));
if (autoSend) {
enigo.key_click(Key::Return);
}
thread::sleep(Duration::from_millis(20));
// Close program

View File

@ -44,6 +44,10 @@ function App() {
let storedId = localStorage.getItem("droneId");
return (storedId ? storedId : "0000");
});
const [autoSend, setAutoSend] = useState<boolean>(() => {
let storedAutoSend = localStorage.getItem("autoSend");
return (storedAutoSend ? storedAutoSend == "true" : false);
});
if (!codes){
resolveResource("resources/codes.json").then((path: string) => {
@ -102,7 +106,7 @@ function App() {
if (filtered.length == 1) {
let payload: string = generatePayload(filtered[0]);
setSubTopic("");
invoke('type_str', {input: payload});
invoke('type_str', {input: payload, autoSend});
}
}
};
@ -142,7 +146,7 @@ function App() {
if (filtered.length == 1) {
let assembledStr: string = generatePayload(filtered[0]);
setSubTopic("");
invoke('type_str', {input: assembledStr});
invoke('type_str', {input: assembledStr, autoSend});
}else{
// Open Submenu for type
setSubTopic(type);
@ -213,6 +217,21 @@ function App() {
</div>
{/* TODO: Optional auto-send on pre-made messages */}
</div>
<div className="row">
<div className="col-6 text-end">
Auto-Send
</div>
<div className="col-6">
<input
type="checkbox"
checked={autoSend}
onChange={(e) => {
setAutoSend(e.target.checked);
localStorage.setItem("autoSend", e.target.checked.toString());
}}
/>
</div>
</div>
<div className="row modal-footer">
<div className="col-4" onClick={() => {
let url = "https://git.corrupt.link/liz/AllenWrench";