E
Emil
Hi, I have a little problem which I don't think shouldn't be to
difficult to solve.
I run two different methods. In one of the methods I want to override a
class, but not in the other one.
I want to do something like this:
@auto = WIN32OLE.new("AutoItX3.Control")
def sign_with_CA_one
@auto.Send("{a}")
@auto.Send("{b}")
@auto.Send("{1}")
@auto.Send("{2}")
end
def sign_with_CA_two
class WIN32OLE
alias oldSend(str) Send(str)
def Send(str)
oldSend(str)
sleep 0.1
end
end
@auto.Send("{a}")
@auto.Send("{b}")
@auto.Send("{1}")
@auto.Send("{2}")
end
In short: When using one of the methods I want to add a little sleep
after each character sendt, but not in the other one. But the code above
gives syntax error.
Any ideas?
Regards
Emil
difficult to solve.
I run two different methods. In one of the methods I want to override a
class, but not in the other one.
I want to do something like this:
@auto = WIN32OLE.new("AutoItX3.Control")
def sign_with_CA_one
@auto.Send("{a}")
@auto.Send("{b}")
@auto.Send("{1}")
@auto.Send("{2}")
end
def sign_with_CA_two
class WIN32OLE
alias oldSend(str) Send(str)
def Send(str)
oldSend(str)
sleep 0.1
end
end
@auto.Send("{a}")
@auto.Send("{b}")
@auto.Send("{1}")
@auto.Send("{2}")
end
In short: When using one of the methods I want to add a little sleep
after each character sendt, but not in the other one. But the code above
gives syntax error.
Any ideas?
Regards
Emil