From: "Marvin Gülker" Date: 2009-12-29T03:49:42+09:00 Subject: Re: [ANN] au3 0.1.1 released Roger Pack wrote: > Marvin Gülker wrote: >> au3 0.1.1 has been released. au3 is a library that allows you to >> automate and simulate (fake) user input to a Windows system by using the >> DLL interface of AutoIt behind the scenes. Abilities include: >> * Cursor movement >> * Key pressing >> * Window interaction >> * Clipboard access >> * ... > > Oh wow. This feels one step closer to an AutoHotKey written in Ruby... > :) > -r Thank you. :) Indeed, I've struggled a lot with the Windows API to get rid of the dependency of AutoItX, but I've given up on it, because I wasn't able to master the #pack and #unpack methods. Many functions of the WinAPI want unions of structs of structs of ... of... and till today I don't know how to pack a struct into a struct. Easy procedures like the GetCursorPos() function just take a POINT struct that I have to pack before and unpack after the call again - but when it comes to keyboard simulation, I have to provide a whole bunch of structs in structs, because I can't take advantage of the struct's default values in Ruby (I'm using the win32-api gem for such tasks). If I provide a packed struct that misses some parameters, hoping the missing ones will be filled by the default ones, I only get error responses. Also, my C knowledge is not the best. Maybe you've noticed au3's first release, which has been a C extension - but since I never programmed in C before the style has been horrible. ;-) So, if you could help me out with #pack and #unpack, especially with structs in structs (I would look for an example from the WinAPI, if you want) I would start working on that again. Marvin -- Posted via http://www.ruby-forum.com/.