lib/win32/autogui/application.rb in win32-autogui-0.3.0 vs lib/win32/autogui/application.rb in win32-autogui-0.4.0
- old
+ new
@@ -106,11 +106,11 @@
# app = Application.new :name => "calc", :logger_logfile => 'log/calc.log'
#
# @example initialize with logging to file at DEBUG level
#
# include Autogui::Logging
- # app = Application.new :name => "calc", :logger_logfile => 'log/calc.log', :logger.level => Log4r::DEBUG
+ # app = Application.new :name => "calc", :logger_logfile => 'log/calc.log', :logger.level => Autogui::Logging::DEBUG
#
# @example initialize without logging to file and turn it on later
#
# include Autogui::Logging
# app = Application.new :name => "calc"
@@ -120,12 +120,12 @@
# @option options [String] :name a valid win32 exe name with optional path
# @option options [String] :title the application window title, used along with the pid to locate the application main window, defaults to :name
# @option options [Number] :parameters command line parameters used by Process.create
# @option options [Number] :create_process_timeout (10) timeout in seconds to wait for the create_process to return
# @option options [Number] :main_window_timeout (10) timeout in seconds to wait for main_window to appear
- # @option options [String] :logger_logfile (nil) initialize Log4r::Logger's output filename
- # @option options [String] :logger_level (Log4r::WARN) initialize Log4r::Logger's initial level
+ # @option options [String] :logger_logfile (nil) initialize logger's output filename
+ # @option options [String] :logger_level (Autogui::Logging::WARN) initialize logger's initial level
#
def initialize(options = {})
unless options.kind_of?(Hash)
raise_error ArgumentError, 'Initialize expecting options to be a Hash'
@@ -204,10 +204,10 @@
# There may be multiple instances, use title and pid to id our main window
@main_window = Autogui::EnumerateDesktopWindows.new.find do |w|
w.title.match(title) && w.pid == pid
end
sleep 0.1
- end until @main_window
+ end until @main_window
end
# post sanity checks
raise_error "cannot find main_window, check application title" unless @main_window