mirror of
https://github.com/go-vgo/robotgo
synced 2026-05-24 10:19:01 +00:00
update examples and update code style
This commit is contained in:
parent
83845a8488
commit
a3aa5c000f
2 changed files with 6 additions and 4 deletions
|
|
@ -20,5 +20,7 @@ func colorPicker() {
|
|||
func main() {
|
||||
fmt.Println("color picker...")
|
||||
|
||||
colorPicker()
|
||||
for {
|
||||
colorPicker()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -615,11 +615,11 @@ char* get_title_by_hand(MData m_data){
|
|||
== kAXErrorSuccess && data != NULL) {
|
||||
char conv[512];
|
||||
// Convert result to a C-String
|
||||
CFStringGetCString(data, conv,
|
||||
512, kCFStringEncodingUTF8);
|
||||
CFStringGetCString(data, conv, 512, kCFStringEncodingUTF8);
|
||||
CFRelease(data);
|
||||
|
||||
char* s = (char*)calloc(100, sizeof(char*));
|
||||
if (s) { strcpy(s,conv); }
|
||||
if (s) { strcpy(s, conv); }
|
||||
// return (char *)&conv;
|
||||
return s;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue