Skip to content

A wrapper of AutoIt (AutoItX) for the Go Programming Language.

License

Notifications You must be signed in to change notification settings

bbigras/go-autoit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-autoit

GoDoc Build status

A Go AutoItX wrapper.

##Sample code##

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 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.

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

About

A wrapper of AutoIt (AutoItX) for the Go Programming Language.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages