Automations is a Ruby 1.9 project consisting of libraries to fake and simulate (automate) user input like pressing keys or moving windows. Linux X server systems can be automated by using xdotool internally, Windows systems by using AutoItX3.
30
stars
8
forks
source link
"LoadLibraryError: Unable to load function" when call window.client_size #12
[82] pry(main)> w2 = AutoItX3::Window.new(ch.title)
=> <Window: SOME_SITE - Google Chrome ()>
[83] pry(main)> w2.client_size
Win32::API::LoadLibraryError: Unable to load function 'AU3_WinGetClientSizeWidth', 'AU3_WinGetClientSizeWidthA', or 'AU3_WinGetClientSizeWidthW'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/au3-0.1.2/lib/AutoItX3/au3.rb:135:in `initialize'
[84] pry(main)>
To confirm if there's really 3 functions with the names, I read the AutoItX3_DLL.h file that comes from AutoIt3 (v 3.3.14.2), but only found AU3_WinGetClientSize() and AU3_WinGetClientSizeByHandle().
maybe something incompatible ?
I followed the instructions below
ch = Watir::Browser.new :chrome ch.goto(SOME_SITE) ch.window.maximize ...... w2 = AutoItX3::Window.new(ch.title) w2.client_size
then got a Win32::API::LoadLibraryError
[82] pry(main)> w2 = AutoItX3::Window.new(ch.title) => <Window: SOME_SITE - Google Chrome ()> [83] pry(main)> w2.client_size Win32::API::LoadLibraryError: Unable to load function 'AU3_WinGetClientSizeWidth', 'AU3_WinGetClientSizeWidthA', or 'AU3_WinGetClientSizeWidthW' from C:/Ruby22/lib/ruby/gems/2.2.0/gems/au3-0.1.2/lib/AutoItX3/au3.rb:135:in `initialize' [84] pry(main)>
To confirm if there's really 3 functions with the names, I read the AutoItX3_DLL.h file that comes from AutoIt3 (v 3.3.14.2), but only found AU3_WinGetClientSize() and AU3_WinGetClientSizeByHandle().