Skip to content

Commit

Permalink
Fix to robotjs native dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
megastary committed May 9, 2020
1 parent 738625a commit 4b8297e
Show file tree
Hide file tree
Showing 9 changed files with 80 additions and 15 deletions.
74 changes: 62 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,63 @@
# Click and Clack (clickandclack)
<img src="Square150x150Logo.png" alt="Application logo" align="right" />

Super simple application for clicking mouse button and clacking key button in defined intervals.
# Click and Clack

## About application
> Super simple application for clicking mouse button and clacking key button in defined intervals.
Download, install, launch and start clicking and clacking!
Simple interface for simple job. Application can be controlled even when not visible via shortcut.

## How to get

- [Download](https://github.com/houby-studio/clickandclack/releases/latest)
- Install with one click
- Launch
- Enjoy clicking and clacking!

> Currently only Windows installer is available.
## How to use

### Main window

allows you to set:

- How often mouse clicks, in seconds
- What key does program clack
- How often keyboard clacks, in seconds

<img src="main-window.png" alt="Main application window"/>

From main window, you can click on:
- mouse icon, which opens mouse settings
- keyboard icon, which opens special keys

From window toolbar, you can click on:
- settings icon, which opens application settings
- minimize and exit icons

### Mouse settings

allows you to set:
- Whether mouse clicks with **left** or right button
- Whether mouse makes **single click** or double click

<img src="mouse-settings.png" alt="Mouse settings window"/>

### Keyboard settings

allows you to set:
- special key to press

<img src="keyboard-settings.png" alt="Keyboard settings window"/>

### Application settings

allows you to set:
- Whether window is always on top or **not**
- Whether random delay of up to 5 seconds applies on each trigger or **not**
- Whether clicking is **enabled** or disabled
- Whether clacking is **enabled** or disabled

<img src="settings-window.png" alt="Application settings window"/>

## Developing

Expand All @@ -19,15 +71,13 @@ yarn
quasar dev -m electron
```

### Lint the files
```bash
yarn run lint
```
> If build fails due to native module [robotjs](https://robotjs.io/docs/electron), customize 'rebuild' script to run against your electron version and run `yarn rebuild` before running build
### Build the app for production
```bash
quasar build
quasar build -m electron
```

### Customize the configuration
See [Configuring quasar.conf.js](https://quasar.dev/quasar-cli/quasar-conf-js).
## [MIT License](LICENSE)

> Brought to you by 🍄 Houby Studio
Binary file added keyboard-settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added main-window.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mouse-settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "clickandclack",
"version": "0.0.1",
"version": "1.0.0",
"description": "Super simple application for clicking mouse button and clacking key button in defined interval.",
"productName": "Click and Clack",
"cordovaId": "eu.houby_studio.clickandclack",
Expand All @@ -13,6 +13,7 @@
},
"dependencies": {
"@quasar/extras": "^1.0.0",
"node-addon-loader": "^0.0.6",
"quasar": "^1.0.0",
"robotjs": "^0.6.0",
"vuex-pathify": "^1.4.1",
Expand Down
8 changes: 7 additions & 1 deletion quasar.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,17 @@ module.exports = function (/* ctx */) {
enforce: 'pre',
test: /\.(js|vue)$/,
loader: 'eslint-loader',
exclude: /node_modules/,
options: {
formatter: require('eslint').CLIEngine.getFormatter('stylish')
}
})
cfg.module.rules.push({ // Fix for webpack not resolving path for native modules
test: /\.node$/,
loader: 'node-addon-loader',
options: {
basePath: __dirname
}
})
}
},

Expand Down
Binary file added settings-window.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion src/pages/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,8 @@
</template>

<script>
import robot from 'robotjs'
// import robot from 'robotjs'
const robot = require('electron').remote.require('robotjs')
import { sync } from 'vuex-pathify'
const { globalShortcut } = require('electron').remote
Expand Down
7 changes: 7 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6988,6 +6988,13 @@ node-abi@^2.11.0, node-abi@^2.13.0, node-abi@^2.7.0:
dependencies:
semver "^5.4.1"

node-addon-loader@^0.0.6:
version "0.0.6"
resolved "https://registry.yarnpkg.com/node-addon-loader/-/node-addon-loader-0.0.6.tgz#251bab507be3186ec0ced54bf39e43537fdc1fd3"
integrity sha512-1qfu2CuHBdqPMmNb/q913madmxZg2A9MHt0bcRfWQQrpqQ9NptOBrXO4wrW4DrpofnsCoIbZf5QI1gYTZ02XwQ==
dependencies:
loader-utils "^1.1.0"

node-forge@0.9.0:
version "0.9.0"
resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.9.0.tgz#d624050edbb44874adca12bb9a52ec63cb782579"
Expand Down

0 comments on commit 4b8297e

Please sign in to comment.