Skip to content

Commit

Permalink
Try using autopilot, but seems unreliable
Browse files Browse the repository at this point in the history
  • Loading branch information
cantino committed Dec 3, 2023
1 parent 129ace1 commit a480e23
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 35 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 1 addition & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ path-absolutize = "3.0.13"
regex = { version = "1", default-features = false, features = ["perf", "std"] }
shellexpand = "2.1"
unicode-segmentation = "1.9"
autopilot = "0.4.0"

[dependencies.rusqlite]
version = "0.28"
Expand All @@ -42,12 +43,6 @@ features = ["use-dev-tty"]
version = "4"
features = ["derive"]

[target.'cfg(not(windows))'.dependencies]
libc = "0.2"

[target.'cfg(windows)'.dependencies]
autopilot = "0.4.0"

[features]
default = ["sqlite-bundled"]
sqlite-bundled = ["rusqlite/bundled"]
24 changes: 0 additions & 24 deletions src/fake_typer.rs

This file was deleted.

1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
pub mod cli;
pub mod command_input;
pub mod dumper;
pub mod fake_typer;
pub mod fixed_length_grapheme_string;
pub mod history;
pub mod history_cleaner;
Expand Down
5 changes: 2 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use mcfly::dumper::Dumper;
use mcfly::fake_typer;
use mcfly::history::History;
use mcfly::init::Init;
use mcfly::interface::Interface;
Expand Down Expand Up @@ -72,10 +71,10 @@ fn handle_search(settings: &Settings) {
fs::write(path, &out)
.unwrap_or_else(|err| panic!("McFly error: unable to write to {}: {}", path, err));
} else {
fake_typer::use_tiocsti(&cmd);
autopilot::key::type_string(&cmd, &[], 0.0, 0.0);

if result.run {
fake_typer::use_tiocsti("\n");
autopilot::key::type_string("\n", &[], 0.0, 0.0);
}
}
}
Expand Down

0 comments on commit a480e23

Please sign in to comment.