Compare commits

...

4 Commits

Author SHA1 Message Date
Elizabeth Cray
7d3dba469d Auto-Send Feature 2024-05-16 18:34:48 -04:00
ee392d5213 Update Readme 2023-08-28 18:15:31 -04:00
9de21282f1 more todo 2023-08-04 20:45:24 -04:00
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 # Drone Input Tool
Allen Wrench is a desktop tool to aid [Hexcorp](https://hexcorp.net) Drones in their digital interactions. Allen Wrench is a desktop tool to aid [Hexcorp](https://hexcorp.net) Drones in their digital interactions.
## WIP Features ## WIP Features
* [ ] Customize shortcut keys used on linux platforms ### Crucial Updates
* [ ] Add support for BSD
* [ ] Keyboard control of the program * [ ] Ensure window appears within bounds of screen(s) when moved to cursor location
* [ ] Improve UI design (Input Requested) * [ ] Keyboard control of the program
* [ ] Better sorting of subjects * [X] Auto-send `return` on paste completion for pre-determined phrases
* [ ] Built-in system shortcut * [ ] Prevent showing window until on correct location
* [ ] Auto-send `return` on paste completion for pre-determined phrases
* [ ] Ability to add custom types / phrases ### Nice to Haves
* [ ] [Unicode "font" options](https://lingojam.com/DiscordFonts)
* [ ] Customize shortcut keys used on linux platforms
### Misc notes * [ ] Add support for BSD 😬
* [ ] Improve UI design (Input Requested)
[Use this as a guide for building for MacOS](https://thinkgo.io/post/2023/02/publish_tauri_to_apples_app_store/) * [ ] 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", "name": "allenwrench-app",
"private": true, "private": true,
"version": "0.1.1", "version": "0.2.0",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",

View File

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

View File

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