![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | InternetExplorer.Application COM object. I'm new to COM development. new-variable html $a = ([xml](new-object net.webclient).downloadstring("http://blogs.msdn.com/powershell/rss.aspx")).rss.channel.item $oIE = new-object -COM InternetExplorer.Application $oIE.navigate2(about:blank) $oIE.statusbar=$True $oIE.addressbar=$False $oIE.menubar=$False $oIE.toolbar=$False $b = $a | select $link,title,pubdate | convertto-html | % {$_.replace("<","<").replace(">",">")} $oIE.document.body.insertAdjacentHTML $oIE.visible=$True I'm trying to spawn an IE window whenever powershell starts. This windows will display the above rss feeds as links. The script isn't crashing, however the windows which spawns contains no data. I'm using IE 7 and Powershell v1. |
My System Specs![]() |
| | #2 (permalink) | ||||||||||||
| Guest | Re: InternetExplorer.Application COM object. Hi Braden, Try this, if you want it to be poped up each time PowerShell loads, wrap it in a function, put it in your profile and add a call to the function: ### $profile ### function get-rss{ $a = ([xml](new-object net.webclient).downloadstring("http://blogs.msdn.com/powershell/rss.aspx")).rss.channel.item $oIE = new-object -com internetExplorer.application $oIE.navigate2("about:blank") $oIE.statusbar=$true $oIE.addressbar=$false $oIE.menubar=$false $oIE.toolbar=$false $link = @{n="Title";e={"<a href='$($_.link)'>$($_.title)</a>"}} $b = $a | select $link,pubdate | convertto-html | foreach {$_.replace("<","<").replace(">",">")} $oIE.document.body.innerHTML = $b $oIE.visible=$true } get-rss ######## --- Shay Levi $cript Fanatic http://scriptolog.blogspot.com
| ||||||||||||
My System Specs![]() | |||||||||||||
| | #3 (permalink) | ||||||||||||
| Guest | Re: InternetExplorer.Application COM object. "Lionel Fourquaux" <use.reply-to@xxxxxx-spam.invalid> wrote in message news:slrng3guda.al6.use.reply-to@xxxxxx
I never was able to figure that out. Ironically, I upgraded to IE8 Beta 1 and started running it in IE7 compatibility mode before I got my IE scripts (PowerShell and WSH) working again. It now works well enough - I was able to export a few hundred messages from a Sakai web system for someone via PowerShell-based IE automation. | ||||||||||||
My System Specs![]() | |||||||||||||
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| InternetExplorer.Application and Windows Vista | nuytkens.stanny | VB Script | 0 | 06-17-2008 06:29 AM |
| Re: InternetExplorer.Application COM object. | Jon | PowerShell | 2 | 05-26-2008 03:52 PM |
| REQ: internetexplorer com object and access to array of links | Robertico | PowerShell | 8 | 05-21-2008 01:38 PM |
| new-object -com internetexplorer.application | Shawn Dumas | PowerShell | 3 | 09-19-2007 09:01 AM |
| Binding a powershell variable to the COM Object of a running application. | Mugunth | PowerShell | 5 | 05-05-2007 05:56 PM |