https://github.com/bbigras/go-autoit
A wrapper of AutoIt (AutoItX) for the Go Programming Language.
https://github.com/bbigras/go-autoit
Last synced: about 1 year ago
JSON representation
A wrapper of AutoIt (AutoItX) for the Go Programming Language.
- Host: GitHub
- URL: https://github.com/bbigras/go-autoit
- Owner: bbigras
- License: gpl-3.0
- Created: 2013-12-04T14:58:05.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2016-10-13T18:52:10.000Z (over 9 years ago)
- Last Synced: 2025-04-11T18:04:02.018Z (about 1 year ago)
- Language: Go
- Size: 29.3 KB
- Stars: 17
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
go-autoit
=========
[](https://godoc.org/github.com/brunoqc/go-autoit)
[](https://ci.appveyor.com/project/brunoqc/go-autoit)
A Go [AutoItX](https://www.autoitscript.com/site/autoit/) wrapper.
##Sample code##
```go
package main
import (
"fmt"
"github.com/brunoqc/go-autoit"
)
func main() {
success, pid := autoit.Run("notepad.exe", "", autoit.SwNormal)
if !success {
panic("can't run process")
}
fmt.Println("pid", pid)
}
```
##Build##
You need the DLL (`AutoItX3.dll` or `AutoItX3_x64.dll` for 64-bit) and the [Swig](http://www.swig.org/) executable in your `PATH`.
Note: I wasn't able to set `CGO_CFLAGS` to `C:\Program Files (x86)\AutoIt3\AutoItX`. It doesn't seem to like white spaces in the path so I copied the `AutoItX` directory to `c:\`
Note 2: swig seems to ignore `CGO_CFLAGS` so you may have to copy `AutoItX3_DLL.h` to the current directory.
```bash
set CGO_CFLAGS=-Ic:/AutoItX
set CGO_LDFLAGS=-Lc:/AutoItX -lAutoItX3_DLL
# (for 64-bit)
set CGO_LDFLAGS=-Lc:/AutoItX -lAutoItX3_x64_DLL
go build
```