From: Dirk Meijer Date: 2008-01-27T22:09:26+09:00 Subject: Re: win32ole.AppActivate broken in VISTA? ------=_Part_6672_31623997.1201439373796 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline i'm on vista ultimate, and when notepad's allready on, it switches to the notepad screen and prints "succes" but when notepad's not activated, i get a "fail" as well. 2008/1/27, David Mullet : > > Robert Batzinger wrote: > > I have been trying to use the win32ole module on Vista. However, the > > AppActivate method always fails regardless of whether simple or > > root-relative address are used in the following program. The module > > appears to be working well on all other versions of Windows. Does > > anyone know the fix to this? > > > > require 'win32ole' > > wsh = WIN32OLE.new('Wscript.Shell') > > if wsh.AppActivate('notepad') > > print 'Success' > > else > > print 'Fail' > > end > > > > BTW Just typing the word notepad works at the DOS prompt and the > > WIN32OLE does open the OLE object > > > > ================ > > Bob Batzinger > > Arkfriends > > South Bend, Indiana > > Bob- > > For what it's worth, your code works for me using Ruby 1.8.6 on Windows > Vista Home Premium. > > David > http://rubyonwindows.blogspot.com > -- > Posted via http://www.ruby-forum.com/. > > -- Procrastinate today! (Tomorrow may be too late...) ------=_Part_6672_31623997.1201439373796--